瀏覽代碼

Added the discriminative test for the function bug

devel
Ludovic 'Archivist' Lagouardette 4 年之前
父節點
當前提交
dff2c93de5
共有 1 個檔案被更改,包括 21 行新增1 行删除
  1. +21
    -1
      tests/math.cpp

+ 21
- 1
tests/math.cpp 查看文件

@ -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…
取消
儲存