Update testcase for D101333.
authorAdrian Prantl <aprantl@apple.com>
Tue, 27 Apr 2021 20:23:48 +0000 (13:23 -0700)
committerAdrian Prantl <aprantl@apple.com>
Tue, 27 Apr 2021 20:24:24 +0000 (13:24 -0700)
lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py

index 3433854..c7b7596 100644 (file)
@@ -75,11 +75,11 @@ class ExprDiagnosticsTestCase(TestBase):
         # In the future our declarations should have valid source locations.
         value = frame.EvaluateExpression("struct FooBar { double x };", top_level_opts)
         self.assertFalse(value.GetError().Success())
-        self.assertEqual("error: <user expression 6>:1:8: redefinition of 'FooBar'\nstruct FooBar { double x };\n       ^\n", value.GetError().GetCString())
+        self.assertIn("error: <user expression 6>:1:8: redefinition of 'FooBar'\nstruct FooBar { double x };\n       ^\n", value.GetError().GetCString())
 
         value = frame.EvaluateExpression("foo(1, 2)")
         self.assertFalse(value.GetError().Success())
-        self.assertEqual("error: <user expression 7>:1:1: no matching function for call to 'foo'\nfoo(1, 2)\n^~~\nnote: candidate function not viable: requires single argument 'x', but 2 arguments were provided\n\n", value.GetError().GetCString())
+        self.assertIn("error: <user expression 7>:1:1: no matching function for call to 'foo'\nfoo(1, 2)\n^~~\nnote: candidate function not viable: requires single argument 'x', but 2 arguments were provided\n\n", value.GetError().GetCString())
 
         # Redefine something that we defined in a user-expression. We should use the previous expression file name
         # for the original decl.