9
9
from lldbsuite .test import lldbutil
10
10
11
11
12
- class LibCxxAtomicTestCase (TestBase ):
12
+ class StdAtomicTestCase (TestBase ):
13
13
def get_variable (self , name ):
14
14
var = self .frame ().FindVariable (name )
15
15
var .SetPreferDynamicValue (lldb .eDynamicCanRunTarget )
16
16
var .SetPreferSyntheticValue (True )
17
17
return var
18
18
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"""
24
21
self .runCmd ("file " + self .getBuildArtifact ("a.out" ), CURRENT_EXECUTABLE_SET )
25
22
26
23
bkpt = self .target ().FindBreakpointByID (
@@ -31,8 +28,6 @@ def test(self):
31
28
32
29
self .runCmd ("run" , RUN_SUCCEEDED )
33
30
34
- lldbutil .skip_if_library_missing (self , self .target (), re .compile (r"libc\+\+" ))
35
-
36
31
# The stop reason of the thread should be breakpoint.
37
32
self .expect (
38
33
"thread list" ,
@@ -66,3 +61,15 @@ def test(self):
66
61
self .expect (
67
62
"frame var p.child.parent" , substrs = ["p.child.parent = {\n Value = 0x" ]
68
63
)
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