X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Frand%2FGaloisLFSRTest.hpp;fp=tst%2Frand%2FGaloisLFSRTest.hpp;h=3669ab47eb5980ed7466a1e790457298b1864468;hb=065bafb23d02edbd99f5bfafe803d8ad75398263;hp=0000000000000000000000000000000000000000;hpb=29e8cfd4a72c248583ea9482864c016bb20f40f8;p=blank.git diff --git a/tst/rand/GaloisLFSRTest.hpp b/tst/rand/GaloisLFSRTest.hpp new file mode 100644 index 0000000..3669ab4 --- /dev/null +++ b/tst/rand/GaloisLFSRTest.hpp @@ -0,0 +1,48 @@ +#ifndef BLANK_TEST_RAND_GALOISLFSRTEST_HPP +#define BLANK_TEST_RAND_GALOISLFSRTEST_HPP + +#include + +#include +#include + + +namespace blank { + +namespace test { + +class GaloisLFSRTest +: public CppUnit::TestFixture { + +CPPUNIT_TEST_SUITE(GaloisLFSRTest); + +CPPUNIT_TEST(testFloatNorm); +CPPUNIT_TEST(testFromContainer); + +CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + void tearDown(); + + void testFloatNorm(); + void testFromContainer(); + + /// check if value is in range [minimum,maximum] + static void AssertBetween( + std::string message, + float minimum, + float maximum, + float actual); + + static void AssertContains( + std::string message, + const std::vector &container, + int element); + +}; + +} +} + +#endif