More small changes
This commit is contained in:
18
Test.jai
18
Test.jai
@@ -154,7 +154,8 @@ do_golden_comparison :: (golden_path : string, comparison_text : string, result_
|
||||
}
|
||||
|
||||
run_codegen_test :: (file_path : string, result : *Compile_Result, output_type : Output_Type = 0) -> Result {
|
||||
add_file(result, file_path);
|
||||
result.file = make_file(result, file_path);
|
||||
result.allocator = make_arena(*result.arena);
|
||||
|
||||
result_data : Result;
|
||||
result_data.path = file_path;
|
||||
@@ -219,7 +220,9 @@ run_lexer_test :: (file_path : string, result : *Compile_Result, output_type : O
|
||||
|
||||
result_text : string;
|
||||
|
||||
add_file(result, file_path);
|
||||
result.file = make_file(result, file_path);
|
||||
result.allocator = make_arena(*result.arena);
|
||||
|
||||
lex(result);
|
||||
if result.had_error {
|
||||
result_data.type = .Failed;
|
||||
@@ -243,7 +246,8 @@ run_parser_test :: (file_path : string, result : *Compile_Result, output_type :
|
||||
result_data : Result;
|
||||
result_data.path = file_path;
|
||||
|
||||
add_file(result, file_path);
|
||||
result.file = make_file(result, file_path);
|
||||
result.allocator = make_arena(*result.arena);
|
||||
|
||||
lex(result);
|
||||
if result.had_error {
|
||||
@@ -306,7 +310,8 @@ run_semantic_analysis_test :: (result : *Compile_Result, output_type : Output_Ty
|
||||
}
|
||||
|
||||
run_semantic_analysis_test :: (file_path : string, result : *Compile_Result, output_type : Output_Type = 0) -> Result {
|
||||
add_file(result, file_path);
|
||||
result.file = make_file(result, file_path);
|
||||
result.allocator = make_arena(*result.arena);
|
||||
|
||||
result_data : Result;
|
||||
result_data.path = file_path;
|
||||
@@ -334,7 +339,10 @@ make_test_case :: (path : string, stage_flags : Stage_Flags, allocator := contex
|
||||
|
||||
run_test_new :: (file_path : string, stage_flags : Stage_Flags, results : *[..]Result, output_type : Output_Type = 0) {
|
||||
compile_result : Compile_Result;
|
||||
add_file(*compile_result, file_path);
|
||||
|
||||
compile_result.file = make_file(*compile_result, file_path);
|
||||
compile_result.allocator = make_arena(*compile_result.arena);
|
||||
|
||||
result : Result;
|
||||
if stage_flags & .Lexer {
|
||||
result = run_lexer_test(file_path, *compile_result, output_type);
|
||||
|
||||
Reference in New Issue
Block a user