Feature: let ?before
and ?before_user
arguments from test_function...
returns a Learnocaml_report.t
type (as ?after
)
#495
Labels
kind: feature
New user-facing feature.
Related issue(s) or PR(s):
I don't know, maybe none ?
Related project scope(s):
Grading test functions with
?before : 'a -> ... -> unit
or?before_user: 'a -> ... -> unit
as optionnal argumentRelated user(s):
I don't know, maybe only me ?
The problem
Hello,
Actually, the main utility of preprocessing functions
?before
or?before_user
used as argument oftest_function...
is to introduce references or side-effects. But I'm wondering if theses functions can also print some messages/sections before the test report, and I'm actually not able to find another way to do that.I've tried to wrap
?test
argument, but a message "Computing..." is created before the test.Wanted solution
I want arguments like
?before: 'a -> ... -> Learnocaml_report.t
or?before_user: 'a -> ... -> Learnocaml_report.t
fortest_function
like functions.Considered alternatives
At the moment, I have to use
after
function, then add some fixs by adding a header and removing the last line.Additional context
My actual use of this feature is to add some breaklines between tests, by just creating
before
functionsfun _ -> breakline
, whilebreakline: Learnocaml_report.t
is use aMessage (Break, Informative)
report for instance.The text was updated successfully, but these errors were encountered: