Syntax error when using type declaration
Closed this issue · 2 comments
jchavarri commented
When writing type t;
(or any other type) in a Reason box, I'm getting a syntax error.
jchavarri commented
glennsl commented
Test case code is put inside a function that will be executed repeatedly while being masured, and therefore can't include toplevel definitions. You should put these in setup instead.
From the help modal:
A test is a unit of code that will be measured while executed repeatedly. Anything you do not want to measure should be put in the setup block. Furthermore, setup code is toplevel, can include type and module defintions, and anything defined there will be available in every test. The tests on the other hand are isolated by being wrapped in a function.