diff --git a/tests/math.cpp b/tests/math.cpp index 23871e7..7870865 100644 --- a/tests/math.cpp +++ b/tests/math.cpp @@ -146,4 +146,24 @@ struct render_test : public test_scaffold { } }; -append_test dummy_ml8576f(new render_test{}); \ No newline at end of file +append_test dummy_pzj6f(new render_test{}); + +struct function_test : public test_scaffold { + function_test() { + name = __FILE__ ":3"; + } + + + virtual int run() { + int res = 0; + gp::function l_sdf_b = gp::sphere_sdf({0.0,0.0,0.0}, 1.0); + + gp::function sdf = l_sdf_b; + + gp_config::assertion(sdf(vec3(0,0,0)) == -1, "Bad sdf"); + + return res; + } +}; + +append_test dummy_ml8576f(new function_test{}); \ No newline at end of file