def test6(self): code = 'char volatile arr[4] = {};' src_reader = parser.source_reader_t(self.config) global_ns = declarations.get_global_namespace( src_reader.read_string(code)) arr_type = global_ns.variable('arr').decl_type if self.config.xml_generator == "gccxml": self.assertTrue('char [4] volatile' == arr_type.decl_string, arr_type.decl_string) else: self.assertTrue('char volatile [4]' == arr_type.decl_string, arr_type.decl_string) self.assertTrue(declarations.is_array(arr_type)) self.assertTrue(declarations.is_volatile(arr_type))
def test6(self): code = 'char volatile arr[4] = {};' src_reader = parser.source_reader_t(self.config) global_ns = declarations.get_global_namespace( src_reader.read_string(code)) arr_type = global_ns.variable('arr').decl_type if self.config.xml_generator == "gccxml": self.assertTrue( 'char [4] volatile' == arr_type.decl_string, arr_type.decl_string) else: self.assertTrue( 'char volatile [4]' == arr_type.decl_string, arr_type.decl_string) self.assertTrue( declarations.is_array(arr_type)) self.assertTrue( declarations.is_volatile(arr_type))