-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
287 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,5 @@ members = [ | |
"zokrates_profiler", | ||
] | ||
|
||
[profile.dev] | ||
opt-level = 1 | ||
# [profile.dev] | ||
# opt-level = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
zokrates_core_test/tests/tests/range_check/assert_le_u8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"entry_point": "./tests/tests/range_check/assert_le_u8.zok", | ||
"max_constraint_count": 12, | ||
"curves": ["Bn128"], | ||
"tests": [ | ||
{ | ||
"input": { | ||
"values": ["0x00"] | ||
}, | ||
"output": { | ||
"Ok": { | ||
"value": [] | ||
} | ||
} | ||
}, | ||
{ | ||
"input": { | ||
"values": ["0x01"] | ||
}, | ||
"output": { | ||
"Ok": { | ||
"value": [] | ||
} | ||
} | ||
}, | ||
{ | ||
"input": { | ||
"values": ["0x02"] | ||
}, | ||
"output": { | ||
"Ok": { | ||
"value": [] | ||
} | ||
} | ||
}, | ||
{ | ||
"input": { | ||
"values": ["0x0f"] | ||
}, | ||
"output": { | ||
"Err": { | ||
"UnsatisfiedConstraint": { | ||
"error": { | ||
"SourceAssertion": { | ||
"file": "./tests/tests/range_check/assert_le_u8.zok", | ||
"position": { | ||
"line": 2, | ||
"col": 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def main(u8 x) { | ||
assert(x <= 2); | ||
} |
47 changes: 47 additions & 0 deletions
47
zokrates_core_test/tests/tests/range_check/assert_le_u8_dynamic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"entry_point": "./tests/tests/range_check/assert_le_u8_dynamic.zok", | ||
"max_constraint_count": 31, | ||
"curves": ["Bn128"], | ||
"tests": [ | ||
{ | ||
"input": { | ||
"values": ["0x01", "0x02"] | ||
}, | ||
"output": { | ||
"Ok": { | ||
"value": [] | ||
} | ||
} | ||
}, | ||
{ | ||
"input": { | ||
"values": ["0x02", "0x02"] | ||
}, | ||
"output": { | ||
"Ok": { | ||
"value": [] | ||
} | ||
} | ||
}, | ||
{ | ||
"input": { | ||
"values": ["0x04", "0x02"] | ||
}, | ||
"output": { | ||
"Err": { | ||
"UnsatisfiedConstraint": { | ||
"error": { | ||
"SourceAssertion": { | ||
"file": "./tests/tests/range_check/assert_le_u8_dynamic.zok", | ||
"position": { | ||
"line": 2, | ||
"col": 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
zokrates_core_test/tests/tests/range_check/assert_le_u8_dynamic.zok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def main(u8 a, u8 b) { | ||
assert(a <= b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
def main(field x) { | ||
def main(u8 x) { | ||
assert(x < 2); | ||
return; | ||
} |
Oops, something went wrong.