You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the clarity version and epoch can be selected at runtime in using the TestEnvironment struct, the test-clarity-vN features requiring us to build the tests three different times (once for each clarity version) are unnecessary and should be replaced by better infrastructure.
One alternative is to introduce a procedural macro that takes in a test function and a version selection. The macro would generate code instantiating a TestEnvironment using the selected version and injecting it into the function provided:
#[test_with_env(v1, v2)]fnthe_test(env:TestEnvironment){// test code}// expands into...#[test]fnthe_test_v1(){let env = TestEnvironment::new(/*version 1 and epoch*/)// test code}#[test]fnthe_test_v2(){let env = TestEnvironment::new(/*version 2 and epoch*/)// test code}
The text was updated successfully, but these errors were encountered:
Since the clarity version and epoch can be selected at runtime in using the
TestEnvironment
struct, thetest-clarity-vN
features requiring us to build the tests three different times (once for each clarity version) are unnecessary and should be replaced by better infrastructure.One alternative is to introduce a procedural macro that takes in a test function and a version selection. The macro would generate code instantiating a
TestEnvironment
using the selected version and injecting it into the function provided:The text was updated successfully, but these errors were encountered: