fix: zero arg functions were grabbing extra dependencies they didn't need to
fix: Had the wrong conversion for constant maps to plutus data. Fixed to check for right conversion
This commit is contained in:
13
examples/acceptance_tests/082/aiken.lock
Normal file
13
examples/acceptance_tests/082/aiken.lock
Normal file
@@ -0,0 +1,13 @@
|
||||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
[[requirements]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "main"
|
||||
source = "github"
|
||||
|
||||
[[packages]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "main"
|
||||
requirements = []
|
||||
source = "github"
|
||||
8
examples/acceptance_tests/082/aiken.toml
Normal file
8
examples/acceptance_tests/082/aiken.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
name = "aiken-lang/acceptance_test_082"
|
||||
version = "0.0.0"
|
||||
description = ""
|
||||
|
||||
[[dependencies]]
|
||||
name = 'aiken-lang/stdlib'
|
||||
version = 'main'
|
||||
source = 'github'
|
||||
29
examples/acceptance_tests/082/lib/tests.ak
Normal file
29
examples/acceptance_tests/082/lib/tests.ak
Normal file
@@ -0,0 +1,29 @@
|
||||
use aiken/list
|
||||
use aiken/transaction/value.{Value}
|
||||
|
||||
test foldl_value_test1() {
|
||||
let val1 = value.from_lovelace(1000000)
|
||||
let val2 = value.from_lovelace(2000000)
|
||||
let foo =
|
||||
fn(i: Value, acc: (Value, Int)) {
|
||||
let (v, int) = acc
|
||||
(value.add(i, v), int + 1)
|
||||
}
|
||||
list.foldl([val1, val2], foo, (value.zero(), 0)) == (
|
||||
value.from_lovelace(3000000),
|
||||
2,
|
||||
)
|
||||
}
|
||||
// test foldl_value_test2() {
|
||||
// let val1 = value.from_lovelace(1000000)
|
||||
// let val2 = value.from_lovelace(2000000)
|
||||
// let foo =
|
||||
// fn(i: Value, acc: (Value, Int)) {
|
||||
// let (v, int) = acc
|
||||
// (value.add(i, v), int + 1)
|
||||
// }
|
||||
// list.foldl([val1, val2], foo, (value.from_lovelace(0), 0)) == (
|
||||
// value.from_lovelace(3000000),
|
||||
// 2,
|
||||
// )
|
||||
// }
|
||||
Reference in New Issue
Block a user