Skip to content

Commit 60a8a28

Browse files
committed
Initial implementation of nestable test API
1 parent cf54cde commit 60a8a28

150 files changed

Lines changed: 3158 additions & 1390 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
all:
44
dune build
55

6+
doc:
7+
dune build @doc --force
8+
cp -r _build/default/_doc/_html doc/static/api
9+
610
test:
711
dune runtest
812

alcotest-async.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
99
doc: "https://mirage.github.io/alcotest"
1010
bug-reports: "https://github.com/mirage/alcotest/issues"
1111
depends: [
12-
"dune" {>= "2.2"}
12+
"dune" {>= "2.4"}
1313
"re" {with-test}
1414
"fmt" {with-test}
1515
"cmdliner" {with-test}

alcotest-lwt.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
99
doc: "https://mirage.github.io/alcotest"
1010
bug-reports: "https://github.com/mirage/alcotest/issues"
1111
depends: [
12-
"dune" {>= "2.2"}
12+
"dune" {>= "2.4"}
1313
"re" {with-test}
1414
"cmdliner" {with-test}
1515
"fmt"

alcotest-mirage.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
99
doc: "https://mirage.github.io/alcotest"
1010
bug-reports: "https://github.com/mirage/alcotest/issues"
1111
depends: [
12-
"dune" {>= "2.2"}
12+
"dune" {>= "2.4"}
1313
"re" {with-test}
1414
"cmdliner" {with-test}
1515
"fmt"

alcotest.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ homepage: "https://github.com/mirage/alcotest"
1919
doc: "https://mirage.github.io/alcotest"
2020
bug-reports: "https://github.com/mirage/alcotest/issues"
2121
depends: [
22-
"dune" {>= "2.2"}
22+
"dune" {>= "2.4"}
2323
"ocaml" {>= "4.03.0"}
2424
"fmt" {>= "0.8.7"}
2525
"astring"

dune-project

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
(lang dune 2.2)
2-
(implicit_transitive_deps false)
1+
(lang dune 2.4)
32
(generate_opam_files true)
3+
(using mdx 0.1)
44

55
(name alcotest)
66
(source (github mirage/alcotest))
@@ -80,3 +80,6 @@ tests to run.
8080
duration
8181
lwt
8282
logs))
83+
84+
(package
85+
(name ppx_alcotest))

examples/bad/bad.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ For more information, please refer to <http://unlicense.org/>
2727

2828
(* Run with [dune exec ./examples/bad/bad.exe] *)
2929

30+
module Alcotest = Alcotest.V1
31+
3032
(* A module with functions to test *)
3133
module To_test = struct
3234
let capitalise = Astring.String.Ascii.uppercase

examples/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
(tests
2-
(names simple floats)
2+
(names simple floats new)
33
(package alcotest)
44
(libraries alcotest))

examples/floats.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ OTHER DEALINGS IN THE SOFTWARE.
2525
For more information, please refer to <http://unlicense.org/>
2626
*)
2727

28+
module Alcotest = Alcotest.V1
29+
2830
let e = epsilon_float
2931

3032
let nan () =

examples/lwt/test.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ For more information, please refer to <http://unlicense.org/>
2626
*)
2727

2828
open Lwt.Infix
29+
module Alcotest_lwt = Alcotest_lwt.V1
2930

3031
exception Library_exception
3132

0 commit comments

Comments
 (0)