diff --git a/tests/python/codegen/test_codegen_integration.py b/tests/python/codegen/test_codegen_integration.py index 58380a902..d1730fa42 100644 --- a/tests/python/codegen/test_codegen_integration.py +++ b/tests/python/codegen/test_codegen_integration.py @@ -3,11 +3,14 @@ from pyflamegpu import * import pyflamegpu.codegen from random import randint +import typing AGENT_COUNT = 100 STEPS = 5 +TEN: pyflamegpu.constant = 10 +TWO: typing.Final = 2 @pyflamegpu.device_function def add_2(a : int) -> int: @@ -15,7 +18,7 @@ def add_2(a : int) -> int: Pure python agent device function that can be called from a @pyflamegpu.agent_function Function adds two to an int variable """ - return a + 2 + return a + TWO @pyflamegpu.agent_function def add_func(message_in: pyflamegpu.MessageNone, message_out: pyflamegpu.MessageNone): @@ -26,7 +29,7 @@ def add_func(message_in: pyflamegpu.MessageNone, message_out: pyflamegpu.Message @pyflamegpu.agent_function_condition def cond_func() -> bool: i = pyflamegpu.getVariableInt("i") - return i < 10 + return i < TEN class GPUTest(TestCase): """