fix: replace decimal u32 overflow test values with hex literals and remove undefined-behavior tests
The bitwise operator tests used decimal literals exceeding u32 range, causing undefined behavior when converting double to u32 on some compilers. This replaces those values with hex equivalents that fit within u32, removes tests for values past max u32, and adds TODO comments for future handling. Also simplifies the `num_bitwiseNot` primitive by removing the intermediate `wideVal` variable, and fixes minor formatting in `util/test.py`.
This commit is contained in:
+6
-4
@@ -11,16 +11,18 @@ from subprocess import Popen, PIPE
|
||||
import sys
|
||||
from threading import Timer
|
||||
|
||||
# Runs the tests.
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--suffix', default='d')
|
||||
parser.add_argument('suite', nargs='?')
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
|
||||
config=args.suffix.lstrip('d')
|
||||
is_debug=args.suffix.startswith('d')
|
||||
config_dir=("debug" if is_debug else "release") + config
|
||||
# Runs the tests.
|
||||
config = args.suffix.lstrip('d')
|
||||
is_debug = args.suffix.startswith('d')
|
||||
config_dir = ("debug" if is_debug else "release") + config
|
||||
|
||||
WREN_DIR = dirname(dirname(realpath(__file__)))
|
||||
WREN_APP = join(WREN_DIR, 'bin', 'wren' + args.suffix)
|
||||
TEST_APP = join(WREN_DIR, 'build', config_dir, 'test', 'wren' + args.suffix)
|
||||
|
||||
Reference in New Issue
Block a user