From a808cd8f8d8bf4cff359267fc83d3067adda2fa8 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 4 Dec 2014 10:47:43 +0000 Subject: [PATCH] test: add a compile-time test for interpolation of compound types. --- src/t/Makefile.am | 2 +- src/t/math/simplex_interpolator.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/t/Makefile.am b/src/t/Makefile.am index e6d91686..11755436 100644 --- a/src/t/Makefile.am +++ b/src/t/Makefile.am @@ -20,7 +20,7 @@ test_math_SOURCES = test-common.cpp \ math/array2d.cpp math/array3d.cpp math/arraynd.cpp math/box.cpp \ math/cmplx.cpp math/half.cpp math/interp.cpp math/matrix.cpp \ math/quat.cpp math/rand.cpp math/real.cpp math/rotation.cpp \ - math/trig.cpp math/vector.cpp + math/trig.cpp math/vector.cpp math/simplex_interpolator.cpp test_math_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tools/lolunit test_math_DEPENDENCIES = @LOL_DEPS@ diff --git a/src/t/math/simplex_interpolator.cpp b/src/t/math/simplex_interpolator.cpp index aba46ff4..35737ae8 100644 --- a/src/t/math/simplex_interpolator.cpp +++ b/src/t/math/simplex_interpolator.cpp @@ -61,6 +61,12 @@ lolunit_declare_fixture(SimplexInterpolatorTest) void TearDown() {} + lolunit_declare_test(CompoundVariable) + { + test_interpolator<2, real> b({{ real(0) }}); + test_interpolator<2, vec2> c({{ vec2(0) }}); + } + lolunit_declare_test(CoordinateMatrixTest) { test_interpolator<2> s2({{1.f}});