diff --git a/__test__/satysrc/generic.saty b/__test__/satysrc/generic.saty index c4c357b..3b2fdff 100644 --- a/__test__/satysrc/generic.saty +++ b/__test__/satysrc/generic.saty @@ -37,9 +37,6 @@ @import: ../../src/tree-map @import: ../../src/big-int -let _ = Color.of-css `#F5F5DC` in -let _ = Color.of-css `beige` in - let () = Debug.log `==== Promise ====` in let p = Promise.delay ~(!!(&(let () = Debug.log `foo` in 1))) in let () = Debug.log `bar` in diff --git a/test/color.test.satyg b/test/color.test.satyg new file mode 100644 index 0000000..4b83891 --- /dev/null +++ b/test/color.test.satyg @@ -0,0 +1,16 @@ +@require: test/test +@require: test/expect + +@import: ../src/color-ext + +let color-test-cases = open Test in + describe `Color module` [ + it `parse hex notation successfully` (fun () -> ( + let _ = Color.of-css `#F5F5DC` in + Expect.always-pass + )); + it `parse names successfully` (fun () -> ( + let _ =Color.of-css `beige` in + Expect.always-pass + )); + ] diff --git a/test/main.test.saty b/test/main.test.saty index f282920..af679dc 100644 --- a/test/main.test.saty +++ b/test/main.test.saty @@ -7,6 +7,7 @@ @import: ../src/string @import: array.test +@import: color.test @import: int.test @import: lexer.test @import: list.test @@ -19,6 +20,7 @@ open Test in describe `base` [ array-test-cases; + color-test-cases; int-test-cases; lexer-test-cases; list-test-cases;