YREA-SLS/SLS_C/Failing Tests.md

1.5 KiB

Failing Tests

These tests fail and haven't been fixed yet as they would likely take major refactoring to fix, which I may not have time to do before finals week.

Integer i64 Overflow

code: 9223372036854775808:i64
error: Integer overflow: value exceeds range for i64.

This test fails because the parsed integer has already overflowed inside the interpreter, so an integer token is returned with no overflow error detected.

Integer i64 Underflow

code: -9223372036854775809:i64
error: Integer overflow: value exceeds range for i64.

This test fails because the parsed integer has already overflowed inside the interpreter, so an integer token is returned with no overflow error detected.

Integer u64 Overflow

code: 18446744073709551616:u64
error: Integer overflow: value exceeds range for u64.

This test fails because the parsed integer has already overflowed inside the interpreter, so an integer token is returned with no overflow error detected.

Integer i16 Binary Sample

code: 0b1111111100000000:i16
value: -256

This test fails because the interpreter fails to recognize this as a negative number, and parses is as 65280, which is greater than the signed 16-bit max of 32767, resulting in an overflow error.

Float Default No Leading Digit Negative

code: -.25
value: -0.25

This test fails because the interpreter fails to recognize a token starting with both a - then a . then a digit, as a numeric literal, resulting in it being interpreted as an identifier.