From 8da1b3fd2ef69a39f0c5a5b02599c9b78d7eff6c Mon Sep 17 00:00:00 2001 From: nfarabullini Date: Mon, 15 Jan 2024 09:07:20 +0100 Subject: [PATCH] small edit to test --- .../feature_tests/ffront_tests/test_bound_args.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_bound_args.py b/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_bound_args.py index 2f7cc20c97..fbc409d390 100644 --- a/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_bound_args.py +++ b/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_bound_args.py @@ -49,8 +49,7 @@ def program_bound_args(a: cases.IField, scalar: int32, condition: bool, out: cas def test_with_bound_args_order_args(cartesian_case): @gtx.field_operator def fieldop_args(a: cases.IField, condition: bool, scalar: int32) -> cases.IField: - if not condition: - scalar = 0 + scalar = 0 if not condition else scalar return a + scalar @gtx.program(backend=cartesian_case.backend) @@ -58,10 +57,8 @@ def program_args(a: cases.IField, condition: bool, scalar: int32, out: cases.IFi fieldop_args(a, condition, scalar, out=out) a = cases.allocate(cartesian_case, program_args, "a")() - scalar = int32(1) - ref = a.asnumpy() + scalar out = cases.allocate(cartesian_case, program_args, "out")() prog_bounds = program_args.with_bound_args(condition=True) - prog_bounds(a=a, scalar=scalar, out=out, offset_provider={}) - np.allclose(out.asnumpy(), ref) + prog_bounds(a=a, scalar=int32(1), out=out, offset_provider={}) + np.allclose(out.asnumpy(), a.asnumpy() + int32(1))