Allow test definition to carry one parameter

The parameter is special as it takes no annotation but a 'via' keyword followed by an expression that should unify to a Fuzzer<a>, where Fuzzer<a> = fn(Seed) -> (Seed, a). The current commit only allow name identifiers for now. Ultimately, this may allow full expressions.
This commit is contained in:
KtorZ
2024-02-24 19:02:45 +01:00
parent bfb4455e0f
commit aadf3cfb48
13 changed files with 579 additions and 187 deletions

View File

@@ -1,6 +1,6 @@
use pretty_assertions::assert_eq;
use aiken_lang::ast::{Definition, Function, TraceLevel, Tracing, TypedFunction, TypedValidator};
use aiken_lang::ast::{Definition, Function, TraceLevel, Tracing, TypedTest, TypedValidator};
use uplc::{
ast::{Constant, Data, DeBruijn, Name, Program, Term, Type},
builder::{CONSTR_FIELDS_EXPOSER, CONSTR_INDEX_EXPOSER},
@@ -13,7 +13,7 @@ use crate::module::CheckedModules;
use super::TestProject;
enum TestType {
Func(TypedFunction),
Func(TypedTest),
Validator(TypedValidator),
}