Skip to content

Commit

Permalink
Fix compilation on native
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilquist committed May 13, 2024
1 parent 3486cd2 commit d6279eb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ByteVectorNativeTest extends BitsSuite {
}

test("view(Ptr[Byte])") {
Zone { implicit z =>
Zone.acquire { implicit z =>
val ptr = alloc[Byte](4)
setDEADBEEF(ptr)
val byteVector: ByteVector = ByteVector.view(ptr, 4)
Expand All @@ -54,7 +54,7 @@ class ByteVectorNativeTest extends BitsSuite {
}

test("fromPtr") {
Zone { implicit z =>
Zone.acquire { implicit z =>
val ptr = alloc[Byte](4)
setDEADBEEF(ptr)
val byteVector: ByteVector = ByteVector.fromPtr(ptr, 4)
Expand All @@ -65,7 +65,7 @@ class ByteVectorNativeTest extends BitsSuite {
}

test("copyToPtr") {
Zone { implicit z =>
Zone.acquire { implicit z =>
val ptr = alloc[Byte](6)
ptr(0) = 0xaa.toByte
ptr(5) = 0xff.toByte
Expand All @@ -75,7 +75,7 @@ class ByteVectorNativeTest extends BitsSuite {
}

test("toPtr") {
Zone { implicit z =>
Zone.acquire { implicit z =>
assert(ByteVector.view(hex"deadbeef".toPtr, 4) === hex"deadbeef")
}
}
Expand Down

0 comments on commit d6279eb

Please sign in to comment.