diff --git a/cmd/tools/vtest-self.v b/cmd/tools/vtest-self.v index 27856f6872..3b387ae787 100644 --- a/cmd/tools/vtest-self.v +++ b/cmd/tools/vtest-self.v @@ -131,7 +131,15 @@ const ( 'do_not_remove', ] skip_on_non_amd64 = [ - 'vlib/v/tests/closure_test.v' /* not implemented yet */, + // closures aren't implemented yet: + 'vlib/v/tests/closure_test.v', + 'vlib/context/cancel_test.v', + 'vlib/context/deadline_test.v', + 'vlib/context/empty_test.v', + 'vlib/context/value_test.v', + 'vlib/context/onecontext/onecontext_test.v', + 'vlib/sync/once_test.v', + 'vlib/sync/many_times_test.v', 'do_not_remove', ] ) diff --git a/vlib/builtin/int_test.v b/vlib/builtin/int_test.v index 17976685a1..7a20814c3a 100644 --- a/vlib/builtin/int_test.v +++ b/vlib/builtin/int_test.v @@ -131,7 +131,12 @@ fn test_bin() { x5 := byte(0b11111111) assert x5 == 255 x6 := char(0b11111111) - assert int(x6) == -1 + // C.char is unsigned on arm64, but signed on amd64, by default + $if arm64 { + assert int(x6) == 255 + } $else { + assert int(x6) == -1 + } x7 := 0b0 assert x7 == 0 x8 := -0b0 diff --git a/vlib/math/complex/complex_test.v b/vlib/math/complex/complex_test.v index ccd448e779..152678da35 100644 --- a/vlib/math/complex/complex_test.v +++ b/vlib/math/complex/complex_test.v @@ -142,7 +142,8 @@ fn test_complex_angle() { c = cmplx.complex(-1, -1) assert c.angle() * 180 / math.pi == -135 cc := c.conjugate() - assert cc.angle() + c.angle() == 0 + a := cc.angle() + assert a + c.angle() == 0 } fn test_complex_addinv() { diff --git a/vlib/v/transformer/transformer.v b/vlib/v/transformer/transformer.v index 70e5e3661d..623c654a91 100644 --- a/vlib/v/transformer/transformer.v +++ b/vlib/v/transformer/transformer.v @@ -287,7 +287,8 @@ pub fn (mut t Transformer) check_safe_array(mut node ast.IndexExpr) { name := node.left match index { ast.IntegerLiteral { - node.is_direct = t.index.safe_access(name.str(), index.val.int()) + is_direct := t.index.safe_access(name.str(), index.val.int()) + node.is_direct = is_direct } ast.RangeExpr { if index.has_high {