Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate unit tests to satysfi-test #144

Merged
merged 39 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e8ac4fe
GH-142: Migrate unit tests for Ref
zeptometer Feb 13, 2021
bbf142a
GH-142: Migrate unit tests for String
zeptometer Feb 13, 2021
63dd2d9
GH-142: Move test files to test
zeptometer Feb 13, 2021
423a49c
GH-142: Add a dependency to satysfi-test
zeptometer Feb 13, 2021
e08eadb
GH-142: Set up CI
zeptometer Feb 13, 2021
fd35f60
GH-142: Ignore report.txt
zeptometer Feb 13, 2021
28966cb
GH-142: Split test cases into files based on modules
zeptometer Feb 13, 2021
f49e166
GH-142: Migrate unit tests for List module
zeptometer Feb 13, 2021
f693b92
GH-142: Migrate unit tests for Array
zeptometer Feb 15, 2021
2ce4157
GH-142: Migrate unit tests for RegExp module
zeptometer Feb 17, 2021
5a35c5c
GH-142: Fix EOF
zeptometer Feb 17, 2021
13ad8bd
GH-142: Fix type definition of Pair.eq
zeptometer Feb 19, 2021
6714931
GH-142: Fix indent of String
zeptometer Feb 19, 2021
0e3ff5d
GH-142: Migrate test cases for Int module
zeptometer Mar 1, 2021
d6f8cf9
GH-142: Migrate added test cases of String
zeptometer Mar 2, 2024
ab9d894
GH-142: Migrate added tests of List
zeptometer Mar 2, 2024
46d02a8
GH-142: Migrate added tests of Array
zeptometer Mar 2, 2024
6a21bb6
GH-142: Migrate added tests of Int
zeptometer Mar 3, 2024
ee635a9
GH-142: Refine tests of Regex
zeptometer Mar 3, 2024
02dd6d5
GH-142: Migrate tests of Parser
zeptometer Mar 3, 2024
ce75934
GH-142: Add tests of Lexer
zeptometer Mar 3, 2024
f8fd339
GH-142: Migrate tests of Map
zeptometer Mar 3, 2024
fda0b82
GH-142: Migrate test cases of Color
zeptometer Mar 3, 2024
328585f
GH-142: Migrate test cases of Promise
zeptometer Mar 3, 2024
7b27027
GH-142: Migrate test cases of Float
zeptometer Mar 4, 2024
f2c674a
GH-142: Migrate test cases of Stream
zeptometer Mar 4, 2024
6d323f9
GH-142: Migrate test cases of Bool
zeptometer Mar 4, 2024
61cab62
GH-142: Migrate test cases of Fn
zeptometer Mar 4, 2024
b2a171c
GH-142: Migrate tests of TreeSet
zeptometer Mar 4, 2024
9c5717f
GH-142: Migrate tests of TreeMap
zeptometer Mar 4, 2024
c0fc5eb
GH-142: Migrate tests of BigInt
zeptometer Mar 5, 2024
ccbdbac
GH-142: Rename test sets
zeptometer Mar 5, 2024
c68b5f6
GH-142: Remove js-based snapshot tests for compiler output
zeptometer Mar 5, 2024
cef6fb6
GH-142: WIP: Fix ci
zeptometer Mar 5, 2024
ab86134
GH-142: Run unit tests for satysfi >= 0.0.5
zeptometer Mar 5, 2024
0f1106b
GH-142: Upload report only on failure
zeptometer Mar 5, 2024
e1a8190
GH-142: Fix config for regression tests in CI
zeptometer Mar 5, 2024
a526552
GH-142: Pin satysfi version in CI
zeptometer Mar 5, 2024
236aab2
GH-142: Drop support of satysfi:0.0.5
zeptometer Mar 5, 2024
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@ name: CI
on: [push, pull_request]

jobs:
unit-test:
name: unit tests
runs-on: ubuntu-latest
container:
image: amutake/satysfi:opam-slim
steps:
- uses: actions/checkout@v1
- name: Install Satyrographos dependencies
run: |
export HOME=/root
eval $(opam env)
opam update
opam pin add --verbose --yes "."
satyrographos install -l base
- name: Run tests
run: |
export HOME=/root
eval $(opam env)
cd test && sh run-test.sh -v
- if: always()
name: Install Apt dependencies
run: apt-get update && apt-get install -y xz-utils liblzma-dev
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: satysfi-test-report
path: test/report.txt
regression-test:
name: Regression tests
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __test__/satysrc/*.pdf
*.satysfi-aux
node_modules
*~
report.txt
2 changes: 1 addition & 1 deletion Satyristes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
((packageDir "src")
))
(opam "satysfi-base.opam")
(dependencies ((fonts-dejavu ()))))
(dependencies ((fonts-dejavu ()) (test ()))))
329 changes: 0 additions & 329 deletions __test__/satysrc/generic.saty
Original file line number Diff line number Diff line change
Expand Up @@ -37,335 +37,6 @@
@import: ../../src/tree-map
@import: ../../src/big-int

open Fn in

let () = Debug.log `==== Ref ====` in
let r = Ref.make 1 in
let () = r |> Ref.get |> String.of-int |> Debug.log in
let () = r |> Ref.set 2 in
let () = r |> Ref.get |> String.of-int |> Debug.log in
let r1 = Ref.make 1 in
let r2 = Ref.make 2 in
let () = Ref.swap r1 r2 in
let () = Debug.log (String.of-int (Ref.get r1) ^ `:` ^ String.of-int (Ref.get r2)) in % 2:1
let r = Ref.make 1 in
let () = r |> Ref.set-temporarily 2 (fun _ -> Debug.log (String.of-int (Ref.get r))) in % 2
let () = Debug.log (String.of-int (Ref.get r)) in % 1

let () = Debug.log `==== String ====` in
let () = Debug.log (String.concat [`a`; `b`; `c`;]) in
let () = Debug.log (String.concat ?:(`;`) [`a`; `b`; `c`;]) in
let () = Debug.log (String.of-bool (String.is-empty ` `)) in % true
let _ = String.split-by (Char.make `;`) `spam;ham;eggs;` |> List.map Debug.log in
let _ = String.to-list `abc` |> List.map (fun c -> (c |> String.of-char |> Debug.log)) in
let () = String.(`a` < `b`) |> Bool.to-string |> Debug.log in % true
let () = String.(`ab` < `ba`) |> Bool.to-string |> Debug.log in % true
let () = String.(`aab` < `aba`) |> Bool.to-string |> Debug.log in % true
let () = String.(`bbb` < `bbba`) |> Bool.to-string |> Debug.log in % true
let () = String.contains `abc` `1abcdef` |> Bool.to-string |> Debug.log in % true
let () = String.contains `abc` `abdef` |> Bool.to-string |> Debug.log in % false
let () = String.contains `abc` `ef` |> Bool.to-string |> Debug.log in % false
let () = String.trim #` abc `# |> Debug.log in % |abc|
let () = String.trim #` `# |> Debug.log in % ||
let () = String.trim-start #` abc `# |> Debug.log in % |abc |
let () = String.trim-end #` abc `# |> Debug.log in % | abc|
let () = String.uppercase-ascii `Grüße, Jürgen` |> Debug.log in % GRüßE, JüRGEN
let () = String.lowercase-ascii `GRÜßE, JÜRGEN` |> Debug.log in % grÜße, jÜrgen
let () = String.capitalize-ascii `tiTle` |> Debug.log in % TiTle
let () = String.uncapitalize-ascii `TiTle` |> Debug.log in % tiTle

let () = Debug.log `==== List ====` in
let lst = [1;3;2;4;5] in
let () = lst |> List.take 0 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % ` `
let () = lst |> List.take 1 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `1`
let () = lst |> List.take 7 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `13245`
let () = lst |> List.drop 0 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `13245`
let () = lst |> List.drop 2 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `245`
let () = lst |> List.drop 7 |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % ``
let () = lst |> List.split-at 3 |> (fun (xs,_) -> xs) |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `132`
let () = lst |> List.split-at 3 |> (fun (_,ys) -> ys) |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `45`
let () = lst |> List.bubblesort Int.ord |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in
let () = lst |> List.insertsort Int.ord |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in
let () = lst |> List.mergesort Int.ord |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in
let lst = [(1,2);(2,1);(1,1)] in
let ord = Ord.make (fun (n1,_) (n2,_) -> Ord.compare Int.ord n1 n2) in
let show (n1,n2) = `(` ^ String.of-int n1 ^ `,` ^ String.of-int n2 ^ `)` in
let () = lst |> List.bubblesort ord |> List.map show |> List.fold-left (^) ` ` |> Debug.log in
let () = lst |> List.insertsort ord |> List.map show |> List.fold-left (^) ` ` |> Debug.log in
let () = lst |> List.mergesort ord |> List.map show |> List.fold-left (^) ` ` |> Debug.log in

let () = Debug.log `==== Array ====` in
let a = Array.make 3 42 in
let () = a |> Array.get 0 |> String.of-int |> Debug.log in
let () = a |> Array.set 0 43 in
let () = a |> Array.get 0 |> String.of-int |> Debug.log in
let a = 10 |> Array.init id in
let is = [0;1;2;3;4;5;6;7;8;9] in
let () = is |> List.iter (fun i -> a |> Array.get i |> String.of-int |> Debug.log) in
let () = is |> List.iter (fun i -> a |> Array.set i (10 - i)) in
let () = is |> List.iter (fun i -> a |> Array.get i |> String.of-int |> Debug.log) in
let () = a |> Array.to-list |> List.iter (fun i -> i |> String.of-int |> Debug.log) in
let () = [0;1;2;3;4;] |> Array.of-list |> Array.sub 2 3 |> Array.to-list |> List.map String.of-int |> List.fold-left (^) ` ` |> Debug.log in % `234`
let a1 = Array.of-list [0;1;2;3;4;] in
let a2 = Array.of-list [5;6;7;8;9] in
let a = Array.append a1 a2 in
let () = Debug.log (String.of-int (Array.get 0 a)) in
let () = Array.append a1 a2 |> Array.to-list |> List.iter (fun i -> i |> String.of-int |> Debug.log) in

let () = Debug.log `==== RegExp ====` in
open RegExp in
%let () = RegExp.test (RegExp.of-string `ab.*ef`) `abcdef` |> String.of-bool |> Debug.log in
let print-result r =
r |> List.iter (fun s -> (
match s with
| None -> Debug.log `None`
| Some (i, s) -> Debug.log (`Some(` ^ String.of-int i ^ `, "` ^ s ^ `")`)
)) in
%let () = exec (compile (seq (many1 char-a) (many1 char-b))) `aabbb` |> String.of-bool |> Debug.log in
%let () = exec re-example1 `aabbb` |> String.of-bool |> Debug.log in
let char-a = char (Char.make `a`) in
let char-b = char (Char.make `b`) in
let char-c = char (Char.make `c`) in
% (a+)(b+)
let () = test (seq (group (many1 char-a)) (group (many1 char-b))) `aabbb` |> String.of-bool |> Debug.log in % true
let () = `aabbb` |> test (alt char-a char-b) |> String.of-bool |> Debug.log in % true
% (a+|(c))(b+)
let re1 = seq (group (alt (many1 char-a) (group char-c))) (group (many1 char-b)) in
let ss = exec re1 `aabbb` |> print-result in
let re3 = many (many char-a) in
let () = `aaaaa` |> test re3 |> String.of-bool |> Debug.log in
let re4 = seq (group (seq any (char (Char.make `e`)))) eof in
let () = `the apple` |> exec re4 |> print-result in
let re6 = sequence [bol; string `apple`; eol] in
let () = `the apple
apple
leapple` |> exec re6 |> print-result in
let () = exec spaces #` asdf`# |> print-result in
let () = `aaabb` |> test (RegExp.of-string `(a+|(c))(b+)`) |> String.of-bool |> Debug.log in
let _ = RegExp.of-string `^\s\d$` in
% let _ = RegExp.of-string `[]` in
let _ = RegExp.of-string `[a-z]` in
let _ = `0X` |> test (RegExp.of-string `0[xX]`) |> String.of-bool |> Debug.log in
let _ = `0x1f2e3d` |> test (RegExp.of-string `0[xX][A-Fa-f0-9]+`) |> String.of-bool |> Debug.log in
let _ = `0a` |> test (RegExp.of-string `0[xX]`) |> String.of-bool |> Debug.log in
let _ = `0xaZb` |> test (RegExp.of-string `^0[xX][A-Fa-f0-9]+$`) |> String.of-bool |> Debug.log in
let _ = `][][` |> test (RegExp.of-string `[][]+`) |> String.of-bool |> Debug.log in
let _ = `][]-[` |> test (RegExp.of-string `[][-]+`) |> String.of-bool |> Debug.log in
let input = ` I do not know why but it seems code2 is slow if it contains a long line.
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo
wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo wakegawakaranaiyo` in
let pat = `wk` in
let () = Debug.print `testing long input` in
let () = Debug.print (String.of-bool (RegExp.test (RegExp.of-string pat) input)) in

let () = Debug.log `==== Parser ====` in
let () =
open Parser in
`aaa` |> StringParser.run (many (StringParser.char (Char.make `a`)) >>= (fun cs -> (Debug.log (String.of-list cs) before ret cs))) |> Fn.ignore in

let () =
open Parser in
open StringParser in
let op name f = string name >> ret f in
let addop = op `+` Int.add in
let subop = op `-` Int.sub in
let mulop = op `*` Int.mul in
let divop = op `/` Int.div in
let number = some digit >>= (fun cs -> ret (Int.of-string (String.of-list cs))) in
let expr = fix (fun expr -> (
let factor = between (string `(`) (string `)`) expr <|> number in
let term = factor |> some-chain-left (mulop <|> divop) in
let expr = term |> some-chain-left (addop <|> subop) in
expr
))
in
`12/2/2` |> run expr |> Result.map (Fn.compose Debug.log String.of-int) |> Fn.ignore before
`1+2*4-12/2/2+4` |> run expr |> Result.map (Fn.compose Debug.log String.of-int) |> Fn.ignore in

let () =
open Parser in
open StringParser in
let p =
(label `expected 'foo'` (string `foo`))
<|> (string `bar`)
in
`bar` |> run p |> Result.map Debug.log |> Result.map-err (fun errs -> (
match errs with
| [] -> Debug.log `(something is wrong)`
| err :: _ -> Debug.log err#desc
)) |> Fn.ignore
in

let () = Debug.log `==== Lexer ====` in
let rules = [
(| kind = `identifier`; regexp = seq alpha (many (alt alpha (alt digit (char (Char.make `-`))))) |);
(| kind = `whitespace`; regexp = spaces |);
] in
let (Some tokens) = Lexer.lex rules `abc defg hijklMNL op123 ` in
let () = tokens |> List.iter (fun tk -> (Debug.log (`(| kind = `# ^ tk#kind ^ `, data = "`# ^ tk#data ^ `" |)`))) in

let () = Debug.log `==== Int ====` in
let p i = i |> String.of-int |> Debug.log in
let () = p (13 |> Int.lsl 2) in %==52
let () = p (13 |> Int.asr 0) in %==13
let () = p (13 |> Int.asr 1) in %==6
let () = p (13 |> Int.asr 2) in %==3
let () = p (13 |> Int.asr 3) in %==1
let () = p (13 |> Int.asr 4) in %==0
let () = p (13 |> Int.asr 5) in %==0
let () = p (-13 |> Int.asr 0) in %==-13
let () = p (-13 |> Int.asr 1) in %==-7
let () = p (-13 |> Int.asr 2) in %==-4
let () = p (-13 |> Int.asr 3) in %==-2
let () = p (-13 |> Int.asr 4) in %==-1
let () = p (-13 |> Int.asr 5) in %==-1
let () = p (13 |> Int.land 10) in %==8
let () = p (-13 |> Int.land 31) in %==19
let () = p (13 |> Int.lor 10) in %==15
let () = p (13 |> Int.lxor 10) in %==7
let () = p (13 |> Int.lsr 2) in %==3
let () = p (-13 |> Int.lsr 2) in %==2305843009213693948
let () = p (`12345678` |> Int.of-string ?:10) in
let () = p (`-123` |> Int.of-string ?:10) in
let () = p (`ffff` |> Int.of-string ?:16) in
let () = p (2 |> Int.pow 3) in
let () = p (2 |> Int.pow 0) in
let () = p (Int.sup [1; 3; 2]) in
let () = p (Int.sup []) in
let p-opt o =
let s =
match o with
| None -> `None`
| Some(i) -> `Some(` ^ Int.to-string i ^ `)`
in
Debug.log s
in
let () = p-opt(`123` |> Int.of-string-opt ?:10) in
let () = p-opt(`-123` |> Int.of-string-opt ?:10) in
let () = p-opt(`12n` |> Int.of-string-opt ?:10) in
let () = p-opt(`a` |> Int.of-string-opt ?:16) in

let () = Debug.log `==== Map ====` in
let m = Map.of-list [(1, `a`); (2, `b`); (3, `c`)] in
let option-force (Some v) = v in
let () = m |> Map.of- Int.eq 1 |> option-force |> Debug.log in
let () = m |> Map.of- Int.eq 2 |> option-force |> Debug.log in
let () = m |> Map.of- Int.eq 3 |> option-force |> Debug.log in
let m = m |> Map.bind 2 `d` in
let () = m |> Map.of- Int.eq 1 |> option-force |> Debug.log in
let () = m |> Map.of- Int.eq 2 |> option-force |> Debug.log in
let () = m |> Map.of- Int.eq 3 |> option-force |> Debug.log in

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
let _ = Promise.force p in
let _ = Promise.force p in
let p = Promise.delay ~(!!(&(let () = Debug.log `foobar` in 3.14))) in
let () = Debug.log `barbaz` in
let _ = Promise.force p in
let _ = Promise.force p in

let () = Debug.log `==== Float ====` in
let p f = f |> String.of-float |> Debug.log in
let () = p Float.pi in
let () = p Float.e in
let l = [Float.inf; Float.ninf; Float.nan; 0.0; Float.neg 0.0; 1.0] in
let _ = l |> List.iter (fun a ->
l |> List.iter (fun b ->
Debug.log (String.of-float a ^ #` == `# ^ String.of-float b ^ #` = `# ^ String.of-bool Float.(a == b))
)
) in
let () = p (1.0 /. 0.0) in
let () = p (1.0 /. Float.neg 0.0) in
let () = p (0.0 /. 0.0) in
let () = p (Float.exp Float.pi) in
let () = p (Float.log Float.pi) in
let () = p (Float.pi |> Float.pow Float.pi) in
let () = p (2.1 |> Float.pow 54.0) in
let () = p (Float.sqrt 2.0) in
let () = p (Float.log10 Float.pi) in
let dbl-min = Stream.nat |> Stream.take 1022 |> Fn.flip Stream.fold 1.0 (fun f _ -> f /. 2.0) in
let () = p dbl-min in
let half-dbl-min = dbl-min /. 2.0 in
let () = p half-dbl-min in
let l = l |> List.append [dbl-min; half-dbl-min] in
let p-bool b = b |> String.of-bool |> Debug.log in
let () = l |> List.iter (fun f -> p-bool (Float.is-zero f)) in
let () = l |> List.iter (fun f -> p-bool (Float.is-inf f)) in
let () = l |> List.iter (fun f -> p-bool (Float.is-nan f)) in
let () = l |> List.iter (fun f -> p-bool (Float.is-normal f)) in
let () = l |> List.iter (fun f -> p-bool (Float.is-subnormal f)) in
let l = [2.3; 3.8; 5.5; Float.neg 2.3; Float.neg 3.8; Float.neg 5.5; 6.0] in
let () = l |> List.iter (fun a -> (p (Float.round a))) in
let () = l |> List.iter (fun a -> (p (Float.floor a))) in
let () = l |> List.iter (fun a -> (p (Float.ceil a))) in
let () = l |> List.iter (fun a -> (p (Float.truncate a))) in
% virtually testing exp2i
let () = [-1073; -1074; -1075; 1022; 1023; 1024] |> List.iter (fun a -> (p (1.0 |> Float.ldexp a))) in
let p-opt o =
let s =
match o with
| None -> `None`
| Some(i) -> `Some(` ^ Float.to-string i ^ `)`
in
Debug.log s
in
let () = p-opt(`123.45` |> Float.of-string-opt) in
let () = p-opt(`-123.45` |> Float.of-string-opt) in
let () = p-opt(`123.0` |> Float.of-string-opt) in
let () = p-opt(`0.111` |> Float.of-string-opt) in
let () = p-opt(`0.1a11` |> Float.of-string-opt) in

let () = Debug.log `==== Bool ====` in
let p b = b |> Bool.to-string |> Debug.log in
let p-opt o =
let s =
match o with
| None -> `None`
| Some(i) -> `Some(` ^ Bool.to-string i ^ `)`
in
Debug.log s
in
let () = p Bool.max-value in
let () = p Bool.min-value in
let () = p-opt(0 |> Bool.of-int-opt) in
let () = p-opt(1 |> Bool.of-int-opt) in
let () = p-opt(2 |> Bool.of-int-opt) in
let () = p-opt(`false` |> Bool.of-string-opt) in
let () = p-opt(`true` |> Bool.of-string-opt) in
let () = p-opt(`hoge` |> Bool.of-string-opt) in

let () = Debug.log `==== Stream ====` in
let () = Stream.fib |> Stream.take 30 |> Stream.to-list |> List.iter (fun x -> Debug.log <| String.of-int x) in
let () = Stream.nat |> Stream.take 5 |> Stream.to-list |> List.iter (fun x -> Debug.log <| String.of-int x)
in

let () = Debug.log `==== Fn ====` in
let () = 0 |> Fn.fix (fun loop n -> (
if n >= 10 then
Debug.log `done`
else
Debug.log (String.of-int n) before
loop (n + 1)
))
in

let () = Debug.log `==== TreeSet ====` in
% REMARK:
% This test relies on the fact that the order of elements of a result from TreeSet.to-list is
Expand Down
1 change: 1 addition & 0 deletions satysfi-base.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ depends: [
"satysfi-dist"
"satyrographos" {>= "0.0.2.6" & < "0.0.3"}
"satysfi-fonts-dejavu" {>= "2.37"}
"satysfi-test" {>= "0.0.1" & < "0.0.2"}
]
build: [ ]
install: [
Expand Down
Loading
Loading