Skip to content

Commit 43f16a2

Browse files
committed
Add small tests for unsafe_bool and unsafe_int casting
1 parent 1d05680 commit 43f16a2

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract Test(bytes4 x) {
2+
function test() {
3+
require(unsafe_bool(x));
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract Test(sig x) {
2+
function test(bytes4 y) {
3+
require(unsafe_int(x) > unsafe_int(y));
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract Test(int x) {
2+
function test() {
3+
require(unsafe_bool(x));
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract Test(bytes4 x) {
2+
function test(bytes4 y) {
3+
require(unsafe_int(x) > unsafe_int(y));
4+
}
5+
}

0 commit comments

Comments
 (0)