diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2022-11-14 12:14:20 -0800 |
---|---|---|
committer | Marco Poletti <poletti.marco@gmail.com> | 2022-11-14 12:14:20 -0800 |
commit | adcb2afb2dc364d1626fda3cc0bb3391fceb7451 (patch) | |
tree | 3fa641dfb764abd8736b11b2a59f6b728aa353ef | |
parent | 00f238e5ccd4d1092d0813da037510a084d138af (diff) | |
download | google-fruit-adcb2afb2dc364d1626fda3cc0bb3391fceb7451.tar.gz |
Update the expected error regexes in tests with the error formats of the latest MSVC 2019 and 2022.
-rwxr-xr-x | tests/test_component_functions.py | 5 | ||||
-rwxr-xr-x | tests/test_injector.py | 1 | ||||
-rwxr-xr-x | tests/test_install.py | 3 | ||||
-rwxr-xr-x | tests/test_normalized_component.py | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_component_functions.py b/tests/test_component_functions.py index 8dc6a76..be92d23 100755 --- a/tests/test_component_functions.py +++ b/tests/test_component_functions.py @@ -149,6 +149,7 @@ class TestComponentFunctions(parameterized.TestCase): expect_generic_compile_error( r'error: use of deleted function .Arg::Arg\(Arg&&\).' r'|error: call to deleted constructor of .Arg.' + r'|.Arg::Arg\(const Arg &\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.' r'|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.' r'|.Arg::Arg\(Arg &&\).: attempting to reference a deleted function', COMMON_DEFINITIONS, @@ -186,7 +187,7 @@ class TestComponentFunctions(parameterized.TestCase): expect_generic_compile_error( r'error: use of deleted function .Arg::Arg\(Arg&&\).' r'|error: call to deleted constructor of .Arg.' - r'|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .int.' + r'|.Arg::Arg\((int|Arg &&)\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .int.' r'|error: copying parameter of type .Arg. invokes deleted constructor' r'|error C2280: .Arg::Arg\(Arg &&\).: attempting to reference a deleted function', COMMON_DEFINITIONS, @@ -227,6 +228,7 @@ class TestComponentFunctions(parameterized.TestCase): r'error: use of deleted function .Arg::Arg\(const Arg&\).' r'|error: call to deleted constructor of .Arg.' r'|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function' + r'|.std::tuple<int,std::string,Arg>::tuple.: no overloaded function takes 3 arguments' # 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. r'|cannot convert argument 1 from .int. to .std::allocator_arg_t.', @@ -269,6 +271,7 @@ class TestComponentFunctions(parameterized.TestCase): r'error: use of deleted function .Arg::Arg\(const Arg&\).' r'|error: call to deleted constructor of .Arg.' r'|error C2280: .Arg::Arg\(const Arg &\).: attempting to reference a deleted function' + r'|.std::tuple<int,std::string,Arg>::tuple.: no overloaded function takes 3 arguments' # 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. r'|cannot convert argument 1 from .int. to .std::allocator_arg_t.', diff --git a/tests/test_injector.py b/tests/test_injector.py index 1436f4f..b552f4a 100755 --- a/tests/test_injector.py +++ b/tests/test_injector.py @@ -110,6 +110,7 @@ class TestInjector(parameterized.TestCase): r'no matching constructor for initialization of .fruit::Injector<XAnnot>.' r'|no matching function for call to .fruit::Injector<XAnnot>::Injector\(fruit::Component<ConstXAnnot> \(&\)\(\)\).' # MSVC + r'|.fruit::Injector<XAnnot>::Injector.: no overloaded function could convert all the argument types' r'|.fruit::Injector<XAnnot>::Injector.: none of the 2 overloads could convert all the argument types', COMMON_DEFINITIONS, source, diff --git a/tests/test_install.py b/tests/test_install.py index 01a816d..6afe780 100755 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -403,6 +403,7 @@ class TestInstall(parameterized.TestCase): expect_generic_compile_error( r'error: use of deleted function .Arg::Arg\(Arg&&\).' r'|error: call to deleted constructor of .Arg.' + r'|.Arg::Arg\(const Arg &\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.' r'|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .const Arg &.', COMMON_DEFINITIONS, source) @@ -437,7 +438,7 @@ class TestInstall(parameterized.TestCase): expect_generic_compile_error( r'error: use of deleted function .Arg::Arg\(Arg&&\).' r'|error: call to deleted constructor of .Arg.' - r'|.Arg::Arg\(Arg &&\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .int.', + r'|.Arg::Arg\((int|Arg &&)\).: cannot convert argument 1 from .std::_Tuple_val<Arg>. to .int.', COMMON_DEFINITIONS, source) diff --git a/tests/test_normalized_component.py b/tests/test_normalized_component.py index 8888019..7d96e1e 100755 --- a/tests/test_normalized_component.py +++ b/tests/test_normalized_component.py @@ -175,6 +175,7 @@ class TestNormalizedComponent(parameterized.TestCase): expect_generic_compile_error( r'no matching function for call to .fruit::NormalizedComponent<ConstXAnnot>::NormalizedComponent\(fruit::Component<XAnnot> \(&\)\(\)\).' r'|no matching constructor for initialization of .fruit::NormalizedComponent<ConstXAnnot>.' + r'|.fruit::NormalizedComponent<ConstXAnnot>::NormalizedComponent.: no overloaded function could convert all the argument types' r'|.fruit::NormalizedComponent<ConstXAnnot>::NormalizedComponent.: none of the .* overloads could convert all the argument types', COMMON_DEFINITIONS, source, |