99from lldbsuite .test import lldbutil
1010
1111
12- class LibCxxAtomicTestCase (TestBase ):
12+ class StdAtomicTestCase (TestBase ):
1313 def get_variable (self , name ):
1414 var = self .frame ().FindVariable (name )
1515 var .SetPreferDynamicValue (lldb .eDynamicCanRunTarget )
1616 var .SetPreferSyntheticValue (True )
1717 return var
1818
19- @skipIf (compiler = ["gcc" ])
20- @add_test_categories (["libc++" ])
21- def test (self ):
22- """Test that std::atomic as defined by libc++ is correctly printed by LLDB"""
23- self .build ()
19+ def do_test (self ):
20+ """Test that std::atomic is correctly printed by LLDB"""
2421 self .runCmd ("file " + self .getBuildArtifact ("a.out" ), CURRENT_EXECUTABLE_SET )
2522
2623 bkpt = self .target ().FindBreakpointByID (
@@ -31,8 +28,6 @@ def test(self):
3128
3229 self .runCmd ("run" , RUN_SUCCEEDED )
3330
34- lldbutil .skip_if_library_missing (self , self .target (), re .compile (r"libc\+\+" ))
35-
3631 # The stop reason of the thread should be breakpoint.
3732 self .expect (
3833 "thread list" ,
@@ -66,3 +61,15 @@ def test(self):
6661 self .expect (
6762 "frame var p.child.parent" , substrs = ["p.child.parent = {\n Value = 0x" ]
6863 )
64+
65+ @skipIf (compiler = ["gcc" ])
66+ @add_test_categories (["libc++" ])
67+ def test_libcxx (self ):
68+ self .build (dictionary = {"USE_LIBCPP" : 1 })
69+ self .do_test ()
70+
71+ @skipIf (compiler = ["gcc" ])
72+ @add_test_categories (["libstdcxx" ])
73+ def test_libstdcxx (self ):
74+ self .build (dictionary = {"USE_LIBSTDCPP" : 1 })
75+ self .do_test ()
0 commit comments