-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of nestable test API
- Loading branch information
Showing
153 changed files
with
3,310 additions
and
1,529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(tests | ||
(names simple floats) | ||
(names simple floats new) | ||
(package alcotest) | ||
(libraries alcotest)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
(* A module with functions to test *) | ||
module To_test = struct | ||
let lowercase = String.lowercase_ascii | ||
let capitalize = String.capitalize_ascii | ||
let str_concat = String.concat "" | ||
let list_concat = List.append | ||
end | ||
|
||
(* The tests *) | ||
let test_lowercase () = | ||
Alcotest.(check string) "same string" "hello!" (To_test.lowercase "hELLO!") | ||
|
||
let test_capitalize () = | ||
Alcotest.(check string) "same string" "World." (To_test.capitalize "world.") | ||
|
||
let test_str_concat () = | ||
Alcotest.(check string) | ||
"same string" "foobar" | ||
(To_test.str_concat [ "foo"; "bar" ]) | ||
|
||
let test_list_concat () = | ||
Alcotest.(check (list int)) | ||
"same lists" [ 1; 2; 3 ] | ||
(To_test.list_concat [ 1 ] [ 2; 3 ]) | ||
|
||
let () = | ||
let open Alcotest in | ||
print_endline ""; | ||
run | ||
~config:(Config.v ~and_exit:false ()) | ||
~name:__FILE__ | ||
[ | ||
group ~name:"string-case" | ||
[ | ||
test ~name:"Lower case" test_lowercase; | ||
group ~name:"Further_nested" | ||
[ | ||
test ~name:"alpha" test_lowercase; | ||
test ~name:"beta" test_lowercase; | ||
]; | ||
test ~name:"Capitalization" test_capitalize; | ||
]; | ||
group ~name:"string-concat" | ||
[ test ~name:"String mashing" test_str_concat ]; | ||
group ~name:"list-concat" [ test ~name:"List mashing" test_list_concat ]; | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
maintainer: ["[email protected]"] | ||
authors: ["Thomas Gazagnaire"] | ||
license: "ISC" | ||
homepage: "https://github.com/mirage/alcotest" | ||
bug-reports: "https://github.com/mirage/alcotest/issues" | ||
depends: [ | ||
"dune" {>= "2.4"} | ||
] | ||
build: [ | ||
["dune" "subst"] {pinned} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/mirage/alcotest.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module-item-spacing = compact | ||
# break-separators = before | ||
# dock-collection-brackets = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
module Test = Test | ||
module Core = Core | ||
module Cli = Cli | ||
module Config = Config | ||
module Core = Core | ||
module Monad = Monad | ||
module Platform = Platform | ||
module Source_code_position = Source_code_position | ||
module Stdlib_ext = Stdlib_ext | ||
module Tag = Tag | ||
module Test = Test | ||
|
||
module Private = struct | ||
module Utils = Utils | ||
module Pp = Pp | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.