From e73ed56231fc14d99e6185902c95a9df13f00cfb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 15 Jun 2020 10:58:34 +0300 Subject: [PATCH] tests: add parser/tests/, move checker_test.v=>compiler_errors_test.v --- vlib/v/{checker/checker_test.v => compiler_errors_test.v} | 3 +++ vlib/v/parser/tests/README.md | 1 + 2 files changed, 4 insertions(+) rename vlib/v/{checker/checker_test.v => compiler_errors_test.v} (92%) create mode 100644 vlib/v/parser/tests/README.md diff --git a/vlib/v/checker/checker_test.v b/vlib/v/compiler_errors_test.v similarity index 92% rename from vlib/v/checker/checker_test.v rename to vlib/v/compiler_errors_test.v index d6cabcd474..1255ccfd34 100644 --- a/vlib/v/checker/checker_test.v +++ b/vlib/v/compiler_errors_test.v @@ -12,11 +12,14 @@ fn test_all() { global_tests := get_tests_in_dir(global_dir) run_dir := '$classic_dir/run' run_tests := get_tests_in_dir(run_dir) + parser_dir := 'vlib/v/parser/tests' + parser_tests := get_tests_in_dir(parser_dir) // -prod so that warns are errors total_errors += check_path(vexe, classic_dir, '-prod', '.out', classic_tests) total_errors += check_path(vexe, global_dir, '--enable-globals', '.out', global_tests) total_errors += check_path(vexe, classic_dir, '--enable-globals run', '.run.out', ['globals_error.vv']) total_errors += check_path(vexe, run_dir, 'run', '.run.out', run_tests) + total_errors += check_path(vexe, parser_dir, '-prod', '.out', parser_tests) assert total_errors == 0 } diff --git a/vlib/v/parser/tests/README.md b/vlib/v/parser/tests/README.md new file mode 100644 index 0000000000..7547a55634 --- /dev/null +++ b/vlib/v/parser/tests/README.md @@ -0,0 +1 @@ +Put here tests, ensuring that the v's parser errors for certain situations.