-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 7 bit long
note_type_id
(#10951)
- Loading branch information
Showing
8 changed files
with
51 additions
and
22 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
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 was deleted.
Oops, something went wrong.
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
12 changes: 12 additions & 0 deletions
12
noir-projects/noir-contracts/contracts/test_contract/src/test.nr
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,12 @@ | ||
use crate::test_note::TestNote; | ||
use dep::uint_note::uint_note::UintNote; | ||
use dep::value_note::value_note::ValueNote; | ||
|
||
#[test] | ||
unconstrained fn test_note_type_id() { | ||
// The order in which the note types are sorted seems arbitrary and an implementation detail of Noir, | ||
// but the important thing is that they are sequential and start from 0. | ||
assert_eq(UintNote::get_note_type_id(), 0, "UintNote type id should be 0"); | ||
assert_eq(ValueNote::get_note_type_id(), 1, "ValueNote type id should be 1"); | ||
assert_eq(TestNote::get_note_type_id(), 2, "TestNote type id should be 2"); | ||
} |
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