From c6eb0be99014d34085e2d24c696aed449e2fb171 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Thu, 12 Jan 2017 22:17:33 -0800 Subject: [PATCH] Remove the negative number tests for bitwise not. They were inadvertently relying on undefined behavior in C and we get different results on some compilers. Until we decide how we want the operation to behave, for now, just leave it unspecified. --- test/core/number/bitwise_not.wren | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/core/number/bitwise_not.wren b/test/core/number/bitwise_not.wren index 2ebd7daa..18cbd4f9 100644 --- a/test/core/number/bitwise_not.wren +++ b/test/core/number/bitwise_not.wren @@ -5,16 +5,10 @@ System.print(~23) // expect: 4294967272 // Max u32 value. System.print(~0xffffffff) // expect: 0 -// Negative numbers. -System.print(~-1) // expect: 0 -System.print(~-123) // expect: 122 -System.print(~-0xfffffffe) // expect: 4294967293 -System.print(~-0xffffffff) // expect: 4294967294 - // Floating point values. System.print(~1.23) // expect: 4294967294 System.print(~0.00123) // expect: 4294967295 System.print(~345.67) // expect: 4294966950 -System.print(~-12.34) // expect: 11 +// TODO: Negative numbers. // TODO: Numbers that don't fit in u32.