diff options
| author | Stella Stamenova <stilis@microsoft.com> | 2022-07-14 10:47:01 -0700 |
|---|---|---|
| committer | Stella Stamenova <stilis@microsoft.com> | 2022-07-14 10:47:01 -0700 |
| commit | c3a28e8a99a6672339a38c468f2519ace5659fa2 (patch) | |
| tree | 2faa37d714aaa870220b467de74f927924ea0eba /lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py | |
| parent | 64d63f4823afeeaa2f8abc256bfe14b89f4daeae (diff) | |
Revert "[lldb] Add support for using integral const static data members in the expression evaluator"
This reverts commit 486787210df5ce5eabadc90a7de353ae81101feb.
This broke the windows lldb bot: https://lab.llvm.org/buildbot/#/builders/83/builds/21186
Diffstat (limited to 'lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py')
| -rw-r--r-- | lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py b/lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py deleted file mode 100644 index 86db78187aa8..000000000000 --- a/lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py +++ /dev/null @@ -1,94 +0,0 @@ -""" -Tests const static data members as specified by C++11 [class.static.data]p3. -""" - -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestCase(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - def test(self): - self.build() - lldbutil.run_to_source_breakpoint(self, "// break here", - lldb.SBFileSpec("main.cpp")) - - # Test using a simple const static integer member. - self.expect_expr("A::int_val", result_value="1") - - # Try accessing the int member via some expressions that still produce - # an lvalue. - self.expect_expr("a.int_val", result_value="1") - self.expect_expr("(A::int_val)", result_value="1") - self.expect_expr("+A::int_val", result_value="1") - self.expect_expr("1,A::int_val", result_value="1") - self.expect_expr("true ? A::int_val : A::int_val", result_value="1") - - # Test a simple integer member that was also defined in a namespace - # scope and has an address. - self.expect_expr("A::int_val_with_address", result_value="2") - - # Try to take the address of the data member. Should produce a linker - # error only if the member doesn't have an address. - self.expect("expr const int *i = &A::int_val; *i", error=True, - substrs=["Couldn't lookup symbols:"]) - self.expect_expr("const int *i = &A::int_val_with_address; *i", - result_value="2") - - # Test a bool member. - self.expect_expr("A::bool_val", result_value="true") - - # Test that minimum and maximum values for each data type are right. - self.expect_expr("A::char_max == char_max", result_value="true") - self.expect_expr("A::uchar_max == uchar_max", result_value="true") - self.expect_expr("A::int_max == int_max", result_value="true") - self.expect_expr("A::uint_max == uint_max", result_value="true") - self.expect_expr("A::long_max == long_max", result_value="true") - self.expect_expr("A::ulong_max == ulong_max", result_value="true") - self.expect_expr("A::longlong_max == longlong_max", result_value="true") - self.expect_expr("A::ulonglong_max == ulonglong_max", result_value="true") - - self.expect_expr("A::char_min == char_min", result_value="true") - self.expect_expr("A::uchar_min == uchar_min", result_value="true") - self.expect_expr("A::int_min == int_min", result_value="true") - self.expect_expr("A::uint_min == uint_min", result_value="true") - self.expect_expr("A::long_min == long_min", result_value="true") - self.expect_expr("A::ulong_min == ulong_min", result_value="true") - self.expect_expr("A::longlong_min == longlong_min", result_value="true") - self.expect_expr("A::ulonglong_min == ulonglong_min", result_value="true") - - # Test an unscoped enum. - self.expect_expr("A::enum_val", result_value="enum_case2") - # Test an unscoped enum with an invalid enum case. - self.expect_expr("A::invalid_enum_val", result_value="enum_case1 | enum_case2 | 0x4") - - # Test a scoped enum. - self.expect_expr("A::scoped_enum_val", result_value="scoped_enum_case2") - # Test an scoped enum with an invalid enum case. - self.expect_expr("A::invalid_scoped_enum_val", result_value="scoped_enum_case1 | 0x4") - - # Test an enum with fixed underlying type. - self.expect_expr("A::scoped_char_enum_val", result_value="case2") - self.expect_expr("A::scoped_ll_enum_val_neg", result_value="case0") - self.expect_expr("A::scoped_ll_enum_val", result_value="case2") - - # Try to take the address of a member that doesn't have one. - self.expect("expr const int *i = &A::int_val; *i", error=True, - substrs=["Couldn't lookup symbols:"]) - - # dsymutil strips the debug info for classes that only have const static - # data members without a definition namespace scope. - @expectedFailureAll(debug_info=["dsym"]) - def test_class_with_only_const_static(self): - self.build() - lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp")) - - self.expect_expr("ClassWithOnlyConstStatic::member", result_value="3") - - # Test `constexpr static`. - self.expect_expr("ClassWithConstexprs::member", result_value="2") - self.expect_expr("ClassWithConstexprs::enum_val", result_value="enum_case2") - self.expect_expr("ClassWithConstexprs::scoped_enum_val", result_value="scoped_enum_case2") |
