-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove the three tuple storage packing since it's only used in one place
- Loading branch information
1 parent
88ed52b
commit 59a8cb8
Showing
4 changed files
with
40 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use governance::utils::u64_tuple_storage::{ThreeU64TupleStorePacking, TwoU64TupleStorePacking}; | ||
use governance::utils::u64_tuple_storage_test::{assert_pack_unpack}; | ||
use starknet::storage_access::{StorePacking}; | ||
|
||
#[test] | ||
fn test_three_tuple_storage_forward_back() { | ||
assert_pack_unpack(ExecutionState { created: 123, executed: 234, canceled: 345 }); | ||
assert_pack_unpack(ExecutionState { created: 0, executed: 0, canceled: 0 }); | ||
|
||
assert_pack_unpack( | ||
ExecutionState { | ||
created: 0xffffffffffffffff, executed: 0xffffffffffffffff, canceled: 0xffffffffffffffff | ||
} | ||
); | ||
|
||
assert_pack_unpack( | ||
ExecutionState { created: 0xffffffffffffffff, executed: 0xffffffffffffffff, canceled: 0 } | ||
); | ||
assert_pack_unpack(ExecutionState { created: 0xffffffffffffffff, executed: 0, canceled: 0 }); | ||
|
||
assert_pack_unpack( | ||
ExecutionState { created: 0xffffffffffffffff, executed: 0, canceled: 0xffffffffffffffff } | ||
); | ||
assert_pack_unpack(ExecutionState { created: 0, executed: 0, canceled: 0xffffffffffffffff }); | ||
|
||
assert_pack_unpack( | ||
ExecutionState { created: 0, executed: 0xffffffffffffffff, canceled: 0xffffffffffffffff } | ||
); | ||
} |
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