From 3584c9778a34a90b8892242e9f09880603a0e481 Mon Sep 17 00:00:00 2001 From: tslettebo Date: Mon, 7 Oct 2002 13:21:50 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@65 7ec92016-0320-0410-acc4-a06ded1c099a --- tools/RegressionTest2/DataGeneratorsTest.h | 70 ---------------------- 1 file changed, 70 deletions(-) delete mode 100644 tools/RegressionTest2/DataGeneratorsTest.h diff --git a/tools/RegressionTest2/DataGeneratorsTest.h b/tools/RegressionTest2/DataGeneratorsTest.h deleted file mode 100644 index b19f06e..0000000 --- a/tools/RegressionTest2/DataGeneratorsTest.h +++ /dev/null @@ -1,70 +0,0 @@ -//DataGeneratorsTest.h - - -#ifndef DATAGENERATORSTEST_H -#define DATAGENERATORSTEST_H - -#include -#include -#include "UnitTest.h" - -template -T& remove_const(const T& t) - { - return const_cast(t); - } - - -struct DataGeneratorsTest : public Test - { - DataGeneratorsTest() : Test("DataGeneratorsTest.h") - {} - virtual void execute(TestResult& result) - { - this->printName(result); - - using namespace Loki; - using namespace Loki::TL; - - bool b; - typedef MakeTypelist<>::Result null_tl; - typedef MakeTypelist::Result char_types; - int n = Length::value; - - std::vector names; - names.reserve(n); - //Some fascist decided that all temporaries should be const. - //The following line of code stupidity is a direct result of the half-baked idea - iterate_types(remove_const(std::back_inserter(names))); - b = names.size() == n; - testAssert("iterate_types - Check Length", b, result); - - std::vector sizes; - sizes.reserve(n); - typedef MakeTypelist::Result some_types; - iterate_types(remove_const(std::back_inserter(sizes))); - size_t apriori_size[] = {sizeof(char), sizeof(short), sizeof(int), sizeof(double)}; - b = true; - for(int i=0; i(sizes); - b = sizes.size() == 0; - testAssert("iterate_types - Degenerate Case 1 - Null List", b, result); - - sizes.resize(0); - iterate_types(sizes); - b = sizes.size() == 0; - testAssert("iterate_types - Degenerate Case 2 - NullType", b, result); - } - }; - -#endif //DATAGENERATORSTEST_H