Skip to content

Commit baa2136

Browse files
committed
fix(tests): update imports in tests to use the new glob syntax, and fix some badly written tests
1 parent cf59112 commit baa2136

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

tests/all.ark

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,22 @@
77
(import math-tests)
88
(import range-tests)
99
(import string-tests)
10-
(import switch-tests)
10+
(import switch-tests)
11+
12+
(import std.List)
13+
14+
(let outputs (list:unzip [
15+
events-tests:events-output
16+
exceptions-tests:exceptions-output
17+
functional-tests:functional-output
18+
lazy-tests:lazy-output
19+
list-tests:list-output
20+
macros-tests:macros-output
21+
math-tests:math-output
22+
range-tests:range-output
23+
string-tests:string-output
24+
switch-tests:switch-output ]))
25+
(let success_count (list:sum (@ outputs 0)))
26+
(let failure_count (list:sum (@ outputs 1)))
27+
28+
(print (string:format "{:=<20}\nSuccesses: {} - Failures: {}\n" "=" success_count failure_count))

tests/exceptions-tests.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(import std.Exceptions)
1+
(import std.Exceptions:*)
22
(import std.Testing)
33

44
(let invert (fun (x)

tests/functional-tests.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(import std.Functional)
1+
(import std.Functional:*)
22
(import std.Testing)
33

44
(let foo (fun (x) (+ x 3)))

tests/list-tests.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
(test:eq (list:foldLeft ["1" "2" "3"] "" (fun (x y) (+ x y))) "123")
6262
(test:eq (list:foldLeft a 0 (fun (x y) (+ x y))) 6)
6363

64-
(test:eq (list:zipWithIndex a) [0 1] [1 2] [2 3])
64+
(test:eq (list:zipWithIndex a) [[0 1] [1 2] [2 3]])
6565
(test:eq (list:zipWithIndex []) [])
6666

6767
(test:eq a [1 2 3])

tests/macros-tests.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
(let test_func (fun (a b c) (* a b c)))
1212
(let test_func1 (partial test_func 1))
1313
(let test_func2 (partial test_func1 2))
14-
(let test_func3 (partial2 test_fun 1 _ 3))
14+
(let test_func3 (partial2 test_func 1 _ 3))
1515

1616
(test:suite macros {
1717
(test:eq (-> "f0" f1) "f0-f1")

tests/range-tests.ark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(import std.Range)
1+
(import std.Range:*)
22
(import std.Math :even)
33
(import std.Testing)
44

0 commit comments

Comments
 (0)