Added include guards to test src and formatting tests

This commit is contained in:
Leonardo committed 2020-05-21 21:19:03 -03:00
1 parent e4a7b01d3a
commit 7340866da1
33 files changed
+157 -1081

No files matched your search

+8 -1
View File
@@ -86,7 +86,14 @@ for data in collections:
file = open(f'{OUTPUT_DIR}/{data["sname"]}.c', 'w')
file.write(f'#include {data["h"]}\n{match.group("code")}')
file.write(
f'''#ifndef CMC_TEST_SRC_{data['t']}
#define CMC_TEST_SRC_{data['t']}
#include {data["h"]}\n{match.group("code")}
#endif /* CMC_TEST_SRC_{data['t']} */
''')
file.flush()
file.close()