ソースを参照

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{});

読み込み中…
キャンセル
保存