Michael137 updated this revision to Diff 454145.
Michael137 added a comment.

- Don't need replacement on one of the assertions


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132271/new/

https://reviews.llvm.org/D132271

Files:
  lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py

Index: lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py
===================================================================
--- lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py
+++ lldb/test/API/lang/cpp/namespace/TestNamespaceLookup.py
@@ -82,60 +82,60 @@
         # Run to BP_global_scope at global scope
         self.runToBkpt("run")
         # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 1")
+        self.expect_expr("func()", result_type="int", result_value="1")
         # Evaluate A::B::func() - should call A::B::func()
-        self.expect("expr -- A::B::func()", startstr="(int) $1 = 4")
+        self.expect_expr("A::B::func()", result_type="int", result_value="4")
         # Evaluate func(10) - should call ::func(int)
-        self.expect("expr -- func(10)", startstr="(int) $2 = 11")
+        self.expect_expr("func(10)", result_type="int", result_value="11")
         # Evaluate ::func() - should call A::func()
-        self.expect("expr -- ::func()", startstr="(int) $3 = 1")
+        self.expect_expr("::func()", result_type="int", result_value="1")
         # Evaluate A::foo() - should call A::foo()
-        self.expect("expr -- A::foo()", startstr="(int) $4 = 42")
+        self.expect_expr("A::foo()", result_type="int", result_value="42")
 
         # Continue to BP_ns_scope at ns scope
         self.runToBkpt("continue")
         # Evaluate func(10) - should call A::func(int)
-        self.expect("expr -- func(10)", startstr="(int) $5 = 13")
+        self.expect_expr("func(10)", result_type="int", result_value="13")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $6 = 4")
+        self.expect_expr("B::func()", result_type="int", result_value="4")
         # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr="(int) $7 = 3")
+        self.expect_expr("func()", result_type="int", result_value="3")
 
         # Continue to BP_nested_ns_scope at nested ns scope
         self.runToBkpt("continue")
         # Evaluate func() - should call A::B::func()
-        self.expect("expr -- func()", startstr="(int) $8 = 4")
+        self.expect_expr("func()", result_type="int", result_value="4")
         # Evaluate A::func() - should call A::func()
-        self.expect("expr -- A::func()", startstr="(int) $9 = 3")
+        self.expect_expr("A::func()", result_type="int", result_value="3")
 
         # Evaluate func(10) - should call A::func(10)
         # NOTE: Under the rules of C++, this test would normally get an error
         # because A::B::func() hides A::func(), but lldb intentionally
         # disobeys these rules so that the intended overload can be found
         # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr="(int) $10 = 13")
+        self.expect_expr("func(10)", result_type="int", result_value="13")
 
         # Continue to BP_nested_ns_scope_after_using at nested ns scope after
         # using declaration
         self.runToBkpt("continue")
         # Evaluate A::func(10) - should call A::func(int)
-        self.expect("expr -- A::func(10)", startstr="(int) $11 = 13")
+        self.expect_expr("A::func(10)", result_type="int", result_value="13")
 
         # Continue to BP_before_using_directive at global scope before using
         # declaration
         self.runToBkpt("continue")
         # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr="(int) $12 = 1")
+        self.expect_expr("::func()", result_type="int", result_value="1")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $13 = 4")
+        self.expect_expr("B::func()", result_type="int", result_value="4")
 
         # Continue to BP_after_using_directive at global scope after using
         # declaration
         self.runToBkpt("continue")
         # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr="(int) $14 = 1")
+        self.expect_expr("::func()", result_type="int", result_value="1")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $15 = 4")
+        self.expect_expr("B::func()", result_type="int", result_value="4")
 
     @expectedFailure("lldb scope lookup of functions bugs")
     def test_function_scope_lookup_with_run_command(self):
@@ -161,18 +161,18 @@
         # Evaluate foo() - should call ::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions.
-        self.expect("expr -- foo()", startstr="(int) $0 = 42")
+        self.expect_expr("foo()", result_type="int", result_value="42")
         # Evaluate ::foo() - should call ::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions and :: is ignored.
-        self.expect("expr -- ::foo()", startstr="(int) $1 = 42")
+        self.expect_expr("::foo()", result_type="int", result_value="42")
 
         # Continue to BP_ns_scope at ns scope
         self.runToBkpt("continue")
         # Evaluate foo() - should call A::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions.
-        self.expect("expr -- foo()", startstr="(int) $2 = 42")
+        self.expect_expr("foo()", result_type="int", result_value="42")
 
     @expectedFailure("lldb file scope lookup bugs")
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
@@ -193,7 +193,7 @@
         # Evaluate func() - should call static ns2.cpp:func()
         # FIXME: This test fails because lldb doesn't know about file scopes so
         # finds the global ::func().
-        self.expect("expr -- func()", startstr="(int) $0 = 2")
+        self.expect_expr("func()", result_type="int", result_value="2")
 
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
     def test_scope_lookup_before_using_with_run_command(self):
@@ -212,7 +212,7 @@
         # declaration
         self.runToBkpt("run")
         # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 1")
+        self.expect_expr("func()", result_type="int", result_value="1")
 
     # NOTE: this test may fail on older systems that don't emit import
     # entries in DWARF - may need to add checks for compiler versions here.
@@ -236,7 +236,7 @@
         # declaration
         self.runToBkpt("run")
         # Evaluate func2() - should call A::func2()
-        self.expect("expr -- func2()", startstr="(int) $0 = 3")
+        self.expect_expr("func2()", result_type="int", result_value="3")
 
     @expectedFailure(
         "lldb scope lookup after using declaration bugs")
@@ -258,7 +258,7 @@
         # declaration
         self.runToBkpt("run")
         # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 3")
+        self.expect_expr("func()", result_type="int", result_value="3")
 
     @expectedFailure("lldb scope lookup ambiguity after using bugs")
     def test_scope_ambiguity_after_using_lookup_with_run_command(self):
@@ -300,4 +300,4 @@
         # because A::B::func() shadows A::func(), but lldb intentionally
         # disobeys these rules so that the intended overload can be found
         # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr="(int) $0 = 13")
+        self.expect_expr("func(10)", result_type="int", result_value="13")
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to