X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Fmath%2FStabilityTest.hpp;fp=tst%2Fmath%2FStabilityTest.hpp;h=8b6409e0ccec050e877377da8f3bf6b1fd8d71ee;hb=8f6530c75730f901efd6708e4fde7e68a178adf1;hp=0000000000000000000000000000000000000000;hpb=c51b3bbef5c9b8ab52f55d46f08c5992fe574f70;p=blobs.git diff --git a/tst/math/StabilityTest.hpp b/tst/math/StabilityTest.hpp new file mode 100644 index 0000000..8b6409e --- /dev/null +++ b/tst/math/StabilityTest.hpp @@ -0,0 +1,53 @@ +#ifndef BLOBS_TEST_MATH_STABILITYTEST_HPP +#define BLOBS_TEST_MATH_STABILITYTEST_HPP + +#include "math/glm.hpp" + +#include + + + +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