Fix fuzzer and parser

This commit is contained in:
Chunmyong Park
2020-03-20 05:02:58 +00:00
parent 1b7d25314d
commit 241a66fcc1
2 changed files with 9 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ impl AssertSupported for FunctionDefinition {
fn assert_supported(&self) {
self.specifiers.assert_supported();
self.declarator.assert_supported();
self.declarations.is_empty();
assert!(self.declarations.is_empty());
self.statement.assert_supported();
}
}

View File

@@ -95,6 +95,14 @@ if __name__ == "__main__":
raw_test_file = "raw_test.c"
test_file = "test.c"
try:
print("Building KECC..")
try:
proc = subprocess.Popen(["cargo", "build", "--release"], cwd=tests_dir)
proc.communicate()
except subprocess.TimeoutExpired as e:
proc.kill()
raise e
if args.num is None:
print("Fuzzing with infinitely many test cases. Please press [ctrl+C] to break.")
iterator = itertools.count(0)