2 Test that variables of integer basic types are displayed correctly.
8 from lldbsuite
.test
.lldbtest
import *
10 # rdar://problem/9649573
11 # Capture the lldb and gdb-remote log files for test failures when run
15 class DebugIntegerTypesFailures(TestBase
):
17 # Call super's setUp().
19 # If we're lucky, test_long_type_with_dsym fails.
20 # Let's turn on logging just for that.
22 if "test_long_type_with_dsym" in self
.id():
24 "log enable -n -f %s lldb commands event process state"
25 % os
.environ
["DEBUG_LLDB_LOG"]
28 "log enable -n -f %s gdb-remote packets process"
29 % os
.environ
["DEBUG_GDB_REMOTE_LOG"]
35 # If we're lucky, test_long_type_with_dsym fails.
36 # Let's turn off logging just for that.
37 if "test_long_type_with_dsym" in self
.id():
38 self
.runCmd("log disable lldb")
39 self
.runCmd("log disable gdb-remote")
40 # Call super's tearDown().
41 TestBase
.tearDown(self
)
43 def test_char_type(self
):
44 """Test that char-type variables are displayed correctly."""
45 d
= {"CXX_SOURCES": "char.cpp"}
46 self
.build(dictionary
=d
)
47 self
.setTearDownCleanup(dictionary
=d
)
48 self
.generic_type_tester(set(["char"]), quotedDisplay
=True)
50 def test_short_type(self
):
51 """Test that short-type variables are displayed correctly."""
52 d
= {"CXX_SOURCES": "short.cpp"}
53 self
.build(dictionary
=d
)
54 self
.setTearDownCleanup(dictionary
=d
)
55 self
.generic_type_tester(set(["short"]))
57 def test_int_type(self
):
58 """Test that int-type variables are displayed correctly."""
59 d
= {"CXX_SOURCES": "int.cpp"}
60 self
.build(dictionary
=d
)
61 self
.setTearDownCleanup(dictionary
=d
)
62 self
.generic_type_tester(set(["int"]))
64 def test_long_type(self
):
65 """Test that long-type variables are displayed correctly."""
66 d
= {"CXX_SOURCES": "long.cpp"}
67 self
.build(dictionary
=d
)
68 self
.setTearDownCleanup(dictionary
=d
)
69 self
.generic_type_tester(set(["long"]))
71 def test_long_long_type(self
):
72 """Test that 'long long'-type variables are displayed correctly."""
73 d
= {"CXX_SOURCES": "long_long.cpp"}
74 self
.build(dictionary
=d
)
75 self
.setTearDownCleanup(dictionary
=d
)
76 self
.generic_type_tester(set(["long long"]))