@@ -530,13 +530,7 @@ class StructuresTest(unittest.TestCase):
530
530
531
531
@classmethod
532
532
def setUpClass (cls ):
533
- """
534
- NOTE: Very possibly, if you change this header string, you need to
535
- change the line numbers in the JSON output test result below
536
- (in test_struct_json).
537
- """
538
533
header_str = """
539
-
540
534
struct foo
541
535
{
542
536
int a;
@@ -945,7 +939,7 @@ def test_struct_json(self):
945
939
],
946
940
"opaque" : False ,
947
941
"attrib" : {},
948
- "src" : [self .tmp_header_path , 21 ],
942
+ "src" : [self .tmp_header_path , None ],
949
943
"tag" : "anon_1" ,
950
944
"variety" : "struct" ,
951
945
},
@@ -1110,7 +1104,7 @@ def test_struct_json(self):
1110
1104
],
1111
1105
"opaque" : False ,
1112
1106
"attrib" : {"packed" : True },
1113
- "src" : [self .tmp_header_path , 30 ],
1107
+ "src" : [self .tmp_header_path , None ],
1114
1108
"tag" : "anon_2" ,
1115
1109
"variety" : "struct" ,
1116
1110
},
@@ -1275,7 +1269,7 @@ def test_struct_json(self):
1275
1269
],
1276
1270
"opaque" : False ,
1277
1271
"attrib" : {"packed" : True , "aligned" : [4 ]},
1278
- "src" : [self .tmp_header_path , 40 ],
1272
+ "src" : [self .tmp_header_path , None ],
1279
1273
"tag" : "anon_3" ,
1280
1274
"variety" : "struct" ,
1281
1275
},
@@ -1487,7 +1481,7 @@ def test_struct_json(self):
1487
1481
],
1488
1482
"opaque" : False ,
1489
1483
"attrib" : {},
1490
- "src" : [self .tmp_header_path , 77 ],
1484
+ "src" : [self .tmp_header_path , None ],
1491
1485
"tag" : "anon_4" ,
1492
1486
"variety" : "struct" ,
1493
1487
},
@@ -1550,7 +1544,7 @@ def test_struct_json(self):
1550
1544
],
1551
1545
],
1552
1546
"opaque" : False ,
1553
- "src" : [self .tmp_header_path , 81 ],
1547
+ "src" : [self .tmp_header_path , None ],
1554
1548
"tag" : "anon_5" ,
1555
1549
"variety" : "struct" ,
1556
1550
},
@@ -1588,7 +1582,7 @@ def test_struct_json(self):
1588
1582
],
1589
1583
],
1590
1584
"opaque" : False ,
1591
- "src" : [self .tmp_header_path , 81 ],
1585
+ "src" : [self .tmp_header_path , None ],
1592
1586
"tag" : "anon_5" ,
1593
1587
"variety" : "struct" ,
1594
1588
},
@@ -1677,7 +1671,7 @@ def test_struct_json(self):
1677
1671
],
1678
1672
"opaque" : False ,
1679
1673
"attrib" : {},
1680
- "src" : [self .tmp_header_path , 3 ],
1674
+ "src" : [self .tmp_header_path , None ],
1681
1675
"tag" : "foo" ,
1682
1676
"variety" : "struct" ,
1683
1677
},
@@ -1763,7 +1757,7 @@ def test_struct_json(self):
1763
1757
],
1764
1758
"opaque" : False ,
1765
1759
"attrib" : {"packed" : True },
1766
- "src" : [self .tmp_header_path , 12 ],
1760
+ "src" : [self .tmp_header_path , None ],
1767
1761
"tag" : "packed_foo" ,
1768
1762
"variety" : "struct" ,
1769
1763
},
@@ -1849,7 +1843,7 @@ def test_struct_json(self):
1849
1843
],
1850
1844
],
1851
1845
"opaque" : False ,
1852
- "src" : [self .tmp_header_path , 56 ],
1846
+ "src" : [self .tmp_header_path , None ],
1853
1847
"tag" : "pragma_packed_foo2" ,
1854
1848
"variety" : "struct" ,
1855
1849
},
@@ -1935,7 +1929,7 @@ def test_struct_json(self):
1935
1929
],
1936
1930
],
1937
1931
"opaque" : False ,
1938
- "src" : [self .tmp_header_path , 66 ],
1932
+ "src" : [self .tmp_header_path , None ],
1939
1933
"tag" : "foo3" ,
1940
1934
"variety" : "struct" ,
1941
1935
},
@@ -2078,11 +2072,11 @@ class EnumTest(unittest.TestCase):
2078
2072
@classmethod
2079
2073
def setUpClass (cls ):
2080
2074
header_str = """
2081
- typedef enum {
2082
- TEST_1 = 0,
2083
- TEST_2
2084
- } test_status_t;
2085
- """
2075
+ typedef enum {
2076
+ TEST_1 = 0,
2077
+ TEST_2
2078
+ } test_status_t;
2079
+ """
2086
2080
cls .module = generate (header_str )
2087
2081
cls .json , cls .tmp_header_path = generate (header_str , lang = "json" )
2088
2082
@@ -2172,7 +2166,7 @@ def test_enum_json(self):
2172
2166
],
2173
2167
"errors" : [],
2174
2168
"opaque" : False ,
2175
- "src" : [self .tmp_header_path , 2 ],
2169
+ "src" : [self .tmp_header_path , None ],
2176
2170
"tag" : "anon_1" ,
2177
2171
},
2178
2172
"name" : "test_status_t" ,
@@ -2187,14 +2181,14 @@ class PrototypeTest(unittest.TestCase):
2187
2181
@classmethod
2188
2182
def setUpClass (cls ):
2189
2183
header_str = """
2190
- int bar2(int a);
2191
- int bar(int);
2192
- void foo(void);
2193
- void foo2(void) __attribute__((stdcall));
2194
- void * __attribute__((stdcall)) foo3(void);
2195
- void * __attribute__((stdcall)) * foo4(void);
2196
- void foo5(void) __attribute__((__stdcall__));
2197
- """
2184
+ int bar2(int a);
2185
+ int bar(int);
2186
+ void foo(void);
2187
+ void foo2(void) __attribute__((stdcall));
2188
+ void * __attribute__((stdcall)) foo3(void);
2189
+ void * __attribute__((stdcall)) * foo4(void);
2190
+ void foo5(void) __attribute__((__stdcall__));
2191
+ """
2198
2192
cls .json , _ = generate (header_str , lang = "json" )
2199
2193
2200
2194
@classmethod
@@ -2341,12 +2335,12 @@ class LongDoubleTest(unittest.TestCase):
2341
2335
@classmethod
2342
2336
def setUpClass (cls ):
2343
2337
header_str = """
2344
- struct foo
2345
- {
2346
- long double is_bar;
2347
- int a;
2348
- };
2349
- """
2338
+ struct foo
2339
+ {
2340
+ long double is_bar;
2341
+ int a;
2342
+ };
2343
+ """
2350
2344
cls .module = generate (header_str ) # ["--all-headers"]
2351
2345
2352
2346
@classmethod
0 commit comments