Skip to content
Closed
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 bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cd "${solution_dir}" || exit 1

# Run the tests for the provided implementation file and redirect stdout and
# stderr to capture it
test_output=$(zig test -target x86_64-linux-musl "${test_file}" 2>&1)
test_output=$(zig test -target x86_64-linux-musl -fno-llvm -fno-lld "${test_file}" 2>&1)
exit_code=$?

cd "${start_dir}" || exit 1
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": "1/9 test_example_all_fail.test.year not divisible by 4 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:7:5: <MEMHASH>6 in test.year not divisible by 4 in common year (test)\n try testing.expect(!leap.leap(2015));\n ^\n2/9 test_example_all_fail.test.year divisible by 2, not divisible by 4 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:11:5: <MEMHASH>6 in test.year divisible by 2, not divisible by 4 in common year (test)\n try testing.expect(!leap.leap(1970));\n ^\n3/9 test_example_all_fail.test.year divisible by 4, not divisible by 100 in leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:15:5: <MEMHASH>4 in test.year divisible by 4, not divisible by 100 in leap year (test)\n try testing.expect(leap.leap(1996));\n ^\n4/9 test_example_all_fail.test.year divisible by 4 and 5 is still a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:19:5: <MEMHASH>4 in test.year divisible by 4 and 5 is still a leap year (test)\n try testing.expect(leap.leap(1960));\n ^\n5/9 test_example_all_fail.test.year divisible by 100, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:23:5: <MEMHASH>6 in test.year divisible by 100, not divisible by 400 in common year (test)\n try testing.expect(!leap.leap(2100));\n ^\n6/9 test_example_all_fail.test.year divisible by 100 but not by 3 is still not a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:27:5: <MEMHASH>6 in test.year divisible by 100 but not by 3 is still not a leap year (test)\n try testing.expect(!leap.leap(1900));\n ^\n7/9 test_example_all_fail.test.year divisible by 400 is leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:31:5: <MEMHASH>4 in test.year divisible by 400 is leap year (test)\n try testing.expect(leap.leap(2000));\n ^\n8/9 test_example_all_fail.test.year divisible by 400 but not by 125 is still a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:35:5: <MEMHASH>4 in test.year divisible by 400 but not by 125 is still a leap year (test)\n try testing.expect(leap.leap(2400));\n ^\n9/9 test_example_all_fail.test.year divisible by 200, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:39:5: <MEMHASH>6 in test.year divisible by 200, not divisible by 400 in common year (test)\n try testing.expect(!leap.leap(1800));\n ^\n0 passed; 0 skipped; 9 failed."
"message": "1/9 test_example_all_fail.test.year not divisible by 4 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:7:5: <MEMHASH>8 in test.year not divisible by 4 in common year (test_example_all_fail.zig)\n try testing.expect(!leap.leap(2015));\n ^\n2/9 test_example_all_fail.test.year divisible by 2, not divisible by 4 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:11:5: <MEMHASH>0 in test.year divisible by 2, not divisible by 4 in common year (test_example_all_fail.zig)\n try testing.expect(!leap.leap(1970));\n ^\n3/9 test_example_all_fail.test.year divisible by 4, not divisible by 100 in leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:15:5: <MEMHASH>8 in test.year divisible by 4, not divisible by 100 in leap year (test_example_all_fail.zig)\n try testing.expect(leap.leap(1996));\n ^\n4/9 test_example_all_fail.test.year divisible by 4 and 5 is still a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:19:5: <MEMHASH>0 in test.year divisible by 4 and 5 is still a leap year (test_example_all_fail.zig)\n try testing.expect(leap.leap(1960));\n ^\n5/9 test_example_all_fail.test.year divisible by 100, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:23:5: <MEMHASH>a in test.year divisible by 100, not divisible by 400 in common year (test_example_all_fail.zig)\n try testing.expect(!leap.leap(2100));\n ^\n6/9 test_example_all_fail.test.year divisible by 100 but not by 3 is still not a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:27:5: <MEMHASH>4 in test.year divisible by 100 but not by 3 is still not a leap year (test_example_all_fail.zig)\n try testing.expect(!leap.leap(1900));\n ^\n7/9 test_example_all_fail.test.year divisible by 400 is leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:31:5: <MEMHASH>c in test.year divisible by 400 is leap year (test_example_all_fail.zig)\n try testing.expect(leap.leap(2000));\n ^\n8/9 test_example_all_fail.test.year divisible by 400 but not by 125 is still a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:35:5: <MEMHASH>4 in test.year divisible by 400 but not by 125 is still a leap year (test_example_all_fail.zig)\n try testing.expect(leap.leap(2400));\n ^\n9/9 test_example_all_fail.test.year divisible by 200, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-all-fail/test_example_all_fail.zig:39:5: <MEMHASH>e in test.year divisible by 200, not divisible by 400 in common year (test_example_all_fail.zig)\n try testing.expect(!leap.leap(1800));\n ^\n0 passed; 0 skipped; 9 failed."
}
2 changes: 1 addition & 1 deletion tests/example-partial-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"status": "fail",
"message": "1/9 test_example_partial_fail.test.year not divisible by 4 in common year...OK\n2/9 test_example_partial_fail.test.year divisible by 2, not divisible by 4 in common year...OK\n3/9 test_example_partial_fail.test.year divisible by 4, not divisible by 100 in leap year...OK\n4/9 test_example_partial_fail.test.year divisible by 4 and 5 is still a leap year...OK\n5/9 test_example_partial_fail.test.year divisible by 100, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:23:5: <MEMHASH>6 in test.year divisible by 100, not divisible by 400 in common year (test)\n try testing.expect(!leap.leap(2100));\n ^\n6/9 test_example_partial_fail.test.year divisible by 100 but not by 3 is still not a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:27:5: <MEMHASH>6 in test.year divisible by 100 but not by 3 is still not a leap year (test)\n try testing.expect(!leap.leap(1900));\n ^\n7/9 test_example_partial_fail.test.year divisible by 400 is leap year...OK\n8/9 test_example_partial_fail.test.year divisible by 400 but not by 125 is still a leap year...OK\n9/9 test_example_partial_fail.test.year divisible by 200, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>f in expect (test)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:39:5: <MEMHASH>6 in test.year divisible by 200, not divisible by 400 in common year (test)\n try testing.expect(!leap.leap(1800));\n ^\n6 passed; 0 skipped; 3 failed."
"message": "1/9 test_example_partial_fail.test.year not divisible by 4 in common year...OK\n2/9 test_example_partial_fail.test.year divisible by 2, not divisible by 4 in common year...OK\n3/9 test_example_partial_fail.test.year divisible by 4, not divisible by 100 in leap year...OK\n4/9 test_example_partial_fail.test.year divisible by 4 and 5 is still a leap year...OK\n5/9 test_example_partial_fail.test.year divisible by 100, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:23:5: <MEMHASH>7 in test.year divisible by 100, not divisible by 400 in common year (test_example_partial_fail.zig)\n try testing.expect(!leap.leap(2100));\n ^\n6/9 test_example_partial_fail.test.year divisible by 100 but not by 3 is still not a leap year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:27:5: <MEMHASH>1 in test.year divisible by 100 but not by 3 is still not a leap year (test_example_partial_fail.zig)\n try testing.expect(!leap.leap(1900));\n ^\n7/9 test_example_partial_fail.test.year divisible by 400 is leap year...OK\n8/9 test_example_partial_fail.test.year divisible by 400 but not by 125 is still a leap year...OK\n9/9 test_example_partial_fail.test.year divisible by 200, not divisible by 400 in common year...FAIL (TestUnexpectedResult)\n/opt/zig/lib/std/testing.zig:580:14: <MEMHASH>9 in expect (std.zig)\n if (!ok) return error.TestUnexpectedResult;\n ^\n/tmp/exercism-zig-test-runner/example-partial-fail/test_example_partial_fail.zig:39:5: <MEMHASH>b in test.year divisible by 200, not divisible by 400 in common year (test_example_partial_fail.zig)\n try testing.expect(!leap.leap(1800));\n ^\n6 passed; 0 skipped; 3 failed."
}