Browse Source

Added the discriminative test for the function bug

devel
Ludovic 'Archivist' Lagouardette 4 years ago
parent
commit
dff2c93de5
1 changed files with 21 additions and 1 deletions
  1. +21
    -1
      tests/math.cpp

+ 21
- 1
tests/math.cpp View File

@ -146,4 +146,24 @@ struct render_test : public test_scaffold {
} }
}; };
append_test dummy_ml8576f(new render_test{});
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<float(vec3)> l_sdf_b = gp::sphere_sdf<float>({0.0,0.0,0.0}, 1.0);
gp::function<float(vec3)> sdf = l_sdf_b;
gp_config::assertion(sdf(vec3(0,0,0)) == -1, "Bad sdf");
return res;
}
};
append_test dummy_ml8576f(new function_test{});

Loading…
Cancel
Save