Add initial test

This commit is contained in:
Maiste committed 2023-10-19 14:03:12 +02:00
1 parent c7bdcb974c
commit 5f97fd6e34
4 files changed
+18 -2

No files matched your search

+3 -1
View File
@@ -15,5 +15,7 @@
(description "The Gilded Rose Refactoring Kata in OCaml") (description "The Gilded Rose Refactoring Kata in OCaml")
(depends (depends
(ocaml (>= 4.08)) (ocaml (>= 4.08))
dune)) dune
ppx_deriving
(alcotest (>= 1.7.0))))
+2
View File
@@ -12,6 +12,8 @@ bug-reports:
depends: [ depends: [
"ocaml" {>= "4.08"} "ocaml" {>= "4.08"}
"dune" {>= "3.11"} "dune" {>= "3.11"}
"ppx_deriving"
"alcotest" {>= "1.7.0"}
"odoc" {with-doc} "odoc" {with-doc}
] ]
build: [ build: [
+2 -1
View File
@@ -1,2 +1,3 @@
(test (test
(name gilded_rose)) (name gilded_rose)
(libraries gilded_rose alcotest))
+11
View File
@@ -0,0 +1,11 @@
open Gilded_rose
let test () =
let items = Items.v ~items:[ Item.v "Foo" 10 20 ] () in
Alcotest.(check string)
"Broken test" "Fixme"
(List.hd items |> fun item -> item.name)
let () =
let open Alcotest in
run "Gilded Rose" [ ("Our first test", [ test_case "fixme" `Quick test ]) ]