chore: fix some tests that now correctly fail due to arity checks

This commit is contained in:
rvcas 2024-08-22 16:38:42 -04:00 committed by KtorZ
parent c706d6072d
commit c57009bf99
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 11 additions and 11 deletions

View File

@ -358,7 +358,7 @@ fn expect_multi_patterns() {
fn validator_correct_form() { fn validator_correct_form() {
let source_code = r#" let source_code = r#"
validator foo { validator foo {
spend(d, r, c) { spend(d, r, oref, c) {
True True
} }
} }
@ -389,11 +389,11 @@ fn validator_in_lib_warning() {
fn multi_validator() { fn multi_validator() {
let source_code = r#" let source_code = r#"
validator foo(foo: ByteArray, bar: Int) { validator foo(foo: ByteArray, bar: Int) {
spend(_d, _r, _c) { spend(_d, _r, _oref, _c) {
foo == #"aabb" foo == #"aabb"
} }
mint(_r, _c) { mint(_r, _p, _c) {
bar == 0 bar == 0
} }
} }
@ -408,11 +408,11 @@ fn multi_validator() {
fn multi_validator_warning() { fn multi_validator_warning() {
let source_code = r#" let source_code = r#"
validator foo(foo: ByteArray, bar: Int) { validator foo(foo: ByteArray, bar: Int) {
spend(_d, _r, _c) { spend(_d, _r, _oref, _c) {
foo == #"aabb" foo == #"aabb"
} }
mint(_r, _c) { mint(_r, _p, _c) {
True True
} }
} }
@ -458,7 +458,7 @@ fn exhaustiveness_simple() {
fn validator_args_no_annotation() { fn validator_args_no_annotation() {
let source_code = r#" let source_code = r#"
validator hello(d) { validator hello(d) {
spend(a, b, c) { spend(a, b, oref, c) {
True True
} }
} }
@ -2471,7 +2471,7 @@ fn validator_private_type_leak() {
} }
validator bar { validator bar {
spend(datum: Datum, redeemer: Redeemer, _ctx) { spend(datum: Datum, redeemer: Redeemer, _oref, _ctx) {
datum.foo == redeemer.bar datum.foo == redeemer.bar
} }
} }
@ -2495,7 +2495,7 @@ fn validator_public() {
} }
validator bar { validator bar {
spend(datum: Datum, redeemer: Redeemer, _ctx) { spend(datum: Datum, redeemer: Redeemer, _oref, _ctx) {
datum.foo == redeemer.bar datum.foo == redeemer.bar
} }
} }

View File

@ -1,6 +1,6 @@
--- ---
source: crates/aiken-project/src/blueprint/validator.rs source: crates/aiken-project/src/blueprint/validator.rs
description: "Code:\n\npub opaque type Dict<key, value> {\n inner: List<(ByteArray, value)>\n}\n\ntype UUID { UUID }\n\nvalidator {\n fn opaque_singleton_variants(redeemer: Dict<UUID, Int>, ctx: Void) {\n True\n }\n}\n" description: "Code:\n\npub opaque type Dict<key, value> {\n inner: List<(ByteArray, value)>\n}\n\npub type UUID { UUID }\n\nvalidator opaque_singleton_variants {\n spend(datum: Option<Data>, redeemer: Dict<UUID, Int>, output_reference: Data, transaction: Data) {\n True\n }\n}\n"
--- ---
Schema { Schema {
error: Error { error: Error {
@ -16,7 +16,7 @@ Schema {
tipo: RefCell { tipo: RefCell {
value: Link { value: Link {
tipo: App { tipo: App {
public: false, public: true,
contains_opaque: false, contains_opaque: false,
module: "test_module", module: "test_module",
name: "UUID", name: "UUID",
@ -47,7 +47,7 @@ Schema {
}, },
], ],
}, },
location: 137..162, location: 165..190,
source_code: NamedSource { source_code: NamedSource {
name: "", name: "",
source: "<redacted>", source: "<redacted>",