Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use V 0.4.8 #71

Merged
merged 2 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17 as install

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Tests

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# The official vlang -dev images are currently well behind the mainstream version of V, and cannot
# be pinned to a known version. Alas, the official installation instructions involve a makefile
Expand All @@ -6,7 +6,7 @@
# However, pre-built releases are now available, which is a reliable route for our purposes.

# Specify the release of V to download.
ARG release_tag=weekly.2024.22
ARG release_tag=0.4.8
ARG release_filename=v_linux.zip

WORKDIR /opt/vlang
Expand Down
2 changes: 1 addition & 1 deletion tests/example-all-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "---- Testing... ----------------------------------------------------------------\nrunning tests in: /opt/test-runner/tests/example-all-fail/run_test.v\n/opt/test-runner/tests/example-all-fail/run_test.v:4: fn test_not_divisible_by_4\n assert !is_leap_year(2015)\n\n FAIL [1/9]1 assert | main.test_not_divisible_by_4()\n/opt/test-runner/tests/example-all-fail/run_test.v:8: fn test_divisible_by_2_not_by_4\n assert !is_leap_year(1970)\n\n FAIL [2/9]1 assert | main.test_divisible_by_2_not_by_4()\n/opt/test-runner/tests/example-all-fail/run_test.v:12: fn test_divisible_by_4_not_by_100\n assert is_leap_year(1996)\n\n FAIL [3/9]1 assert | main.test_divisible_by_4_not_by_100()\n/opt/test-runner/tests/example-all-fail/run_test.v:16: fn test_divisible_by_4_and_5\n assert is_leap_year(1960)\n\n FAIL [4/9]1 assert | main.test_divisible_by_4_and_5()\n/opt/test-runner/tests/example-all-fail/run_test.v:20: fn test_divisible_by_100_not_by_400\n assert !is_leap_year(2100)\n\n FAIL [5/9]1 assert | main.test_divisible_by_100_not_by_400()\n/opt/test-runner/tests/example-all-fail/run_test.v:24: fn test_divisible_by_100_not_by_3\n assert !is_leap_year(1900)\n\n FAIL [6/9]1 assert | main.test_divisible_by_100_not_by_3()\n/opt/test-runner/tests/example-all-fail/run_test.v:28: fn test_divisible_by_400\n assert is_leap_year(2000)\n\n FAIL [7/9]1 assert | main.test_divisible_by_400()\n/opt/test-runner/tests/example-all-fail/run_test.v:32: fn test_divisible_by_100_not_by_125\n assert is_leap_year(2400)\n\n FAIL [8/9]1 assert | main.test_divisible_by_100_not_by_125()\n/opt/test-runner/tests/example-all-fail/run_test.v:36: fn test_divisible_by_200_not_by_400\n assert !is_leap_year(1800)\n\n FAIL [9/9]1 assert | main.test_divisible_by_200_not_by_400()\n Summary for running V tests in \"run_test.v\": 9 failed, 9 total. Elapsed time:.\n V source code size:,, 235 types, 11 modules, 123 files\ngenerated target code size:,\ncompilation took:, compilation speed:/s\n\n--------------------------------------------------------------------------------\nFailed command 1: '/opt/vlang/v' -stats -o '/tmp/tsession/0_0/run_test' '/opt/test-runner/tests/example-all-fail/run_test.v'\nSummary for all V _test.v files: 1 failed, 1 total.Comptime:. Runtime:."
"message": "---- Testing... ----------------------------------------------------------------\nrunning tests in: /opt/test-runner/tests/example-all-fail/run_test.v\n/opt/test-runner/tests/example-all-fail/run_test.v:4: fn test_not_divisible_by_4\n assert !is_leap_year(2015)\n\n FAIL [1/9]1 assert | main.test_not_divisible_by_4()\n/opt/test-runner/tests/example-all-fail/run_test.v:8: fn test_divisible_by_2_not_by_4\n assert !is_leap_year(1970)\n\n FAIL [2/9]1 assert | main.test_divisible_by_2_not_by_4()\n/opt/test-runner/tests/example-all-fail/run_test.v:12: fn test_divisible_by_4_not_by_100\n assert is_leap_year(1996)\n\n FAIL [3/9]1 assert | main.test_divisible_by_4_not_by_100()\n/opt/test-runner/tests/example-all-fail/run_test.v:16: fn test_divisible_by_4_and_5\n assert is_leap_year(1960)\n\n FAIL [4/9]1 assert | main.test_divisible_by_4_and_5()\n/opt/test-runner/tests/example-all-fail/run_test.v:20: fn test_divisible_by_100_not_by_400\n assert !is_leap_year(2100)\n\n FAIL [5/9]1 assert | main.test_divisible_by_100_not_by_400()\n/opt/test-runner/tests/example-all-fail/run_test.v:24: fn test_divisible_by_100_not_by_3\n assert !is_leap_year(1900)\n\n FAIL [6/9]1 assert | main.test_divisible_by_100_not_by_3()\n/opt/test-runner/tests/example-all-fail/run_test.v:28: fn test_divisible_by_400\n assert is_leap_year(2000)\n\n FAIL [7/9]1 assert | main.test_divisible_by_400()\n/opt/test-runner/tests/example-all-fail/run_test.v:32: fn test_divisible_by_100_not_by_125\n assert is_leap_year(2400)\n\n FAIL [8/9]1 assert | main.test_divisible_by_100_not_by_125()\n/opt/test-runner/tests/example-all-fail/run_test.v:36: fn test_divisible_by_200_not_by_400\n assert !is_leap_year(1800)\n\n FAIL [9/9]1 assert | main.test_divisible_by_200_not_by_400()\n Summary for running V tests in \"run_test.v\": 9 failed, 9 total. Elapsed time:.\n V source code size:,, 267 types, 12 modules, 128 files\ngenerated target code size:,\ncompilation took:, compilation speed:/s\n\n--------------------------------------------------------------------------------\nFailed command 1: '/opt/vlang/v' -stats -o '/tmp/tsession/0_0/run_test' '/opt/test-runner/tests/example-all-fail/run_test.v'\nSummary for all V _test.v files: 1 failed, 1 total.Comptime:. Runtime:."
}
2 changes: 1 addition & 1 deletion tests/example-empty-file/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "error",
"message": "---- Testing... ----------------------------------------------------------------\nrun_test.v:4:10: error: unknown function: is_leap_year\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ~~~~~~~~~~~~~~~~~~\n 5 | }\n 6 |\nrun_test.v:4:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ^\n 5 | }\n 6 |\nrun_test.v:4:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ~~~~~~~~~~~~~~~~~~~\n 5 | }\n 6 |\nrun_test.v:8:10: error: unknown function: is_leap_year\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ~~~~~~~~~~~~~~~~~~\n 9 | }\n 10 |\nrun_test.v:8:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ^\n 9 | }\n 10 |\nrun_test.v:8:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ~~~~~~~~~~~~~~~~~~~\n 9 | }\n 10 |\nrun_test.v:12:9: error: unknown function: is_leap_year\n 10 | \n 11 | fn test_divisible_by_4_not_by_100() {\n 12 | assert is_leap_year(1996)\n | ~~~~~~~~~~~~~~~~~~\n 13 | }\n 14 |\nrun_test.v:12:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 10 | \n 11 | fn test_divisible_by_4_not_by_100() {\n 12 | assert is_leap_year(1996)\n | ~~~~~~~~~~~~~~~~~~\n 13 | }\n 14 |\nrun_test.v:16:9: error: unknown function: is_leap_year\n 14 | \n 15 | fn test_divisible_by_4_and_5() {\n 16 | assert is_leap_year(1960)\n | ~~~~~~~~~~~~~~~~~~\n 17 | }\n 18 |\nrun_test.v:16:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 14 | \n 15 | fn test_divisible_by_4_and_5() {\n 16 | assert is_leap_year(1960)\n | ~~~~~~~~~~~~~~~~~~\n 17 | }\n 18 |\nrun_test.v:20:10: error: unknown function: is_leap_year\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ~~~~~~~~~~~~~~~~~~\n 21 | }\n 22 |\nrun_test.v:20:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ^\n 21 | }\n 22 |\nrun_test.v:20:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ~~~~~~~~~~~~~~~~~~~\n 21 | }\n 22 |\nrun_test.v:24:10: error: unknown function: is_leap_year\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ~~~~~~~~~~~~~~~~~~\n 25 | }\n 26 |\nrun_test.v:24:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ^\n 25 | }\n 26 |\nrun_test.v:24:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ~~~~~~~~~~~~~~~~~~~\n 25 | }\n 26 |\nrun_test.v:28:9: error: unknown function: is_leap_year\n 26 | \n 27 | fn test_divisible_by_400() {\n 28 | assert is_leap_year(2000)\n | ~~~~~~~~~~~~~~~~~~\n 29 | }\n 30 |\nrun_test.v:28:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 26 | \n 27 | fn test_divisible_by_400() {\n 28 | assert is_leap_year(2000)\n | ~~~~~~~~~~~~~~~~~~\n 29 | }\n 30 |\nrun_test.v:32:9: error: unknown function: is_leap_year\n 30 | \n 31 | fn test_divisible_by_100_not_by_125() {\n 32 | assert is_leap_year(2400)\n | ~~~~~~~~~~~~~~~~~~\n 33 | }\n 34 |\nrun_test.v:32:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 30 | \n 31 | fn test_divisible_by_100_not_by_125() {\n 32 | assert is_leap_year(2400)\n | ~~~~~~~~~~~~~~~~~~\n 33 | }\n 34 |\nrun_test.v:36:10: error: unknown function: is_leap_year\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ~~~~~~~~~~~~~~~~~~\n 37 | }\nrun_test.v:36:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ^\n 37 | }\nrun_test.v:36:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ~~~~~~~~~~~~~~~~~~~\n 37 | }\nchecker summary: 23 V errors, 0 V warnings, 0 V notices\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\n\nCannot compile file /opt/test-runner/tests/example-empty-file/run_test.v\n--------------------------------------------------------------------------------\nFailed command 1: '/opt/vlang/v' -stats -o '/tmp/tsession/0_0/run_test' '/opt/test-runner/tests/example-empty-file/run_test.v'\nSummary for all V _test.v files: 1 failed, 1 total.Comptime:. Runtime:."
"message": "---- Testing... ----------------------------------------------------------------\nrun_test.v:4:10: error: unknown function: is_leap_year\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ~~~~~~~~~~~~~~~~~~\n 5 | }\n 6 |\nrun_test.v:4:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ^\n 5 | }\n 6 |\nrun_test.v:4:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 2 | \n 3 | fn test_not_divisible_by_4() {\n 4 | assert !is_leap_year(2015)\n | ~~~~~~~~~~~~~~~~~~~\n 5 | }\n 6 |\nrun_test.v:8:10: error: unknown function: is_leap_year\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ~~~~~~~~~~~~~~~~~~\n 9 | }\n 10 |\nrun_test.v:8:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ^\n 9 | }\n 10 |\nrun_test.v:8:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 6 | \n 7 | fn test_divisible_by_2_not_by_4() {\n 8 | assert !is_leap_year(1970)\n | ~~~~~~~~~~~~~~~~~~~\n 9 | }\n 10 |\nrun_test.v:12:9: error: unknown function: is_leap_year\n 10 | \n 11 | fn test_divisible_by_4_not_by_100() {\n 12 | assert is_leap_year(1996)\n | ~~~~~~~~~~~~~~~~~~\n 13 | }\n 14 |\nrun_test.v:12:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 10 | \n 11 | fn test_divisible_by_4_not_by_100() {\n 12 | assert is_leap_year(1996)\n | ~~~~~~~~~~~~~~~~~~\n 13 | }\n 14 |\nrun_test.v:16:9: error: unknown function: is_leap_year\n 14 | \n 15 | fn test_divisible_by_4_and_5() {\n 16 | assert is_leap_year(1960)\n | ~~~~~~~~~~~~~~~~~~\n 17 | }\n 18 |\nrun_test.v:16:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 14 | \n 15 | fn test_divisible_by_4_and_5() {\n 16 | assert is_leap_year(1960)\n | ~~~~~~~~~~~~~~~~~~\n 17 | }\n 18 |\nrun_test.v:20:10: error: unknown function: is_leap_year\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ~~~~~~~~~~~~~~~~~~\n 21 | }\n 22 |\nrun_test.v:20:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ^\n 21 | }\n 22 |\nrun_test.v:20:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 18 | \n 19 | fn test_divisible_by_100_not_by_400(){\n 20 | assert !is_leap_year(2100)\n | ~~~~~~~~~~~~~~~~~~~\n 21 | }\n 22 |\nrun_test.v:24:10: error: unknown function: is_leap_year\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ~~~~~~~~~~~~~~~~~~\n 25 | }\n 26 |\nrun_test.v:24:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ^\n 25 | }\n 26 |\nrun_test.v:24:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 22 | \n 23 | fn test_divisible_by_100_not_by_3() {\n 24 | assert !is_leap_year(1900)\n | ~~~~~~~~~~~~~~~~~~~\n 25 | }\n 26 |\nrun_test.v:28:9: error: unknown function: is_leap_year\n 26 | \n 27 | fn test_divisible_by_400() {\n 28 | assert is_leap_year(2000)\n | ~~~~~~~~~~~~~~~~~~\n 29 | }\n 30 |\nrun_test.v:28:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 26 | \n 27 | fn test_divisible_by_400() {\n 28 | assert is_leap_year(2000)\n | ~~~~~~~~~~~~~~~~~~\n 29 | }\n 30 |\nrun_test.v:32:9: error: unknown function: is_leap_year\n 30 | \n 31 | fn test_divisible_by_100_not_by_125() {\n 32 | assert is_leap_year(2400)\n | ~~~~~~~~~~~~~~~~~~\n 33 | }\n 34 |\nrun_test.v:32:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 30 | \n 31 | fn test_divisible_by_100_not_by_125() {\n 32 | assert is_leap_year(2400)\n | ~~~~~~~~~~~~~~~~~~\n 33 | }\n 34 |\nrun_test.v:36:10: error: unknown function: is_leap_year\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ~~~~~~~~~~~~~~~~~~\n 37 | }\nrun_test.v:36:9: error: operator `!` can only be used with bool types, but the value after `!` is of type `void` instead\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ^\n 37 | }\nrun_test.v:36:9: error: assert can be used only with `bool` expressions, but found `void` instead\n 34 | \n 35 | fn test_divisible_by_200_not_by_400() {\n 36 | assert !is_leap_year(1800)\n | ~~~~~~~~~~~~~~~~~~~\n 37 | }\nchecker summary: 23 V errors, 0 V warnings, 0 V notices\nIf the code of your project is in multiple files, try with `v /opt/test-runner/tests/example-empty-file` instead of `v /opt/test-runner/tests/example-empty-file/run_test.v`\n\nCannot compile file /opt/test-runner/tests/example-empty-file/run_test.v\n--------------------------------------------------------------------------------\nFailed command 1: '/opt/vlang/v' -stats -o '/tmp/tsession/0_0/run_test' '/opt/test-runner/tests/example-empty-file/run_test.v'\nSummary for all V _test.v files: 1 failed, 1 total.Comptime:. Runtime:."
}
Loading