mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin,tests: fix int_test.v on macos, m1
This commit is contained in:
@@ -133,12 +133,7 @@ fn test_bin() {
|
|||||||
x5 := u8(0b11111111)
|
x5 := u8(0b11111111)
|
||||||
assert x5 == 255
|
assert x5 == 255
|
||||||
x6 := char(0b11111111)
|
x6 := char(0b11111111)
|
||||||
// C.char is unsigned on arm64, but signed on amd64, by default
|
assert u8(x6) == 255
|
||||||
$if arm64 {
|
|
||||||
assert int(x6) == 255
|
|
||||||
} $else {
|
|
||||||
assert int(x6) == -1
|
|
||||||
}
|
|
||||||
x7 := 0b0
|
x7 := 0b0
|
||||||
assert x7 == 0
|
assert x7 == 0
|
||||||
x8 := -0b0
|
x8 := -0b0
|
||||||
@@ -255,7 +250,7 @@ fn test_repeat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn test_byte_vs_u8() {
|
fn test_byte_vs_u8() {
|
||||||
b := byte(1)
|
bb := byte(1)
|
||||||
u := u8(1)
|
uu := u8(1)
|
||||||
assert b == u
|
assert bb == uu
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user