mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
Add initial test
This commit is contained in:
parent
c7bdcb974c
commit
5f97fd6e34
@ -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))))
|
||||||
|
|
||||||
|
|||||||
@ -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: [
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
(test
|
(test
|
||||||
(name gilded_rose))
|
(name gilded_rose)
|
||||||
|
(libraries gilded_rose alcotest))
|
||||||
|
|||||||
@ -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 ]) ]
|
||||||
Loading…
Reference in New Issue
Block a user