mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
ac938df3dc
Summary: Some tests want to create a TestMount but don't care what files are in the mount. The following code is intuitively correct. However, TestMount's constructor takes a FakeTreeBuilder by non-const reference, so it fails to compile: auto testMount = TestMount{FakeTreeBuilder{}}; The following code works, but more verbose: auto builder = FakeTreeBuilder{}; auto testMount = TestMount{builder}; Overload TestMount's constructor to allow the former form in addition to the latter form. This neatly shrinks some test code. This diff should not change behavior. Reviewed By: chadaustin Differential Revision: D14060110 fbshipit-source-id: c6a5d4b2c5859812efff279dedbc1fe690c8f8ad |
||
---|---|---|
.. | ||
benchmarks | ||
cli | ||
docs | ||
fs | ||
integration | ||
py | ||
scripts | ||
test_support | ||
test-data | ||
third-party | ||
win | ||
.gitignore | ||
.pyre_configuration.local | ||
Eden.project.toml |