diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2018-09-01 14:57:36 +0100 |
---|---|---|
committer | Marco Poletti <poletti.marco@gmail.com> | 2018-09-01 14:57:36 +0100 |
commit | 5fbea5bbdfbcedcb36e025ded41df739951cff2b (patch) | |
tree | ed28996f29deb17b476d0c362701c874e0132bd8 /tests | |
parent | 7a0a16708cfd1786a6a5038315af2d205fb74194 (diff) | |
download | google-fruit-5fbea5bbdfbcedcb36e025ded41df739951cff2b.tar.gz |
Another attempt at improving the error messages for componentFunction() misuse when using MSVC.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_component_functions.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test_component_functions.py b/tests/test_component_functions.py index e9ebe27..69ab6cf 100755 --- a/tests/test_component_functions.py +++ b/tests/test_component_functions.py @@ -147,7 +147,8 @@ def test_component_function_error_not_move_constructible(): expect_generic_compile_error( 'error: use of deleted function .Arg::Arg\(Arg&&\).' + '|error: call to deleted constructor of .Arg.' - + '|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.', + + '|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.' + + '|.Arg::Arg\(Arg &&\).: attempting to reference a deleted function', COMMON_DEFINITIONS, source) @@ -222,7 +223,10 @@ def test_component_function_error_not_copy_constructible(): expect_generic_compile_error( 'error: use of deleted function .Arg::Arg\(const Arg&\).' + '|error: call to deleted constructor of .Arg.' - + '|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function', + + '|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function' + # This is the error printed by MSVC. It's not great but I couldn't find a way to have it print + # a more useful error. + + '|cannot convert argument 1 from .int. to .std::allocator_arg_t.', COMMON_DEFINITIONS, source) @@ -261,7 +265,10 @@ def test_component_function_error_not_copy_constructible_with_conversion(): expect_generic_compile_error( 'error: use of deleted function .Arg::Arg\(const Arg&\).' + '|error: call to deleted constructor of .Arg.' - + '|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function', + + '|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function' + # This is the error printed by MSVC. It's not great but I couldn't find a way to have it print + # a more useful error. + + '|cannot convert argument 1 from .int. to .std::allocator_arg_t.', COMMON_DEFINITIONS, source) |