From 0379e75dd0c7aabe9558b6a718ae8066a9195b0e Mon Sep 17 00:00:00 2001 From: Cole Poirier Date: Fri, 7 Aug 2020 16:50:24 -0700 Subject: [PATCH] Update test case_mulli --- src/soc/fu/mul/test/test_pipe_caller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/soc/fu/mul/test/test_pipe_caller.py b/src/soc/fu/mul/test/test_pipe_caller.py index 76889410..3581a6fa 100644 --- a/src/soc/fu/mul/test/test_pipe_caller.py +++ b/src/soc/fu/mul/test/test_pipe_caller.py @@ -289,11 +289,13 @@ class MulTestCase(TestAccumulatorBase): test_values = [-32768, -32767, -32766, -2, -1, 0, 1, 2, 32766, 32767] - for i in range(40): - choice = random.choice(test_values) - l = [f"mulli 0, 1, {choice}"] + for i in range(20): + test_values.append(random.randint(-1 << 15, (1 << 15) - 1)) + + for imm in test_values: + l = [f"mulli 0, 1, {imm}"] initial_regs = [0] * 32 - initial_regs[1] = random.randint(-1 << 15, (1 << 15) - 1) + initial_regs[1] = random.randint(0, (1 << 64) - 1) # use "with" so as to close the files used with Program(l, bigendian) as prog: self.add_case(prog, initial_regs) -- 2.30.2