From 541de469081dfb807c80712f8e3c04c62f2031d5 Mon Sep 17 00:00:00 2001 From: Justin Meimar Date: Tue, 28 May 2024 16:58:58 -0600 Subject: [PATCH] Fixed up CI and reorgnized tests --- .../GradeConfig.json} | 2 +- tests/multi_exe_tests/grades.json | 70 ++++++++++++++++++ .../run_tests.sh} | 29 +++----- .../tests}/team1/001.c | 0 .../tests}/team1/002.c | 0 .../tests}/team1/003.c | 0 .../tests}/team2/001.c | 0 .../tests}/team2/002.c | 0 .../tests}/team3/001.c | 0 .../BasicConfig.json} | 2 +- tests/single_exe_tests/MutliStageConfig.json | 31 ++++++++ tests/single_exe_tests/MutliToolchain.json | 51 +++++++++++++ .../run_tests.sh} | 5 +- .../error_tests/001_compile_time_types.c | 27 +++++++ .../tests/error_tests}/002_runtime_math.c | 4 +- .../tests/error_tests/003_runtime_index.c | 28 +++++++ .../tests/invalid_tests}/001_input_exceed.c | 2 +- .../tests/invalid_tests}/002_output_exceed.c | 2 +- .../tests/invalid_tests}/003_file_errror.c | 0 .../invalid_tests}/004_directive_conflict.c | 0 .../invalid_tests}/005_directive_conflict.c | 0 .../invalid_tests/in-stream}/input_exceed.ins | 0 .../out-stream}/output_exceed.out | 0 .../tests/valid_tests}/000_empty.c | 0 .../tests/valid_tests/001_basic.c} | 0 .../tests/valid_tests/002_comment_mixed.c} | 0 .../tests/valid_tests}/003_input_file.c | 2 +- .../tests/valid_tests}/004_check_multi.c | 0 .../tests/valid_tests}/004_multi_nl_space.c | 0 .../valid_tests/005_comment_block_inline.c} | 0 .../tests/valid_tests}/006_check_newline.c | 0 .../tests/valid_tests/006_comment_mixed2.c} | 0 .../tests/valid_tests/007_string_escape.c} | 0 .../tests/valid_tests}/008_escape_seq.c | 2 +- .../tests/valid_tests}/009_tab_newline.c | 2 +- .../tests/valid_tests/010_newline_check.c} | 0 .../tests/valid_tests/011_empty_check.c} | 0 .../tests/valid_tests/012_space_check.c} | 0 .../tests/valid_tests/013_io_multi.c} | 0 .../in-stream}/002_input_multi.ins | 0 .../valid_tests/in-stream}/003_input_file.ins | 0 .../tests/valid_tests/out-stream}/002.out | 0 .../out-stream}/008_escape_seq.out | 0 .../out-stream}/009_tab_newline.out | 0 .../errors/001_compile_time_types.c | 18 ----- tests/user_tests/io/a.out | Bin 16072 -> 0 bytes 46 files changed, 229 insertions(+), 48 deletions(-) rename tests/{GradeTestConfig.json => multi_exe_tests/GradeConfig.json} (95%) create mode 100644 tests/multi_exe_tests/grades.json rename tests/{run_grader_tests.sh => multi_exe_tests/run_tests.sh} (59%) rename tests/{grade_tests => multi_exe_tests/tests}/team1/001.c (100%) rename tests/{grade_tests => multi_exe_tests/tests}/team1/002.c (100%) rename tests/{grade_tests => multi_exe_tests/tests}/team1/003.c (100%) rename tests/{grade_tests => multi_exe_tests/tests}/team2/001.c (100%) rename tests/{grade_tests => multi_exe_tests/tests}/team2/002.c (100%) rename tests/{grade_tests => multi_exe_tests/tests}/team3/001.c (100%) rename tests/{UserTestConfig.json => single_exe_tests/BasicConfig.json} (95%) create mode 100644 tests/single_exe_tests/MutliStageConfig.json create mode 100644 tests/single_exe_tests/MutliToolchain.json rename tests/{run_user_tests.sh => single_exe_tests/run_tests.sh} (84%) create mode 100644 tests/single_exe_tests/tests/error_tests/001_compile_time_types.c rename tests/{user_tests/errors => single_exe_tests/tests/error_tests}/002_runtime_math.c (97%) create mode 100644 tests/single_exe_tests/tests/error_tests/003_runtime_index.c rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests}/001_input_exceed.c (68%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests}/002_output_exceed.c (70%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests}/003_file_errror.c (100%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests}/004_directive_conflict.c (100%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests}/005_directive_conflict.c (100%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests/in-stream}/input_exceed.ins (100%) rename tests/{user_tests/invalid => single_exe_tests/tests/invalid_tests/out-stream}/output_exceed.out (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/000_empty.c (100%) rename tests/{user_tests/io/001_basic_clang.c => single_exe_tests/tests/valid_tests/001_basic.c} (100%) rename tests/{user_tests/comments/003_comment_mixed.c => single_exe_tests/tests/valid_tests/002_comment_mixed.c} (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/003_input_file.c (90%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/004_check_multi.c (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/004_multi_nl_space.c (100%) rename tests/{user_tests/comments/004_comment_block_inline.c => single_exe_tests/tests/valid_tests/005_comment_block_inline.c} (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/006_check_newline.c (100%) rename tests/{user_tests/comments/005_comment_mixed2.c => single_exe_tests/tests/valid_tests/006_comment_mixed2.c} (100%) rename tests/{user_tests/comments/006_string_esc.c => single_exe_tests/tests/valid_tests/007_string_escape.c} (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/008_escape_seq.c (50%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests}/009_tab_newline.c (63%) rename tests/{user_tests/io/007_newline_space.c => single_exe_tests/tests/valid_tests/010_newline_check.c} (100%) rename tests/{user_tests/comments/001_comment_line.c => single_exe_tests/tests/valid_tests/011_empty_check.c} (100%) rename tests/{user_tests/io/005_check_space.c => single_exe_tests/tests/valid_tests/012_space_check.c} (100%) rename tests/{user_tests/io/002_input_multi.c => single_exe_tests/tests/valid_tests/013_io_multi.c} (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests/in-stream}/002_input_multi.ins (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests/in-stream}/003_input_file.ins (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests/out-stream}/002.out (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests/out-stream}/008_escape_seq.out (100%) rename tests/{user_tests/io => single_exe_tests/tests/valid_tests/out-stream}/009_tab_newline.out (100%) delete mode 100644 tests/user_tests/errors/001_compile_time_types.c delete mode 100755 tests/user_tests/io/a.out diff --git a/tests/GradeTestConfig.json b/tests/multi_exe_tests/GradeConfig.json similarity index 95% rename from tests/GradeTestConfig.json rename to tests/multi_exe_tests/GradeConfig.json index 654cb512..4cd9c904 100644 --- a/tests/GradeTestConfig.json +++ b/tests/multi_exe_tests/GradeConfig.json @@ -1,5 +1,5 @@ { - "testDir": "grade_tests/", + "testDir": "tests", "testedExecutablePaths": { "team1": "/usr/bin/clang", "team2": "/usr/bin/clang", diff --git a/tests/multi_exe_tests/grades.json b/tests/multi_exe_tests/grades.json new file mode 100644 index 00000000..8aacc481 --- /dev/null +++ b/tests/multi_exe_tests/grades.json @@ -0,0 +1,70 @@ +[ + { + "results": [ + { + "attacker": "team1", + "defender": "team1", + "passCount": 3, + "testCount": 3, + "timings": [] + }, + { + "attacker": "team2", + "defender": "team1", + "passCount": 2, + "testCount": 2, + "timings": [] + }, + { + "attacker": "team3", + "defender": "team1", + "passCount": 1, + "testCount": 1, + "timings": [] + }, + { + "attacker": "team1", + "defender": "team2", + "passCount": 3, + "testCount": 3, + "timings": [] + }, + { + "attacker": "team2", + "defender": "team2", + "passCount": 2, + "testCount": 2, + "timings": [] + }, + { + "attacker": "team3", + "defender": "team2", + "passCount": 1, + "testCount": 1, + "timings": [] + }, + { + "attacker": "team1", + "defender": "team3", + "passCount": 3, + "testCount": 3, + "timings": [] + }, + { + "attacker": "team2", + "defender": "team3", + "passCount": 2, + "testCount": 2, + "timings": [] + }, + { + "attacker": "team3", + "defender": "team3", + "passCount": 1, + "testCount": 1, + "timings": [] + } + ], + "toolchain": "LLVM" + } +] \ No newline at end of file diff --git a/tests/run_grader_tests.sh b/tests/multi_exe_tests/run_tests.sh similarity index 59% rename from tests/run_grader_tests.sh rename to tests/multi_exe_tests/run_tests.sh index 0348a39b..8c70c203 100755 --- a/tests/run_grader_tests.sh +++ b/tests/multi_exe_tests/run_tests.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -PROJECT_BASE="$SCRIPT_DIR/.." +PROJECT_BASE="$SCRIPT_DIR/../.." echo "Project Base: $PROJECT_BASE" @@ -23,30 +23,21 @@ fi # we need to be in the test dir to run tests cd $SCRIPT_DIR -echo "Tests passed." +$PROJECT_BASE/bin/tester $SCRIPT_DIR/GradeConfig.json --grade $SCRIPT_DIR/grades.json status=$? if [ $status -eq 0 ]; then echo "Passed tests with status: $status" + if [ -e $SCRIPT_DIR/grades.json ]; then + echo "Grade JSON successfuly created" + exit 0 + else + echo "Failed to output grade JSON" + exit 1 + fi else echo "Failed tester with exit status: $status" fi -exit $status - -# TODO: Determine how to assess the output of a grading run -# in CI. - -# run C tests -# $PROJECT_BASE/bin/tester $SCRIPT_DIR/GradeTestConfig.json --grade grades.csv - -# status=$? - -# if [ $status -eq 0 ]; then -# echo "Passed tests with status: $status" -# else -# echo "Failed tester with exit status: $status" -# fi - -# exit $status +exit 1 diff --git a/tests/grade_tests/team1/001.c b/tests/multi_exe_tests/tests/team1/001.c similarity index 100% rename from tests/grade_tests/team1/001.c rename to tests/multi_exe_tests/tests/team1/001.c diff --git a/tests/grade_tests/team1/002.c b/tests/multi_exe_tests/tests/team1/002.c similarity index 100% rename from tests/grade_tests/team1/002.c rename to tests/multi_exe_tests/tests/team1/002.c diff --git a/tests/grade_tests/team1/003.c b/tests/multi_exe_tests/tests/team1/003.c similarity index 100% rename from tests/grade_tests/team1/003.c rename to tests/multi_exe_tests/tests/team1/003.c diff --git a/tests/grade_tests/team2/001.c b/tests/multi_exe_tests/tests/team2/001.c similarity index 100% rename from tests/grade_tests/team2/001.c rename to tests/multi_exe_tests/tests/team2/001.c diff --git a/tests/grade_tests/team2/002.c b/tests/multi_exe_tests/tests/team2/002.c similarity index 100% rename from tests/grade_tests/team2/002.c rename to tests/multi_exe_tests/tests/team2/002.c diff --git a/tests/grade_tests/team3/001.c b/tests/multi_exe_tests/tests/team3/001.c similarity index 100% rename from tests/grade_tests/team3/001.c rename to tests/multi_exe_tests/tests/team3/001.c diff --git a/tests/UserTestConfig.json b/tests/single_exe_tests/BasicConfig.json similarity index 95% rename from tests/UserTestConfig.json rename to tests/single_exe_tests/BasicConfig.json index a23e7f39..da269a88 100644 --- a/tests/UserTestConfig.json +++ b/tests/single_exe_tests/BasicConfig.json @@ -1,5 +1,5 @@ { - "testDir": "user_tests/", + "testDir": "tests", "testedExecutablePaths": { "clang": "/usr/bin/clang" }, diff --git a/tests/single_exe_tests/MutliStageConfig.json b/tests/single_exe_tests/MutliStageConfig.json new file mode 100644 index 00000000..f3d6dd2c --- /dev/null +++ b/tests/single_exe_tests/MutliStageConfig.json @@ -0,0 +1,31 @@ +{ + "testDir": "tests", + "testedExecutablePaths": { + "clang": "/usr/bin/clang" + }, + "toolchains": { + "LLVM": [ + { + "stepName": "compile", + "executablePath": "$EXE", + "arguments": [ + "$INPUT", + "-Wno-everything", + "-fno-show-column", + "-fno-show-source-location", + "-o", "$OUTPUT" + ], + "output": "test", + "allowError": true + }, + { + "stepName": "run", + "executablePath": "$INPUT", + "arguments": [], + "output": "-", + "usesInStr": true, + "allowError": true + } + ] + } +} \ No newline at end of file diff --git a/tests/single_exe_tests/MutliToolchain.json b/tests/single_exe_tests/MutliToolchain.json new file mode 100644 index 00000000..af53e955 --- /dev/null +++ b/tests/single_exe_tests/MutliToolchain.json @@ -0,0 +1,51 @@ +{ + "testDir": "tests", + "testedExecutablePaths": { + "clang": "/usr/bin/clang" + }, + "toolchains": { + "LLVM": [ + { + "stepName": "compile", + "executablePath": "$EXE", + "arguments": [ + "$INPUT", + "-Wno-everything", + "-fno-show-column", + "-fno-show-source-location", + "-o", "$OUTPUT" + ], + "output": "test", + "allowError": true + }, + { + "stepName": "run", + "executablePath": "$INPUT", + "arguments": [], + "output": "-", + "usesInStr": true, + "allowError": true + } + ] + }, + "GNU": [ + { + "stepName": "compile", + "executablePath": "$EXE", + "arguments": [ + "$INPUT", + "-o", "$OUTPUT" + ], + "output": "test", + "allowError": true + }, + { + "stepName": "run", + "executablePath": "$INPUT", + "arguments": [], + "output": "-", + "usesInStr": true, + "allowError": true + } + ] +} diff --git a/tests/run_user_tests.sh b/tests/single_exe_tests/run_tests.sh similarity index 84% rename from tests/run_user_tests.sh rename to tests/single_exe_tests/run_tests.sh index 61624163..1d150e6d 100755 --- a/tests/run_user_tests.sh +++ b/tests/single_exe_tests/run_tests.sh @@ -1,7 +1,8 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -PROJECT_BASE="$SCRIPT_DIR/.." +PROJECT_BASE="$SCRIPT_DIR/../.." +TEST_CONFIG="$SCRIPT_DIR/BasicConfig.json" echo "Project Base: $PROJECT_BASE" @@ -24,7 +25,7 @@ fi cd $SCRIPT_DIR # run C tests -$PROJECT_BASE/bin/tester $SCRIPT_DIR/UserTestConfig.json +$PROJECT_BASE/bin/tester $TEST_CONFIG status=$? diff --git a/tests/single_exe_tests/tests/error_tests/001_compile_time_types.c b/tests/single_exe_tests/tests/error_tests/001_compile_time_types.c new file mode 100644 index 00000000..3740db76 --- /dev/null +++ b/tests/single_exe_tests/tests/error_tests/001_compile_time_types.c @@ -0,0 +1,27 @@ +#define TYPE_ERROR 0 + +typedef struct Apple{ + char a[5]; +} Apple; + +typedef struct Banana { + char b[6]; +} Banana ; + +int main() { + + Apple a = { "apple" }; + Banana b = { "banana" }; + +#if TYPE_ERROR + a = b; +#else + // We will emulate the type error to match the Error Test Specification + printf("TypeError on line 17: Assigning Banana to Apple."); + exit(1); +#endif + + return 0; +} + +// CHECK:TypeError on line 17 diff --git a/tests/user_tests/errors/002_runtime_math.c b/tests/single_exe_tests/tests/error_tests/002_runtime_math.c similarity index 97% rename from tests/user_tests/errors/002_runtime_math.c rename to tests/single_exe_tests/tests/error_tests/002_runtime_math.c index 511a5658..a6a079e6 100644 --- a/tests/user_tests/errors/002_runtime_math.c +++ b/tests/single_exe_tests/tests/error_tests/002_runtime_math.c @@ -15,8 +15,8 @@ int main() { } else { fprintf(stderr, "DivideByZeroError: a was about to be divided by 0!"); exit(EXIT_DIVIDE_BY_ZERO); - } - + } + return 0; } diff --git a/tests/single_exe_tests/tests/error_tests/003_runtime_index.c b/tests/single_exe_tests/tests/error_tests/003_runtime_index.c new file mode 100644 index 00000000..f00654e9 --- /dev/null +++ b/tests/single_exe_tests/tests/error_tests/003_runtime_index.c @@ -0,0 +1,28 @@ +#define OUT_OF_BOUNDS_ERROR 0 + + +// INPUT:9 +int main() { + + char c; + scanf("%c", &c); + + int x = (unsigned int)(c) - '0'; + int a[5] = {1, 2, 3, 4, 5}; + + if (x < 5 && x >= 0) { + printf("%d", a[x]); + } else { + // We will emulate the IndexError to match "Error Test Spec" since + // C will just let us poke around. + printf("IndexError: Don't do that! (The text past the first\ + colon is implementation specific so is not picked up by the tester)"); + + exit(1); + } + + + return 0; +} + +// CHECK:IndexError \ No newline at end of file diff --git a/tests/user_tests/invalid/001_input_exceed.c b/tests/single_exe_tests/tests/invalid_tests/001_input_exceed.c similarity index 68% rename from tests/user_tests/invalid/001_input_exceed.c rename to tests/single_exe_tests/tests/invalid_tests/001_input_exceed.c index 575faba2..e3b577e4 100644 --- a/tests/user_tests/invalid/001_input_exceed.c +++ b/tests/single_exe_tests/tests/invalid_tests/001_input_exceed.c @@ -1,4 +1,4 @@ -//INPUT_FILE:input_exceed.ins +//INPUT_FILE:./in-stream/input_exceed.ins #include diff --git a/tests/user_tests/invalid/002_output_exceed.c b/tests/single_exe_tests/tests/invalid_tests/002_output_exceed.c similarity index 70% rename from tests/user_tests/invalid/002_output_exceed.c rename to tests/single_exe_tests/tests/invalid_tests/002_output_exceed.c index bedac28d..898db4df 100644 --- a/tests/user_tests/invalid/002_output_exceed.c +++ b/tests/single_exe_tests/tests/invalid_tests/002_output_exceed.c @@ -1,4 +1,4 @@ -//CHECK_FILE:output_exceed.out +//CHECK_FILE:./out-stream/output_exceed.out #include diff --git a/tests/user_tests/invalid/003_file_errror.c b/tests/single_exe_tests/tests/invalid_tests/003_file_errror.c similarity index 100% rename from tests/user_tests/invalid/003_file_errror.c rename to tests/single_exe_tests/tests/invalid_tests/003_file_errror.c diff --git a/tests/user_tests/invalid/004_directive_conflict.c b/tests/single_exe_tests/tests/invalid_tests/004_directive_conflict.c similarity index 100% rename from tests/user_tests/invalid/004_directive_conflict.c rename to tests/single_exe_tests/tests/invalid_tests/004_directive_conflict.c diff --git a/tests/user_tests/invalid/005_directive_conflict.c b/tests/single_exe_tests/tests/invalid_tests/005_directive_conflict.c similarity index 100% rename from tests/user_tests/invalid/005_directive_conflict.c rename to tests/single_exe_tests/tests/invalid_tests/005_directive_conflict.c diff --git a/tests/user_tests/invalid/input_exceed.ins b/tests/single_exe_tests/tests/invalid_tests/in-stream/input_exceed.ins similarity index 100% rename from tests/user_tests/invalid/input_exceed.ins rename to tests/single_exe_tests/tests/invalid_tests/in-stream/input_exceed.ins diff --git a/tests/user_tests/invalid/output_exceed.out b/tests/single_exe_tests/tests/invalid_tests/out-stream/output_exceed.out similarity index 100% rename from tests/user_tests/invalid/output_exceed.out rename to tests/single_exe_tests/tests/invalid_tests/out-stream/output_exceed.out diff --git a/tests/user_tests/io/000_empty.c b/tests/single_exe_tests/tests/valid_tests/000_empty.c similarity index 100% rename from tests/user_tests/io/000_empty.c rename to tests/single_exe_tests/tests/valid_tests/000_empty.c diff --git a/tests/user_tests/io/001_basic_clang.c b/tests/single_exe_tests/tests/valid_tests/001_basic.c similarity index 100% rename from tests/user_tests/io/001_basic_clang.c rename to tests/single_exe_tests/tests/valid_tests/001_basic.c diff --git a/tests/user_tests/comments/003_comment_mixed.c b/tests/single_exe_tests/tests/valid_tests/002_comment_mixed.c similarity index 100% rename from tests/user_tests/comments/003_comment_mixed.c rename to tests/single_exe_tests/tests/valid_tests/002_comment_mixed.c diff --git a/tests/user_tests/io/003_input_file.c b/tests/single_exe_tests/tests/valid_tests/003_input_file.c similarity index 90% rename from tests/user_tests/io/003_input_file.c rename to tests/single_exe_tests/tests/valid_tests/003_input_file.c index a0d6721b..41284e5c 100644 --- a/tests/user_tests/io/003_input_file.c +++ b/tests/single_exe_tests/tests/valid_tests/003_input_file.c @@ -1,4 +1,4 @@ -// INPUT_FILE:./003_input_file.ins +// INPUT_FILE:./in-stream/003_input_file.ins #include diff --git a/tests/user_tests/io/004_check_multi.c b/tests/single_exe_tests/tests/valid_tests/004_check_multi.c similarity index 100% rename from tests/user_tests/io/004_check_multi.c rename to tests/single_exe_tests/tests/valid_tests/004_check_multi.c diff --git a/tests/user_tests/io/004_multi_nl_space.c b/tests/single_exe_tests/tests/valid_tests/004_multi_nl_space.c similarity index 100% rename from tests/user_tests/io/004_multi_nl_space.c rename to tests/single_exe_tests/tests/valid_tests/004_multi_nl_space.c diff --git a/tests/user_tests/comments/004_comment_block_inline.c b/tests/single_exe_tests/tests/valid_tests/005_comment_block_inline.c similarity index 100% rename from tests/user_tests/comments/004_comment_block_inline.c rename to tests/single_exe_tests/tests/valid_tests/005_comment_block_inline.c diff --git a/tests/user_tests/io/006_check_newline.c b/tests/single_exe_tests/tests/valid_tests/006_check_newline.c similarity index 100% rename from tests/user_tests/io/006_check_newline.c rename to tests/single_exe_tests/tests/valid_tests/006_check_newline.c diff --git a/tests/user_tests/comments/005_comment_mixed2.c b/tests/single_exe_tests/tests/valid_tests/006_comment_mixed2.c similarity index 100% rename from tests/user_tests/comments/005_comment_mixed2.c rename to tests/single_exe_tests/tests/valid_tests/006_comment_mixed2.c diff --git a/tests/user_tests/comments/006_string_esc.c b/tests/single_exe_tests/tests/valid_tests/007_string_escape.c similarity index 100% rename from tests/user_tests/comments/006_string_esc.c rename to tests/single_exe_tests/tests/valid_tests/007_string_escape.c diff --git a/tests/user_tests/io/008_escape_seq.c b/tests/single_exe_tests/tests/valid_tests/008_escape_seq.c similarity index 50% rename from tests/user_tests/io/008_escape_seq.c rename to tests/single_exe_tests/tests/valid_tests/008_escape_seq.c index e0e735c7..40889bee 100644 --- a/tests/user_tests/io/008_escape_seq.c +++ b/tests/single_exe_tests/tests/valid_tests/008_escape_seq.c @@ -3,4 +3,4 @@ int main() { printf("\tafter the tab"); } -//CHECK_FILE:008_escape_seq.out \ No newline at end of file +//CHECK_FILE:./out-stream/008_escape_seq.out \ No newline at end of file diff --git a/tests/user_tests/io/009_tab_newline.c b/tests/single_exe_tests/tests/valid_tests/009_tab_newline.c similarity index 63% rename from tests/user_tests/io/009_tab_newline.c rename to tests/single_exe_tests/tests/valid_tests/009_tab_newline.c index cd907304..92d49d89 100644 --- a/tests/user_tests/io/009_tab_newline.c +++ b/tests/single_exe_tests/tests/valid_tests/009_tab_newline.c @@ -6,4 +6,4 @@ int main() { return 0; } -// CHECK_FILE:009_tab_newline.out \ No newline at end of file +// CHECK_FILE:./out-stream/009_tab_newline.out \ No newline at end of file diff --git a/tests/user_tests/io/007_newline_space.c b/tests/single_exe_tests/tests/valid_tests/010_newline_check.c similarity index 100% rename from tests/user_tests/io/007_newline_space.c rename to tests/single_exe_tests/tests/valid_tests/010_newline_check.c diff --git a/tests/user_tests/comments/001_comment_line.c b/tests/single_exe_tests/tests/valid_tests/011_empty_check.c similarity index 100% rename from tests/user_tests/comments/001_comment_line.c rename to tests/single_exe_tests/tests/valid_tests/011_empty_check.c diff --git a/tests/user_tests/io/005_check_space.c b/tests/single_exe_tests/tests/valid_tests/012_space_check.c similarity index 100% rename from tests/user_tests/io/005_check_space.c rename to tests/single_exe_tests/tests/valid_tests/012_space_check.c diff --git a/tests/user_tests/io/002_input_multi.c b/tests/single_exe_tests/tests/valid_tests/013_io_multi.c similarity index 100% rename from tests/user_tests/io/002_input_multi.c rename to tests/single_exe_tests/tests/valid_tests/013_io_multi.c diff --git a/tests/user_tests/io/002_input_multi.ins b/tests/single_exe_tests/tests/valid_tests/in-stream/002_input_multi.ins similarity index 100% rename from tests/user_tests/io/002_input_multi.ins rename to tests/single_exe_tests/tests/valid_tests/in-stream/002_input_multi.ins diff --git a/tests/user_tests/io/003_input_file.ins b/tests/single_exe_tests/tests/valid_tests/in-stream/003_input_file.ins similarity index 100% rename from tests/user_tests/io/003_input_file.ins rename to tests/single_exe_tests/tests/valid_tests/in-stream/003_input_file.ins diff --git a/tests/user_tests/io/002.out b/tests/single_exe_tests/tests/valid_tests/out-stream/002.out similarity index 100% rename from tests/user_tests/io/002.out rename to tests/single_exe_tests/tests/valid_tests/out-stream/002.out diff --git a/tests/user_tests/io/008_escape_seq.out b/tests/single_exe_tests/tests/valid_tests/out-stream/008_escape_seq.out similarity index 100% rename from tests/user_tests/io/008_escape_seq.out rename to tests/single_exe_tests/tests/valid_tests/out-stream/008_escape_seq.out diff --git a/tests/user_tests/io/009_tab_newline.out b/tests/single_exe_tests/tests/valid_tests/out-stream/009_tab_newline.out similarity index 100% rename from tests/user_tests/io/009_tab_newline.out rename to tests/single_exe_tests/tests/valid_tests/out-stream/009_tab_newline.out diff --git a/tests/user_tests/errors/001_compile_time_types.c b/tests/user_tests/errors/001_compile_time_types.c deleted file mode 100644 index ea8c43dc..00000000 --- a/tests/user_tests/errors/001_compile_time_types.c +++ /dev/null @@ -1,18 +0,0 @@ -typedef struct Apple{ - char a[5]; -} Apple; - -typedef struct Banana { - char b[6]; -} Banana ; - -int main() { - - Apple a = { "apple" }; - Banana b = { "banana" }; - a = b; - - return 0; -} - -//CHECK:error: \ No newline at end of file diff --git a/tests/user_tests/io/a.out b/tests/user_tests/io/a.out deleted file mode 100755 index 8e88da2771590d9296029c77907ed00c00e8d0de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16072 zcmeHOYit}>6~2BY4oza`?IfjHL4w*wo~#|`Rb;Y>z0SDgMdFAcL8s&0wRhEhnB7@w z7ibd#sBUU0{X<(pMT$gYQ6%yMK`NovQPYG}0wqF7K}aYCA~`5P5+F^e$a2oy^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