Display counterexamples as Aiken values instead of raw UPLC.
This commit is contained in:
@@ -13,8 +13,8 @@ Test(
|
||||
is_validator_param: false,
|
||||
},
|
||||
location: 9..16,
|
||||
via: DefinitionIdentifier {
|
||||
module: None,
|
||||
via: Var {
|
||||
location: 15..16,
|
||||
name: "f",
|
||||
},
|
||||
tipo: (),
|
||||
@@ -27,8 +27,8 @@ Test(
|
||||
is_validator_param: false,
|
||||
},
|
||||
location: 18..25,
|
||||
via: DefinitionIdentifier {
|
||||
module: None,
|
||||
via: Var {
|
||||
location: 24..25,
|
||||
name: "g",
|
||||
},
|
||||
tipo: (),
|
||||
@@ -42,7 +42,14 @@ Test(
|
||||
location: 0..26,
|
||||
name: "foo",
|
||||
public: false,
|
||||
return_annotation: None,
|
||||
return_annotation: Some(
|
||||
Constructor {
|
||||
location: 0..39,
|
||||
module: None,
|
||||
name: "Bool",
|
||||
arguments: [],
|
||||
},
|
||||
),
|
||||
return_type: (),
|
||||
end_position: 38,
|
||||
can_error: false,
|
||||
|
||||
@@ -13,11 +13,13 @@ Test(
|
||||
is_validator_param: false,
|
||||
},
|
||||
location: 9..27,
|
||||
via: DefinitionIdentifier {
|
||||
module: Some(
|
||||
"fuzz",
|
||||
),
|
||||
name: "any_int",
|
||||
via: FieldAccess {
|
||||
location: 15..27,
|
||||
label: "any_int",
|
||||
container: Var {
|
||||
location: 15..19,
|
||||
name: "fuzz",
|
||||
},
|
||||
},
|
||||
tipo: (),
|
||||
},
|
||||
@@ -30,7 +32,14 @@ Test(
|
||||
location: 0..28,
|
||||
name: "foo",
|
||||
public: false,
|
||||
return_annotation: None,
|
||||
return_annotation: Some(
|
||||
Constructor {
|
||||
location: 0..41,
|
||||
module: None,
|
||||
name: "Bool",
|
||||
arguments: [],
|
||||
},
|
||||
),
|
||||
return_type: (),
|
||||
end_position: 40,
|
||||
can_error: false,
|
||||
|
||||
@@ -13,7 +13,14 @@ Test(
|
||||
location: 0..10,
|
||||
name: "foo",
|
||||
public: false,
|
||||
return_annotation: None,
|
||||
return_annotation: Some(
|
||||
Constructor {
|
||||
location: 0..23,
|
||||
module: None,
|
||||
name: "Bool",
|
||||
arguments: [],
|
||||
},
|
||||
),
|
||||
return_type: (),
|
||||
end_position: 22,
|
||||
can_error: false,
|
||||
|
||||
@@ -37,7 +37,14 @@ Test(
|
||||
location: 0..26,
|
||||
name: "invalid_inputs",
|
||||
public: false,
|
||||
return_annotation: None,
|
||||
return_annotation: Some(
|
||||
Constructor {
|
||||
location: 0..61,
|
||||
module: None,
|
||||
name: "Bool",
|
||||
arguments: [],
|
||||
},
|
||||
),
|
||||
return_type: (),
|
||||
end_position: 60,
|
||||
can_error: true,
|
||||
|
||||
@@ -187,6 +187,11 @@ pub fn parser(
|
||||
mod tests {
|
||||
use crate::assert_expr;
|
||||
|
||||
#[test]
|
||||
fn record_enum() {
|
||||
assert_expr!(r#"Winter"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn record_create_labeled() {
|
||||
assert_expr!(r#"User { name: "Aiken", age, thing: 2 }"#);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
source: crates/aiken-lang/src/parser/expr/record.rs
|
||||
description: "Code:\n\nWinter"
|
||||
---
|
||||
Var {
|
||||
location: 0..6,
|
||||
name: "Winter",
|
||||
}
|
||||
Reference in New Issue
Block a user