]> git.localhorst.tv Git - blobs.git/blobdiff - tst/math/StabilityTest.hpp
randomize creature properties a bit
[blobs.git] / tst / math / StabilityTest.hpp
diff --git a/tst/math/StabilityTest.hpp b/tst/math/StabilityTest.hpp
new file mode 100644 (file)
index 0000000..8b6409e
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef BLOBS_TEST_MATH_STABILITYTEST_HPP
+#define BLOBS_TEST_MATH_STABILITYTEST_HPP
+
+#include "math/glm.hpp"
+
+#include <cppunit/extensions/HelperMacros.h>
+
+
+
+namespace blobs {
+namespace math {
+
+class SimplexNoise;
+class WorleyNoise;
+
+namespace test {
+
+class StabilityTest
+: public CppUnit::TestFixture {
+
+CPPUNIT_TEST_SUITE(StabilityTest);
+
+CPPUNIT_TEST(testRNG);
+CPPUNIT_TEST(testSimplex);
+CPPUNIT_TEST(testWorley);
+
+CPPUNIT_TEST_SUITE_END();
+
+public:
+       void setUp();
+       void tearDown();
+
+       void testRNG();
+       void testSimplex();
+       void testWorley();
+
+       static void Assert(
+               const SimplexNoise &noise,
+               const glm::vec3 &position,
+               float expected);
+
+       static void Assert(
+               const WorleyNoise &noise,
+               const glm::vec3 &position,
+               float expected);
+
+};
+
+}
+}
+}
+
+#endif