1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
This commit is contained in:
schaeff 2021-06-30 13:18:38 +02:00
parent dce8a2979e
commit 9fc66516c4
4 changed files with 53 additions and 1 deletions

View file

@ -1,5 +1,5 @@
{
"entry_point": "./tests/tests/arrays/identity.code",
"entry_point": "./tests/tests/arrays/identity.zok",
"curves": ["Bn128", "Bls12_381", "Bls12_377", "Bw6_761"],
"tests": [
{

View file

@ -0,0 +1,50 @@
{
"entry_point": "./tests/tests/arrays/select.zok",
"max_constraint_count": 44,
"curves": ["Bn128", "Bls12_381", "Bls12_377", "Bw6_761"],
"tests": [
{
"input": {
"values": ["0", "11", "22", "0"]
},
"output": {
"Ok": {
"values": ["0"]
}
}
},
{
"input": {
"values": ["0", "11", "22", "1"]
},
"output": {
"Ok": {
"values": ["11"]
}
}
},
{
"input": {
"values": ["0", "11", "22", "2"]
},
"output": {
"Ok": {
"values": ["22"]
}
}
},
{
"input": {
"values": ["0", "11", "22", "3"]
},
"output": {
"Err": {
"UnsatisfiedConstraint": {
"left": "1",
"right": "0"
}
}
}
}
]
}

View file

@ -0,0 +1,2 @@
def main(field[3] array, u32 index) -> field:
return array[index]