diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 3f08e20..653a442 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +rm raylib pyray examples ln -s ../raylib ln -s ../pyray ln -s ../examples diff --git a/tests/run_tests_dynamic.sh b/tests/run_tests_dynamic.sh new file mode 100755 index 0000000..1942448 --- /dev/null +++ b/tests/run_tests_dynamic.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +rm raylib pyray examples +ln -s ../dynamic/raylib +ln -s ../dynamic/pyray +ln -s ../examples +for FILE in test_*.py +do + if python3 $FILE; then + echo $FILE returned true + else + echo $FILE returned some error + rm raylib pyray examples + exit + fi +done +rm raylib pyray examples \ No newline at end of file diff --git a/tests/color_test.py b/tests/test_color.py similarity index 100% rename from tests/color_test.py rename to tests/test_color.py diff --git a/tests/test_float_pointers.py b/tests/test_float_pointers.py new file mode 100644 index 0000000..f354fdd --- /dev/null +++ b/tests/test_float_pointers.py @@ -0,0 +1,9 @@ +import pyray as pr + +pr.init_window(1280, 720, "any") + +shader = pr.load_shader("", "shader.fs") +time = pr.ffi.new("float *", 0.0) +timeLoc = pr.get_shader_location(shader, "uTime") +pr.set_shader_value(shader, timeLoc, time, pr.SHADER_UNIFORM_FLOAT) +pr.set_shader_value(shader, timeLoc, 0.0, pr.SHADER_UNIFORM_FLOAT) \ No newline at end of file diff --git a/tests/hello_world.py b/tests/test_hello_world.py similarity index 100% rename from tests/hello_world.py rename to tests/test_hello_world.py diff --git a/tests/test_physac.py b/tests/xtest_physac.py similarity index 100% rename from tests/test_physac.py rename to tests/xtest_physac.py diff --git a/tests/test_physac2.py b/tests/xtest_physac2.py similarity index 100% rename from tests/test_physac2.py rename to tests/xtest_physac2.py diff --git a/tests/raygui_test.py b/tests/xtest_raygui.py similarity index 100% rename from tests/raygui_test.py rename to tests/xtest_raygui.py diff --git a/tests/raygui_test_pyray.py b/tests/xtest_raygui_pyray.py similarity index 100% rename from tests/raygui_test_pyray.py rename to tests/xtest_raygui_pyray.py diff --git a/tests/test_rlgl.py b/tests/xtest_rlgl.py similarity index 100% rename from tests/test_rlgl.py rename to tests/xtest_rlgl.py diff --git a/tests/test_static.py b/tests/xtest_static.py similarity index 100% rename from tests/test_static.py rename to tests/xtest_static.py diff --git a/tests/test_static_with_prefix.py b/tests/xtest_static_with_prefix.py similarity index 100% rename from tests/test_static_with_prefix.py rename to tests/xtest_static_with_prefix.py