1111import shutil
1212import time
1313
14- class TestFrameVarDILCStyleCast (TestBase ):
1514
15+ class TestFrameVarDILCStyleCast (TestBase ):
1616 def test_type_cast (self ):
1717 self .build ()
1818 (target , process , thread , bkpt ) = lldbutil .run_to_source_breakpoint (
@@ -104,9 +104,7 @@ def test_type_cast(self):
104104 self .expect (
105105 "frame variable '(int)ns_foo_'" ,
106106 error = True ,
107- substrs = [
108- "cannot convert 'ns::Foo' to 'int' without a conversion operator"
109- ],
107+ substrs = ["cannot convert 'ns::Foo' to 'int' without a conversion operator" ],
110108 )
111109
112110 # Test with typedefs and namespaces.
@@ -152,17 +150,15 @@ def test_type_cast(self):
152150 )
153151 Is32Bit = False
154152 if self .target ().GetAddressByteSize () == 4 :
155- Is32Bit = True ;
153+ Is32Bit = True
156154
157155 if Is32Bit :
158156 self .expect ("frame variable '(int)arr'" , type = "int" )
159157 else :
160158 self .expect (
161159 "frame variable '(int)arr'" ,
162160 error = True ,
163- substrs = [
164- "cast from pointer to smaller type 'int' loses information"
165- ],
161+ substrs = ["cast from pointer to smaller type 'int' loses information" ],
166162 )
167163
168164 self .expect (
@@ -186,15 +182,15 @@ def test_type_cast(self):
186182
187183
188184 if Is32Bit :
189- self .expect_var_path ("(void*)0" , type = "void *" , value = "0x00000000" )
190- self .expect_var_path ("(void*)1" , type = "void *" , value = "0x00000001" )
191- self .expect_var_path ("(void*)a" , type = "void *" , value = "0x00000001" )
192- self .expect_var_path ("(void*)na" , type = "void *" , value = "0xffffffff" )
185+ self .expect_var_path ("(void*)0" , type = "void *" , value = "0x00000000" )
186+ self .expect_var_path ("(void*)1" , type = "void *" , value = "0x00000001" )
187+ self .expect_var_path ("(void*)a" , type = "void *" , value = "0x00000001" )
188+ self .expect_var_path ("(void*)na" , type = "void *" , value = "0xffffffff" )
193189 else :
194- self .expect_var_path ("(void*)0" , type = "void *" , value = "0x0000000000000000" )
195- self .expect_var_path ("(void*)1" , type = "void *" , value = "0x0000000000000001" )
196- self .expect_var_path ("(void*)a" , type = "void *" , value = "0x0000000000000001" )
197- self .expect_var_path ("(void*)na" , type = "void *" , value = "0xffffffffffffffff" )
190+ self .expect_var_path ("(void*)0" , type = "void *" , value = "0x0000000000000000" )
191+ self .expect_var_path ("(void*)1" , type = "void *" , value = "0x0000000000000001" )
192+ self .expect_var_path ("(void*)a" , type = "void *" , value = "0x0000000000000001" )
193+ self .expect_var_path ("(void*)na" , type = "void *" , value = "0xffffffffffffffff" )
198194
199195 self .expect_var_path ("(int*&)ap" , type = "int *" )
200196
@@ -227,7 +223,6 @@ def test_type_cast(self):
227223 else :
228224 self .expect_var_path ("(void *)0" , type = "void *" , value = "0x0000000000000000" )
229225
230-
231226 # TestCStyleCastArray
232227
233228 self .expect_var_path ("(int*)arr_1d" , type = "int *" )
0 commit comments