Skip to content

Commit ecd75c0

Browse files
committed
fix(tests): add a guard when reading files so that tests still pass in valgrind
1 parent 445c32e commit ecd75c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unittests/resources/LangSuite/builtins-tests.ark

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(import std.Testing)
22
(import std.List)
3+
(import std.IO :fileExists?)
34

45
(let foo (fun ((mut a) (ref b) c)
56
(+ a (* b c))))
@@ -25,4 +26,6 @@
2526

2627
(test:case "disassemble" {
2728
(disassemble foo)
28-
(disassemble "tests/unittests/resources/DiagnosticsSuite/runtime/__arkscript__/assert.arkc") }) })
29+
(let filename "tests/unittests/resources/DiagnosticsSuite/runtime/__arkscript__/assert.arkc")
30+
(if (fileExists? filename)
31+
(disassemble filename)) }) })

0 commit comments

Comments
 (0)