Skip to content

Commit

Permalink
GH-142: Migrate test cases of Color
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptometer committed Mar 3, 2024
1 parent f8fd339 commit fda0b82
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 0 additions & 3 deletions __test__/satysrc/generic.saty
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions test/color.test.satyg
Original file line number Diff line number Diff line change
@@ -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
));
]
2 changes: 2 additions & 0 deletions test/main.test.saty
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import: ../src/string

@import: array.test
@import: color.test
@import: int.test
@import: lexer.test
@import: list.test
Expand All @@ -19,6 +20,7 @@
open Test in
describe `base` [
array-test-cases;
color-test-cases;
int-test-cases;
lexer-test-cases;
list-test-cases;
Expand Down

0 comments on commit fda0b82

Please sign in to comment.