-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improve bitwise tests * fix test * assert xor,or and uptade ptr * delete bitwise_test.cairo * rename file * Add let to declaration * Rename test * Re order values in the correct way * Fix expect order * Format and clean file * Format code * Remove non-used imports * Add missing import and run tests --------- Co-authored-by: danielcdz <[email protected]>
- Loading branch information
Showing
4 changed files
with
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
%builtins bitwise | ||
|
||
from starkware.cairo.common.cairo_builtins import BitwiseBuiltin | ||
|
||
func main{bitwise_ptr: BitwiseBuiltin*}() { | ||
assert bitwise_ptr.x = 12; // Binary 1100 | ||
assert bitwise_ptr.y = 10; // Binary 1010 | ||
assert bitwise_ptr.x_and_y = 8; // Binary 1000 | ||
assert bitwise_ptr.x_xor_y = 6; // Binary 0110 | ||
assert bitwise_ptr.x_or_y = 14; // Binary 1110 | ||
|
||
let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE; | ||
|
||
return (); | ||
} |
This file was deleted.
Oops, something went wrong.
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