Revert "[ELF] Refine isExported/isPreemptible condition"
[llvm-project.git] / lldb / test / API / lang / cpp / wchar_t / TestCxxWCharT.py
blob35cb512142ca0d45d323c06700bddfbc4325d4ae
1 # coding=utf8
2 """
3 Test that C++ supports wchar_t correctly.
4 """
7 import lldb
8 from lldbsuite.test.lldbtest import *
9 import lldbsuite.test.lldbutil as lldbutil
12 class CxxWCharTTestCase(TestBase):
13 def test(self):
14 """Test that C++ supports wchar_t correctly."""
15 self.build()
16 lldbutil.run_to_source_breakpoint(
17 self, "// break here", lldb.SBFileSpec("main.cpp")
20 # Check that we correctly report templates on wchar_t
21 self.expect_var_path("foo_y", type="Foo<wchar_t>")
23 # Check that we correctly report templates on int
24 self.expect_var_path("foo_x", type="Foo<int>")
26 # Check that we correctly report wchar_t
27 self.expect_var_path("foo_y.object", type="wchar_t")
29 # Check that we correctly report int
30 self.expect_var_path("foo_x.object", type="int")
32 # Check that we can run expressions that return wchar_t
33 self.expect("expression L'a'", substrs=["(wchar_t) $", "L'a'"])
35 # Mazel Tov if this works!
36 self.expect(
37 "frame variable mazeltov",
38 substrs=["(const wchar_t *) mazeltov = ", 'L"מזל טוב"'],
41 self.expect("frame variable ws_NULL", substrs=["(wchar_t *) ws_NULL = 0x0"])
42 self.expect("frame variable ws_empty", substrs=[' L""'])
44 self.expect(
45 "frame variable array", substrs=["L\"Hey, I'm a super wchar_t string"]
47 self.expect("frame variable array", substrs=["[0]"], matching=False)
49 self.expect("frame variable wchar_zero", substrs=["L'\\0'"])
50 self.expect("expression wchar_zero", substrs=["L'\\0'"])