Skip to content

Commit

Permalink
Add builtin byte test for Rust backend
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcadman committed Aug 1, 2024
1 parent 8c4a1e1 commit 7332b98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion test/Rust/Compilation/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,10 @@ tests =
"Test073: Import and use a syntax alias"
$(mkRelDir "test073")
$(mkRelFile "test073.juvix")
$(mkRelFile "out/test073.out")
$(mkRelFile "out/test073.out"),
posTest
"Test074: Builtin Byte"
$(mkRelDir ".")
$(mkRelFile "test074.juvix")
$(mkRelFile "out/test074.out")
]
2 changes: 1 addition & 1 deletion tests/Rust/Compilation/positive/out/test074.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-1085550836599839364109196834928521031686932164599479009991927616840761606155
2
7 changes: 7 additions & 0 deletions tests/Rust/Compilation/positive/test074.juvix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module test074;

import Stdlib.Prelude open;

n1 : Byte := Byte.fromNat 0xff;

main : Byte := Byte.fromNat (Byte.toNat 0x103 + Byte.toNat n1);

0 comments on commit 7332b98

Please sign in to comment.