Simplified shader test output
This commit is contained in:
44
Test.jai
44
Test.jai
@@ -310,8 +310,8 @@ run_semantic_analysis_test :: (file_path : string, root : *AST_Node, output_type
|
||||
result_text = pretty_print_symbol_table(*checker, temp);
|
||||
constraints := pretty_print_type_constraints(*checker, temp);
|
||||
type_vars := pretty_print_type_variables(*checker, temp);
|
||||
print("Constraints\n%\n", constraints);
|
||||
print("Solution\n%\n", type_vars);
|
||||
// print("Constraints\n%\n", constraints);
|
||||
// print("Solution\n%\n", type_vars);
|
||||
}
|
||||
|
||||
if output_type & .StdOut {
|
||||
@@ -477,7 +477,23 @@ run_test :: (file_path : string, stage_flags : Stage_Flags, results : *[..]Resul
|
||||
}
|
||||
|
||||
run_test :: (test_case : Test_Case, results : *[..]Result, output_type : Output_Type = 0) {
|
||||
print("%Running test: %\n", cyan(), test_case.path);
|
||||
print("%Running test: %......", cyan(), test_case.path);
|
||||
|
||||
// path 30
|
||||
// len 35
|
||||
// == 5
|
||||
|
||||
|
||||
// path 20
|
||||
// len = 35
|
||||
// == 15
|
||||
|
||||
len := 50;
|
||||
rest := len - test_case.path.count;
|
||||
for i: 0..rest {
|
||||
print(" ");
|
||||
}
|
||||
|
||||
run_test(test_case.path, test_case.stage_flags, results, output_type);
|
||||
}
|
||||
|
||||
@@ -525,7 +541,7 @@ run_test_suite :: (using suite : *Test_Suite, output_type : Output_Type = 0) {
|
||||
}
|
||||
}
|
||||
|
||||
print("\n");
|
||||
// print("\n");
|
||||
}
|
||||
print("\n");
|
||||
|
||||
@@ -620,26 +636,26 @@ evaluate_result :: (result : Result) {
|
||||
|
||||
if #complete result.type == {
|
||||
case .File_Read_Failed; {
|
||||
print("%", red());
|
||||
print("% failed with File_Read_Failed\n", result.path);
|
||||
print(" %", red());
|
||||
print("failed with File_Read_Failed\n");
|
||||
}
|
||||
case .Golden_File_Not_Found; {
|
||||
print("%", red());
|
||||
print("% failed with Golden File Not Found for stage %\n", result.path, stage);
|
||||
print(" %", red());
|
||||
print("failed with Golden File Not Found for stage %\n", stage);
|
||||
}
|
||||
case .StdOut; {
|
||||
}
|
||||
case .Golden_Output; {
|
||||
print("%", yellow());
|
||||
print("% output new golden file at %\n", result.path, result.golden_path);
|
||||
print(" %", yellow());
|
||||
print("output new golden file at %\n", result.golden_path);
|
||||
}
|
||||
case .Passed; {
|
||||
print("%", green());
|
||||
print("% passed %\n", result.path, stage);
|
||||
print(" %", green());
|
||||
print("passed %\n", stage);
|
||||
}
|
||||
case .Failed; {
|
||||
print("%", red());
|
||||
print("% failed %\n", result.path, stage);
|
||||
print(" %", red());
|
||||
print("failed %\n", stage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user