diff --git a/build/boost/test/Jamfile.jam b/build/boost/test/Jamfile.jam index 6e0e747..83222d8 100644 --- a/build/boost/test/Jamfile.jam +++ b/build/boost/test/Jamfile.jam @@ -8,19 +8,45 @@ import testing ; -run [ glob test_*.cpp detail/test_*.cpp ] /boost//unit_test_framework ; +project : requirements BOOST_AUTO_TEST_MAIN BOOST_ALL_NO_LIB ; -compile-fail fail_ambiguous_mock_method.cpp ; -compile-fail fail_constraint_functor_not_compatible.cpp ; -compile-fail fail_constraint_value_not_comparable.cpp ; -compile-fail fail_constraint_value_of_wrong_type_in_builtin_constraint.cpp ; -compile-fail fail_mismatch_type_in_returns_int_action.cpp ; -compile-fail fail_mismatch_type_in_returns_string_action.cpp ; -compile-fail fail_mismatch_type_in_returns_void_action.cpp ; -compile-fail fail_non_existing_base_class_method_in_mock_method.cpp ; -compile-fail fail_number_of_arguments_greater_than_max_constant.cpp ; -compile-fail fail_template_argument_without_tpl_macro.cpp ; -compile-fail fail_too_many_arguments_in_mock_method.cpp ; -compile-fail fail_wrong_number_of_arguments_in_with.cpp ; +rule run-test ( name ) +{ + run $(name).cpp /boost//unit_test_framework : : : : $(name) ; + run $(name).cpp /boost//unit_test_framework : : : MOCK_MAX_ARGS=21 : $(name)_max_args ; + run $(name).cpp /boost//unit_test_framework : : : MOCK_USE_CONVERSIONS : $(name)_use_conversions ; +} + +alias mock_tests : + [ run-test test_constraints ] + [ run-test test_error ] + [ run-test test_integration ] + [ run-test test_log ] + [ run-test test_matcher ] + [ run-test test_max_args ] + [ run-test test_mock ] + [ run-test test_object ] + [ run-test test_sequence ] + [ run-test detail/test_function ] + [ run-test detail/test_invocation ] + [ run-test detail/test_is_functor ] + [ run-test detail/test_type_name ] + [ run-test detail/test_signature ] +; + +alias mock_failures : + [ compile-fail fail_ambiguous_mock_method.cpp ] + [ compile-fail fail_constraint_functor_not_compatible.cpp ] + [ compile-fail fail_constraint_value_not_comparable.cpp ] + [ compile-fail fail_constraint_value_of_wrong_type_in_builtin_constraint.cpp ] + [ compile-fail fail_mismatch_type_in_returns_int_action.cpp ] + [ compile-fail fail_mismatch_type_in_returns_string_action.cpp ] + [ compile-fail fail_mismatch_type_in_returns_void_action.cpp ] + [ compile-fail fail_non_existing_base_class_method_in_mock_method.cpp ] + [ compile-fail fail_number_of_arguments_greater_than_max_constant.cpp ] + [ compile-fail fail_template_argument_without_tpl_macro.cpp ] + [ compile-fail fail_too_many_arguments_in_mock_method.cpp ] + [ compile-fail fail_wrong_number_of_arguments_in_with.cpp ] +; # How to time bench_*.cpp compilation ? diff --git a/test/detail/test_signature.cpp b/test/detail/test_signature.cpp index fa23d9b..8f6920a 100644 --- a/test/detail/test_signature.cpp +++ b/test/detail/test_signature.cpp @@ -17,9 +17,11 @@ namespace void method_1(); float method_2( int ) const; }; - typedef base base_type; +} +BOOST_AUTO_TEST_CASE( mock_signature_generates_signature ) +{ BOOST_MPL_ASSERT(( boost::is_same< void(), MOCK_SIGNATURE( method_1 ) > )); BOOST_MPL_ASSERT((