Basic test harness.
6 files changed, 31 insertions(+), 1 deletions(-)

M panacea.opam
M src/panacea_lib/dune
A => src/panacea_lib/test/dune
A => src/panacea_lib/test/gameplay.ml
A => test/dune
A => test/run_tests.ml
M panacea.opam +1 -0
@@ 14,4 14,5 @@ depends: [
   "logs" {= "0.6.3"}
   "re2" {= "v0.13.0"}
   "ppx_deriving" {= "4.4.1"}
+  "alcotest"
 ]

          
M src/panacea_lib/dune +1 -1
@@ 1,6 1,6 @@ 
 (library
  (name panacea_lib)
  (inline_tests)
- (libraries core re2 logs)
+ (libraries core re2 logs alcotest)
  (preprocess
   (pps ppx_deriving.show ppx_let ppx_jane ppx_inline_test)))

          
A => src/panacea_lib/test/dune +4 -0
@@ 0,0 1,4 @@ 
+(library
+ (name test_panacea)
+ (libraries alcotest panacea_lib)
+ (synopsis "Tests for Panacea"))

          
A => src/panacea_lib/test/gameplay.ml +10 -0
@@ 0,0 1,10 @@ 
+
+let check msg x = Alcotest.(check bool) msg true x
+
+let test_unit () =
+  check "Give it a shot" true;
+  check "Another" false 
+
+let tests = [
+  "time", `Quick, test_unit;
+]

          
A => test/dune +8 -0
@@ 0,0 1,8 @@ 
+(executable
+ (name run_tests)
+ (libraries alcotest test_panacea))
+
+(alias
+ (name runtest)
+ (deps run_tests.exe)
+ (action (run %{deps} -q --color=always)))

          
A => test/run_tests.ml +7 -0
@@ 0,0 1,7 @@ 
+(* Gameplay functions *)
+
+let test_suites: unit Alcotest.test list = [
+  "Gameplay Tests", Test_panacea.Gameplay.tests;
+]
+
+let () = Alcotest.run "proj" test_suites