Add acceptance_tests/109 to illustrate new config/constants capabilities.

This commit is contained in:
KtorZ 2024-08-17 15:09:47 +02:00
parent 38e8c6264d
commit a909e9eb0a
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# This file was generated by Aiken
# You typically do not need to edit this file
requirements = []
packages = []
[etags]

View File

@ -0,0 +1,20 @@
name = "aiken-lang/109"
version = "0.0.0"
license = "Apache-2.0"
description = "Aiken contracts for project 'aiken-lang/109'"
[repository]
user = "aiken-lang"
project = "109"
platform = "github"
[config.default]
int = 42
bool = true
string = "foo"
bytearray = { bytes = "666f6f", encoding = "base16" }
tuple = [14, false]
list = [1, 2, 3, 4, 5, 6]
nested_tuple = [[true, "foo"], [1, []]]
nested_list = [[1, 2], [3, 4]]
nested_hybrid = [[1, true], [2, false]]

View File

@ -0,0 +1,37 @@
use config
test config_int() {
config.int == 42
}
test config_bool() {
config.bool == True
}
test config_string() {
config.string == "foo"
}
test config_bytearray() {
config.bytearray == "foo"
}
test config_tuple() {
config.tuple == (14, False)
}
test config_list() {
config.list == [1, 2, 3, 4, 5, 6]
}
test config_nested_tuple() {
config.nested_tuple == ((True, "foo"), (1, []))
}
test config_nested_list() {
config.nested_list == [[1, 2], [3, 4]]
}
test config_nested_hybrid() {
config.nested_hybrid == [(1, True), (2, False)]
}