vincent-hugot / qtest

Inline (Unit) Tests for OCaml
GNU General Public License v3.0
67 stars 8 forks source link

can't we embed comments inside of a test? #23

Closed UnixJunkie closed 8 years ago

UnixJunkie commented 8 years ago
(*$T toto
(* comment *)
toto x = 1
*)
vincent-hugot commented 8 years ago

Sure we can :

(*$T foo
  foo  0 ( + ) [1;2;3] = 6  (* hehe *)
  foo  0 ( * ) [1;2;3] = 0  (* haha (*hoho *) *)
  foo  1 ( * ) [4;5]   = 20
  foo 12 ( + ) []      = 12
*)

But each line must be a test.

If the lines are too long, you can combine with linebreaks like so:

  (* sss *) \
  foo  0 ( + ) [1;2;3] = 6  \
  (* hehe *)
UnixJunkie commented 8 years ago

ok, cool, thanks!