diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d40edc --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +all: tests bench + +test: + dune test + +bench: + dune build ./bench.exe + +clean: + dune clean + +.PHONY: all clean bench test diff --git a/src/dune-project b/dune-project similarity index 100% rename from src/dune-project rename to dune-project diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 1c48a5c..0000000 --- a/src/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -all: tests bench - -tests: - dune build ./tests/ocamlrandom.exe - dune build ./tests/xoshiro.exe - dune build ./tests/splitmix.exe - -bench: - dune build ./bench.exe - -clean: - dune clean - -.PHONY: all clean bench tests diff --git a/src/tests/dune b/src/tests/dune deleted file mode 100644 index 5189e02..0000000 --- a/src/tests/dune +++ /dev/null @@ -1,13 +0,0 @@ -(executable - (name xoshiro) - (modules xoshiro) - (libraries xoshiro)) - -(executable - (name ocamlrandom) - (modules ocamlrandom)) - -(executable - (name splitmix) - (modules splitmix) - (libraries splitmix)) diff --git a/src/tests/ocamlrandom.ml b/src/tests/ocamlrandom.ml deleted file mode 100644 index 00344a3..0000000 --- a/src/tests/ocamlrandom.ml +++ /dev/null @@ -1,10 +0,0 @@ -let () = - let n = - if Array.length Sys.argv = 2 - then int_of_string Sys.argv.(1) - else 10 - in - - for _ = 1 to n do - Format.printf "%08x\n" (Random.bits ()) - done diff --git a/src/tests/splitmix.ml b/src/tests/splitmix.ml deleted file mode 100644 index eb3e35a..0000000 --- a/src/tests/splitmix.ml +++ /dev/null @@ -1,13 +0,0 @@ -open Splitmix - -let () = - let n = - if Array.length Sys.argv = 2 - then int_of_string Sys.argv.(1) - else 10 - in - - let state = ref 0xdead42beef37ca7aL in - for _ = 1 to n do - Format.printf "%016Lx@." (Sm64.next state) - done diff --git a/src/tests/xoshiro.ml b/src/tests/xoshiro.ml deleted file mode 100644 index e615baa..0000000 --- a/src/tests/xoshiro.ml +++ /dev/null @@ -1,15 +0,0 @@ -open Xoshiro - -let () = - let n = - if Array.length Sys.argv = 2 - then int_of_string Sys.argv.(1) - else 10 - in - - for _ = 1 to n do - let hi, lo = X256pp.Int.next () in - Format.printf "%08x%08x " hi lo; - Format.printf "%016Lx " (X256pp.Int64.next ()); - Format.printf "%08x@." (X256pp.C.bits ()) - done