mirage / alcotest

A lightweight and colourful test framework
ISC License
451 stars 80 forks source link

Suggestion: Support infix #371

Open bn-d opened 1 year ago

bn-d commented 1 year ago

It will be convenient if the infix is added

i.e

let (>>:) name test = Alcotest.test_case name `Quick test
let (>::) name test = Alcotest.test_case name `Slow test

let () =
  Alcotest.run "Utils"
    [
      ( "string-case",
        [
          "Lower case" >>: test_lowercase;
          "Capitalization" >>: test_capitalize;
        ] );
      ( "string-concat",
        [ "String mashing" >>: test_str_concat ] );
      ( "list-concat",
        [ "List mashing" >:: test_list_concat ] );
    ]