Skip to content

Commit 4587539

Browse files
committed
Update the test.
1 parent aa3cadb commit 4587539

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/test_compiler_functions.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,12 @@ def test_run_kernel():
371371

372372

373373
def test_refresh_memory():
374-
arg1 = np.array([1, 2, 3]).astype(np.int8)
374+
arg1 = np.array([1, 2, 3]).astype(np.int32)
375+
arguments = [arg1]
375376
cfunc = CompilerFunctions()
376-
output = cfunc.ready_argument_list([arg1])
377-
assert np.all(output == arg1)
378-
arg1 = np.array([0, 0, 0]).astype(np.int8)
379-
assert np.all(arg1 == [0, 0, 0])
380-
cfunc.refresh_memory(arg1, [True])
381-
assert np.all(arg1 == [1, 2, 3])
377+
_ = cfunc.ready_argument_list(arguments)
378+
assert np.all(arguments[0] == [1, 2, 3])
379+
arguments[0] = np.array([0, 0, 0]).astype(np.int8)
380+
assert np.all(arguments[0] == [0, 0, 0])
381+
cfunc.refresh_memory(arguments, [True])
382+
assert np.all(arguments[0] == [1, 2, 3])

0 commit comments

Comments
 (0)