aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-09-20Support non-assignable (but movable) types in factory arguments when using ↵Marco Poletti
registerFactory.
2020-08-09Fix bazel build errors introduced by ↵Marco Poletti
94cefefb42f3685c1d64664e6aa9cbaf834b25ee when the Fruit headers are not also installed on the system where bazel runs.
2020-07-12Make the test_headers_copy library a static library.Marco Poletti
This fixes CI tests for Visual Studio, where otherwise it would generate a .dll instead of the expected .lib file.
2020-07-11Report a more user-friendly error when passing a signature with Assisted ↵Marco Poletti
params to registerConstructor or when attempting to use implicit constructor injection for a constructor that has assisted params.
2020-06-13Declare the dep on boost in bazel, so that Fruit builds even on systems ↵Marco Poletti
where Boost isn't installed. This required some refactoring of the testing code, since we can't depend on the Boost headers as a fileset (that we'd need) so generated code in tests can't include Boost anymore.
2020-05-02Update expected error regexes in tests to allow error messages from latest ↵Marco Poletti
MSVC 2019.
2020-03-29Skip 1 test under MSVC, its error message is bad due to an inconsistent ↵Marco Poletti
behavior of abstract-class-returning function types.
2020-03-10Escape ADDITIONAL_INCLUDE_DIRStt4g
2020-03-09Remove a redundant line from testing code.Marco Poletti
2020-03-09Fix test helpers for MSVC, there was a bug that caused most tests to fail.Marco Poletti
2020-03-09Fix a test expectation to allow MSVC 2019's type name format.Marco Poletti
2020-03-06Use find_package(Boost)tt4g
Modern CMake uses find_package command to find libraries from the system. `BOOST_DIR` no longer works. Use `Boost_INCLUDE_DIR` instead.
2019-12-23Fix some testing code that handles compilation failures when using MSVC.Marco Poletti
2019-12-22Fix the pytest.ini file used for testing, apparently having two sections ↵Marco Poletti
with the same name is forbidden.
2019-12-22Set a 5min timeout for each test case. One of the tests seems to be hanging ↵Marco Poletti
in Appveyor CI runs, but ATM it's not clear which one is it.
2019-12-22Use os.getcwd() instead of env["PWD"] in testing code so that tests also ↵Marco Poletti
work on Windows.
2019-09-01Add a more complex test case for name demangling.Marco Poletti
2019-07-20Migrate tests to absl.testing, mainly to make Bazel test sharding work.Marco Poletti
2019-07-20Print the env for commands executed in tests, to help debugging env-related ↵Marco Poletti
issues. This is mainly useful for Bazel due to sandboxing.
2019-07-20Fix test failures in Bazel when using sandboxing.Marco Poletti
2019-07-20Fix test failures with recent versions of Bazel.Marco Poletti
2019-06-09Use Bazel's CC variable instead of hardcoding g++.Marco Poletti
2019-06-09Set a 'toolchains' param in a BUILD rule. This is needed for the code to ↵Marco Poletti
compile with the latest version of bazel.
2019-04-27Fix an expected error regex to support the error format of GCC 9.Marco Poletti
2019-04-27Fix some Python PEP 8 warnings, notably including some warnings that were ↵Marco Poletti
printed in all test runs causing a lot of noise in the log.
2018-09-12Revert part of commit f06151, that part actually made Fruit slightly slower ↵Marco Poletti
now that the hash table is bigger.
2018-09-09Set timeout=long on pytest tests, otherwise they sometimes time out on ↵Marco Poletti
Travis CI.
2018-09-01Another attempt at improving the error messages for componentFunction() ↵Marco Poletti
misuse when using MSVC.
2018-09-01Revert "Slight change to componentFunction() so that the user gets a better ↵Marco Poletti
error in MSVC when they try to pass a param type that's not movable." This reverts commit dc2acf5f94c159d425b42d841b1133b6abb68656.
2018-09-01Slight change to componentFunction() so that the user gets a better error in ↵Marco Poletti
MSVC when they try to pass a param type that's not movable.
2018-09-01Update the test infrastructure to allow type variable replacements in ↵Marco Poletti
generic errors. These are now emitted by the latest MSVC in some cases.
2018-08-27Fix some macro issues introduced by the previous commit.Marco Poletti
2018-08-27Use #if instead of #ifdef for Fruit macros (apart from include guards).Marco Poletti
2018-08-20Allow the error format of old versions of Clang in ↵Marco Poletti
test_component_function_error_not_move_constructible_with_conversion().
2018-08-20Add a test for the case where a non-ComponentFunction object is passed to ↵Marco Poletti
installComponentFunctions().
2018-08-18Merge branch 'master' of github.com:google/fruitMarco Poletti
2018-08-18Add a PartialComponent::installComponentFunctions() method that allows to ↵Marco Poletti
install a variable number of components (typically by expanding a template parameter pack).
2018-07-24Also allow MSVC 2015's error message in test_move_partial_component.Marco Poletti
2018-07-24Disable the test ↵Marco Poletti
test_register_factory_abstract_class_with_no_virtual_destructor_error on MSVC since it no longer triggers a compile error with latest MSVC. (investigation pending)
2018-07-24Set the correct expected compile error for MSVC in test_move_partial_component.Marco Poletti
2018-07-24Make PartialComponent non-movable. This catches at compile-time some cases ↵Marco Poletti
where PartialComponent is used for non-temporary values. See issue 67.
2018-04-22Disable the check on the error message's line number in the test where we ↵Marco Poletti
expect warnings.
2018-04-22Ignore warnings in a test about a base class with no virtual destructor. ↵Marco Poletti
Some versions of Clang can detect this warning before the Fruit static assert does.
2018-03-04Make Fruit injectors accessible concurrently from multiple threads. This ↵Marco Poletti
commit is probably backwards-incompatible on some platforms (e.g. OS X), so I expect CI errors in some configurations. I'll add a CMake flag to allow switching this off in a separate commit.
2017-12-27Add a missing import to fix compilation of Fruit tests.Marco Poletti
2017-12-27Add a .clang-format config file and reformat all C++ source code using that. ↵Marco Poletti
Also added some documentation on the preferred style in CONTRIBUTING.md.
2017-11-18Make the Fruit tests pass with recent versions of Bazel (e.g. 0.7.0).Marco Poletti
2017-11-12A few more fixes to make Fruit work under MSVC 2015 and 2017 in Appveyor.Marco Poletti
2017-10-25Added support for MSVC 14 (VS2015)Clayton Lemons
The primary modes of failure (both compilation and runtime) for MSVC 14 were the following: 1. MSVC 14 is not able to properly parse alias template specializations when expanded parameter pack elements are used as a template argument. 2. MSVC 14 has trouble in some instances recognizing that a specialized alias template is a type. 3. Assuming struct Y inherits from struct X and y is an instance of Y, the pointer to y that is used for binding can get mangled when creating a Component. For example, fruit::createComponent().bindInstance<Y, Y>(y).bind<X, Y>() will mangle the pointer to y such that fruit::Injector::get() returns an invalid reference, causing a crash. I'm not exactly sure what the compiler is doing, but this happens when the PartialComponent returned by the chained binds calls is copied when it is passed by value to the Component constructor. Note, this does not happen if the bind calls in the above example are swapped: fruit::createComponent().bind<X, Y>().bindInstance<Y, Y>(y)
2017-08-13Remove a use of an undeclared field from a test.Marco Poletti