Fennel: CalcInstFactoryTest Class Reference (original) (raw)
Inheritance diagram for CalcInstFactoryTest:

| Public Member Functions | |
|---|---|
| CalcInstFactoryTest () | |
| virtual | ~CalcInstFactoryTest () |
| TestSuite * | releaseTestSuite () |
| void | beforeTestCase (std::string testCaseName) |
| void | afterTestCase (std::string testCaseName) |
| virtual void | testCaseSetUp () |
| Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked. | |
| virtual void | testCaseTearDown () |
| Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked. | |
| virtual void | notifyTrace (std::string source, TraceLevel level, std::string message) |
| Receives notification when a trace event occurs. | |
| virtual TraceLevel | getSourceTraceLevel (std::string source) |
| Gets the level at which a particular source should be traced. | |
| virtual void | initTraceSource (SharedTraceTarget pTraceTarget, std::string name) |
| For use when initialization has to be deferred until after construction. | |
| void | trace (TraceLevel level, std::string message) const |
| Records a trace message. | |
| bool | isTracing () const |
| **Returns:**true iff tracing is enabled for this source | |
| bool | isTracingLevel (TraceLevel level) const |
| Determines whether a particular level is being traced. | |
| TraceTarget & | getTraceTarget () const |
| **Returns:**the TraceTarget for this source | |
| SharedTraceTarget | getSharedTraceTarget () const |
| **Returns:**the SharedTraceTarget for this source | |
| std::string | getTraceSourceName () const |
| Gets the name of this source. | |
| void | setTraceSourceName (std::string const &n) |
| Sets the name of this source. | |
| TraceLevel | getMinimumTraceLevel () const |
| void | disableTracing () |
| Static Public Member Functions | |
| static void | readParams (int argc, char **argv) |
| Parses the command line. | |
| Static Public Attributes | |
| static ParamName | paramTestSuiteName |
| static ParamName | paramTraceFileName |
| static ParamName | paramDictionaryFileName |
| static ParamName | paramTraceLevel |
| static ParamName | paramStatsFileName |
| static ParamName | paramTraceStdout |
| static ParamName | paramDegreeOfParallelism |
| static ConfigMap | configMap |
| Configuration parameters. | |
| Protected Member Functions | |
| void | snooze (uint nSeconds) |
| Protected Attributes | |
| TestSuite * | pTestSuite |
| Boost test suite. | |
| boost::shared_ptr< TestBase > | pTestObj |
| std::ofstream | traceStream |
| Output file stream for tracing. | |
| StrictMutex | traceMutex |
| Protects traceStream. | |
| std::string | testName |
| Name of test. | |
| TraceLevel | traceLevel |
| Level at which to trace test execution. | |
| FileStatsTarget | statsTarget |
| Output for stats. | |
| StatsTimer | statsTimer |
| Timer for stats collection. | |
| bool | traceStdout |
| Copy trace output to stdout. | |
| bool | traceFile |
| Copy trace output to file. | |
| TestCaseGroup | defaultTests |
| TestCaseGroup | extraTests |
| Static Protected Attributes | |
| static bool | runAll |
| Run all test cases, including the extra tests. | |
| static std::string | runSingle |
| Run only the test case of this name. | |
| Private Member Functions | |
| void | testBool () |
| void | testBoolNative () |
| void | testBoolPointer () |
| void | testIntegralNative () |
| void | testIntegralPointer () |
| void | testJump () |
| void | testNativeNative () |
| void | testPointerIntegral () |
| void | testPointerPointer () |
| void | testReturn () |
| Static Private Attributes | |
| static char const *const | all |
| static char const *const | nativeNotBool |
| static char const *const | nativeNotBoolValues |
| static char const *const | pointerArray |
| static char const *const | nativeIntegral |
| static char const *const | nativeIntegralValues |
Detailed Description
Definition at line 44 of file CalcInstFactoryTest.cpp.
Constructor & Destructor Documentation
| CalcInstFactoryTest::CalcInstFactoryTest | ( | | ) | [inline, explicit] | | ---------------------------------------- | - | | - | -------------------- |
Definition at line 65 of file CalcInstFactoryTest.cpp.
References CalcInit::instance(), testBool(), testBoolNative(), testBoolPointer(), testIntegralNative(), testIntegralPointer(), testJump(), testNativeNative(), testPointerIntegral(), testPointerPointer(), and testReturn().
00066 : TraceSource(shared_from_this(),"CalcInstFactoryTest") 00067 { 00068 srand(time(NULL)); 00069 CalcInit::instance(); 00070 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testBool); 00071 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testBoolNative); 00072 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testBoolPointer); 00073 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testIntegralNative); 00074 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testIntegralPointer); 00075 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testJump); 00076 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testNativeNative); 00077 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testPointerIntegral); 00078 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testPointerPointer); 00079 FENNEL_UNIT_TEST_CASE(CalcInstFactoryTest, testReturn); 00080 }
| virtual CalcInstFactoryTest::~CalcInstFactoryTest | ( | | ) | [inline, virtual] | | -------------------------------------------------- | - | | - | ------------------- |
Member Function Documentation
| void CalcInstFactoryTest::testBool | ( | | ) | [private] | | ---------------------------------- | - | | - | ----------- |
Definition at line 118 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage().
Referenced by CalcInstFactoryTest().
00119 {
00120 ostringstream pg("");
00121
00122 const char* Bool[][2] = {
00123 { "OR", "3" },
00124 { "AND", "3" },
00125 { "NOT", "2" },
00126 { "MOVE", "2" },
00127 { "REF", "2" },
00128 { "IS", "3" },
00129 { "ISNOT", "3" },
00130 { "EQ", "3" },
00131 { "NE", "3" },
00132 { "GT", "3" },
00133 { "GE", "3" },
00134 { "LT", "3" },
00135 { "LE", "3" },
00136 { "ISNULL", "2" },
00137 { "ISNOTNULL", "2" },
00138 { "TONULL", "1" },
00139 { "", "" },
00140 };
00141
00142 pg << "O bo;" << endl;
00143 pg << "C bo,bo;" << endl;
00144 pg << "V 1,0;" << endl;
00145 pg << "T;" << endl;
00146
00147 int inst;
00148 for (inst = 0; *(Bool[inst][0]); inst++) {
00149 BOOST_MESSAGE(Bool[inst][0]);
00150 pg << Bool[inst][0] << " O0";
00151 if (atoi(Bool[inst][1]) >= 2) {
00152 pg << ", C0";
00153 }
00154 if (atoi(Bool[inst][1]) >= 3) {
00155 pg << ", C1";
00156 }
00157 pg << ";" << endl;
00158 }
00159
00160 BOOST_MESSAGE(pg.str());
00161
00162 Calculator calc(0);
00163
00164 try {
00165 calc.assemble(pg.str().c_str());
00166 } catch (FennelExcn& ex) {
00167 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00168 BOOST_REQUIRE(0);
00169 }
00170
00171
00172 }
| void CalcInstFactoryTest::testBoolNative | ( | | ) | [private] | | ---------------------------------------- | - | | - | ----------- |
Definition at line 175 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), nativeNotBool, and nativeNotBoolValues.
Referenced by CalcInstFactoryTest().
00176 {
00177 ostringstream pg("");
00178
00179 const char* boolnative[][2] = {
00180 { "EQ", "3" },
00181 { "NE" , "3" },
00182 { "GT", "3" },
00183 { "GE", "3" },
00184 { "LT", "3" },
00185 { "LE", "3" },
00186 { "ISNULL", "2" },
00187 { "ISNOTNULL", "2" },
00188 { "", "" },
00189 };
00190
00191 pg << "O " << nativeNotBool << ", bo;" << endl;
00192 pg << "C " << nativeNotBool << ";" << endl;
00193 pg << "V " << nativeNotBoolValues << ";" << endl;
00194 pg << "T;" << endl;
00195
00196 int inst, type;
00197 for (inst = 0; *(boolnative[inst][0]); inst++) {
00198 BOOST_MESSAGE(boolnative[inst][0]);
00199 for (type = 0; type <= 9; type++) {
00200 pg << boolnative[inst][0] << " O10";
00201 if (atoi(boolnative[inst][1]) >= 2) {
00202 pg << ", C" << type;
00203 }
00204 if (atoi(boolnative[inst][1]) >= 3) {
00205 pg << ", C" << type;
00206 }
00207 pg << ";" << endl;
00208 }
00209 }
00210
00211 BOOST_MESSAGE(pg.str());
00212
00213 Calculator calc(0);
00214
00215 try {
00216 calc.assemble(pg.str().c_str());
00217 } catch (FennelExcn& ex) {
00218 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00219 BOOST_REQUIRE(0);
00220 }
00221
00222
00223 }
| void CalcInstFactoryTest::testBoolPointer | ( | | ) | [private] | | ----------------------------------------- | - | | - | ----------- |
Definition at line 359 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), pointerArray, and stringToHex().
Referenced by CalcInstFactoryTest().
00360 {
00361 ostringstream pg("");
00362
00363 const char* boolpointer[][2] = {
00364 { "EQ", "3", },
00365 { "NE" , "3", },
00366 { "GT", "3", },
00367 { "GE", "3", },
00368 { "LT", "3", },
00369 { "LE", "3", },
00370 { "ISNULL", "2", },
00371 { "ISNOTNULL", "2", },
00372 { "", "" },
00373 };
00374
00375 pg << "O " << pointerArray << ";" << endl;
00376 pg << "C " << pointerArray << ";" << endl;
00377 pg << "V 0x" << stringToHex("a") << ", 0x" << stringToHex("b") <<
00378 ", 1, 0, 1;" << endl;
00379 pg << "T;" << endl;
00380
00381 int inst, type;
00382 for (inst = 0; *(boolpointer[inst][0]); inst++) {
00383 BOOST_MESSAGE(boolpointer[inst][0]);
00384 for (type = 0; type <= 1; type++) {
00385 pg << boolpointer[inst][0] << " O3";
00386 if (atoi(boolpointer[inst][1]) >= 2) {
00387 pg << ", C" << type;
00388 }
00389 if (atoi(boolpointer[inst][1]) >= 3) {
00390 pg << ", C" << type;
00391 }
00392 pg << ";" << endl;
00393 }
00394 }
00395
00396 BOOST_MESSAGE(pg.str());
00397
00398 Calculator calc(0);
00399
00400 try {
00401 calc.assemble(pg.str().c_str());
00402 } catch (FennelExcn& ex) {
00403 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00404 BOOST_REQUIRE(0);
00405 }
00406
00407
00408 }
| void CalcInstFactoryTest::testIntegralNative | ( | | ) | [private] | | -------------------------------------------- | - | | - | ----------- |
Definition at line 226 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), nativeIntegral, and nativeIntegralValues.
Referenced by CalcInstFactoryTest().
00227 {
00228 ostringstream pg("");
00229
00230 const char* integralnative[][2] = {
00231 { "MOD", "3" },
00232 { "AND", "3" },
00233 { "OR", "3" },
00234 { "SHFL", "3" },
00235 { "SHFR", "3" },
00236 { "", "" },
00237 };
00238
00239 pg << "O " << nativeIntegral << ";" << endl;
00240 pg << "C " << nativeIntegral << ";" << endl;
00241 pg << "V " << nativeIntegralValues << ";" << endl;
00242 pg << "T;" << endl;
00243
00244 int inst, type;
00245 for (inst = 0; *(integralnative[inst][0]); inst++) {
00246 BOOST_MESSAGE(integralnative[inst][0]);
00247 for (type = 0; type <= 7; type++) {
00248 pg << integralnative[inst][0] << " O" << type;
00249 if (atoi(integralnative[inst][1]) >= 2) {
00250 pg << ", C" << type;
00251 }
00252 if (atoi(integralnative[inst][1]) >= 3) {
00253 pg << ", C" << type;
00254 }
00255 pg << ";" << endl;
00256 }
00257 }
00258
00259 BOOST_MESSAGE(pg.str());
00260
00261 Calculator calc(0);
00262
00263 try {
00264 calc.assemble(pg.str().c_str());
00265 } catch (FennelExcn& ex) {
00266 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00267 BOOST_REQUIRE(0);
00268 }
00269
00270
00271 }
| void CalcInstFactoryTest::testIntegralPointer | ( | | ) | [private] | | --------------------------------------------- | - | | - | ----------- |
Definition at line 274 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), pointerArray, and stringToHex().
Referenced by CalcInstFactoryTest().
00275 {
00276 ostringstream pg("");
00277
00278 const char* integralpointer[][2] = {
00279 { "GETS", "2", },
00280 { "GETMS" , "2", },
00281 { "", "" },
00282 };
00283
00284 pg << "O " << pointerArray << ";" << endl;
00285 pg << "C " << pointerArray << ";" << endl;
00286 pg << "V 0x" << stringToHex("a") << ", 0x" << stringToHex("b") <<
00287 ", 1, 0, 1;" << endl;
00288 pg << "T;" << endl;
00289
00290 int inst, type;
00291 for (inst = 0; *(integralpointer[inst][0]); inst++) {
00292 BOOST_MESSAGE(integralpointer[inst][0]);
00293 for (type = 0; type <= 1; type++) {
00294 pg << integralpointer[inst][0] << " O2";
00295 if (atoi(integralpointer[inst][1]) >= 2) {
00296 pg << ", C" << type;
00297 }
00298 if (atoi(integralpointer[inst][1]) >= 3) {
00299 pg << ", C" << type;
00300 }
00301 pg << ";" << endl;
00302 }
00303 }
00304
00305 BOOST_MESSAGE(pg.str());
00306
00307 Calculator calc(0);
00308
00309 try {
00310 calc.assemble(pg.str().c_str());
00311 } catch (FennelExcn& ex) {
00312 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00313 BOOST_REQUIRE(0);
00314 }
00315
00316
00317 }
| void CalcInstFactoryTest::testJump | ( | | ) | [private] | | ---------------------------------- | - | | - | ----------- |
Definition at line 411 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage().
Referenced by CalcInstFactoryTest().
00412 {
00413 ostringstream pg("");
00414
00415 const char* Jump[][2] = {
00416 { "JMP", "0" },
00417 { "JMPT", "1" },
00418 { "JMPF", "1" },
00419 { "JMPN", "1" },
00420 { "JMPNN", "1" },
00421 { "", "" },
00422 };
00423
00424 pg << "O bo;" << endl;
00425 pg << "C bo,bo;" << endl;
00426 pg << "V 1,0;" << endl;
00427 pg << "T;" << endl;
00428
00429 int inst;
00430 for (inst = 0; *(Jump[inst][0]); inst++) {
00431 pg << Jump[inst][0] << " @1";
00432 if (atoi(Jump[inst][1]) >= 1) {
00433 pg << ", C0";
00434 }
00435 pg << ";" << endl;
00436 }
00437
00438 BOOST_MESSAGE("|" << pg.str() << "|");
00439
00440 Calculator calc(0);
00441
00442 try {
00443 calc.assemble(pg.str().c_str());
00444 } catch (FennelExcn& ex) {
00445 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00446 BOOST_REQUIRE(0);
00447 }
00448
00449
00450 }
| void CalcInstFactoryTest::testNativeNative | ( | | ) | [private] | | ------------------------------------------ | - | | - | ----------- |
Definition at line 453 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), nativeNotBool, and nativeNotBoolValues.
Referenced by CalcInstFactoryTest().
00454 {
00455 ostringstream pg("");
00456
00457 const char* nativenative[][2] = {
00458 { "ADD", "3" },
00459 { "SUB" , "3" },
00460 { "MUL", "3" },
00461 { "DIV", "3" },
00462 { "NEG", "2" },
00463 { "MOVE", "2" },
00464 { "REF", "2" },
00465 { "TONULL", "1" },
00466 { "", "" },
00467 };
00468
00469 pg << "O " << nativeNotBool << ";" << endl;
00470 pg << "C " << nativeNotBool << ";" << endl;
00471 pg << "V " << nativeNotBoolValues << ";" << endl;
00472 pg << "T;" << endl;
00473
00474 int inst, type;
00475 for (inst = 0; *(nativenative[inst][0]); inst++) {
00476 BOOST_MESSAGE(nativenative[inst][0]);
00477 for (type = 0; type <= 9; type++) {
00478 pg << nativenative[inst][0] << " O" << type;
00479 if (atoi(nativenative[inst][1]) >= 2) {
00480 pg << ", C" << type;
00481 }
00482 if (atoi(nativenative[inst][1]) >= 3) {
00483 pg << ", C" << type;
00484 }
00485 pg << ";" << endl;
00486 }
00487 }
00488
00489 BOOST_MESSAGE(pg.str());
00490
00491 Calculator calc(0);
00492
00493 try {
00494 calc.assemble(pg.str().c_str());
00495 } catch (FennelExcn& ex) {
00496 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00497 BOOST_REQUIRE(0);
00498 }
00499
00500
00501 }
| void CalcInstFactoryTest::testPointerIntegral | ( | | ) | [private] | | --------------------------------------------- | - | | - | ----------- |
Definition at line 320 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), pointerArray, and stringToHex().
Referenced by CalcInstFactoryTest().
00321 {
00322 ostringstream pg("");
00323
00324 const char* pointerintegral[][2] = {
00325 { "PUTS", "2", },
00326 { "", "" },
00327 };
00328
00329 pg << "O " << pointerArray << ";" << endl;
00330 pg << "C " << pointerArray << ";" << endl;
00331 pg << "V 0x" << stringToHex("a") << ", 0x" << stringToHex("b") <<
00332 ", 1, 0, 1;" << endl;
00333 pg << "T;" << endl;
00334
00335 int inst, type;
00336 for (inst = 0; *(pointerintegral[inst][0]); inst++) {
00337 BOOST_MESSAGE(pointerintegral[inst][0]);
00338 for (type = 0; type <= 1; type++) {
00339 pg << pointerintegral[inst][0] << " O" << type;
00340 pg << ", C2;" << endl;
00341 }
00342 }
00343
00344 BOOST_MESSAGE(pg.str());
00345
00346 Calculator calc(0);
00347
00348 try {
00349 calc.assemble(pg.str().c_str());
00350 } catch (FennelExcn& ex) {
00351 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00352 BOOST_REQUIRE(0);
00353 }
00354
00355
00356 }
| void CalcInstFactoryTest::testPointerPointer | ( | | ) | [private] | | -------------------------------------------- | - | | - | ----------- |
Definition at line 504 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage(), pointerArray, and stringToHex().
Referenced by CalcInstFactoryTest().
00505 {
00506 ostringstream pg("");
00507
00508 const char* pointerpointer[][3] = {
00509 { "ADD", "2", "1" },
00510 { "SUB" , "2", "1" },
00511 { "MOVE", "2", "0" },
00512 { "REF", "2", "0" },
00513 { "TONULL", "1", "0" },
00514 { "", "" },
00515 };
00516
00517 pg << "O " << pointerArray << ";" << endl;
00518 pg << "C " << pointerArray << ";" << endl;
00519 pg << "V 0x" << stringToHex("a") << ", 0x" << stringToHex("b") <<
00520 ", 1, 0, 1;" << endl;
00521 pg << "T;" << endl;
00522
00523 int inst, type;
00524 for (inst = 0; *(pointerpointer[inst][0]); inst++) {
00525 BOOST_MESSAGE(pointerpointer[inst][0]);
00526 for (type = 0; type <= 1; type++) {
00527 pg << pointerpointer[inst][0] << " O" << type;
00528 if (atoi(pointerpointer[inst][1]) >= 2) {
00529 pg << ", C" << type;
00530 }
00531 if (atoi(pointerpointer[inst][2]) >= 1) {
00532 pg << ", C2";
00533 }
00534 pg << ";" << endl;
00535 }
00536 }
00537
00538 BOOST_MESSAGE(pg.str());
00539
00540 Calculator calc(0);
00541
00542 try {
00543 calc.assemble(pg.str().c_str());
00544 } catch (FennelExcn& ex) {
00545 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00546 BOOST_REQUIRE(0);
00547 }
00548
00549
00550 }
| void CalcInstFactoryTest::testReturn | ( | | ) | [private] | | ------------------------------------ | - | | - | ----------- |
Definition at line 553 of file CalcInstFactoryTest.cpp.
References FennelExcn::getMessage().
Referenced by CalcInstFactoryTest().
00554 {
00555 ostringstream pg("");
00556
00557 pg << "O bo;" << endl;
00558 pg << "C bo,bo;" << endl;
00559 pg << "V 1,0;" << endl;
00560 pg << "T;" << endl;
00561 pg << "RETURN;" << endl;
00562
00563 BOOST_MESSAGE(pg.str());
00564
00565 Calculator calc(0);
00566
00567 try {
00568 calc.assemble(pg.str().c_str());
00569 } catch (FennelExcn& ex) {
00570 BOOST_MESSAGE("Assemble exception " << ex.getMessage());
00571 BOOST_REQUIRE(0);
00572 }
00573
00574
00575 }
| void TestBase::snooze | ( | uint | nSeconds | ) | [protected, inherited] |
|---|
| void TestBase::readParams | ( | int | argc, |
|---|---|---|---|
| char ** | argv | ||
| ) | [static, inherited] |
Parses the command line.
format: [-v] [-t TEST | -all] {param=val}* [CONFIGFILE | -] Normally, the test program runs the default test cases. With the option "-all", runs the extra test cases as well. With the option "-t TEST", runs only the single test case named TEST. CONFIGFILE is read to load configuration parameters. Configuration parameters can also be set ad hoc, from the command line, as pairs name=val. These take precedence.
Definition at line 108 of file TestBase.cpp.
References TestBase::configMap, ConfigMap::dumpParams(), ConfigMap::isParamSet(), ConfigMap::mergeFrom(), TestBase::paramDictionaryFileName, ConfigMap::readParams(), TestBase::runAll, TestBase::runSingle, ConfigMap::setStringParam(), and verbose.
00109 {
00110 bool verbose = false;
00111 ConfigMap adhocMap;
00112
00113 for (int i = 1; i < argc; ++i) {
00114 std::string arg = argv[i];
00115 if (argv[i][0] == '-') {
00116 if (arg == "-v") {
00117 verbose = true;
00118 } else if (arg == "-") {
00119 configMap.readParams(std::cin);
00120 } else if (arg == "-all") {
00121 runAll = true;
00122 } else if (arg == "-t") {
00123 permAssert(i + 1 < argc);
00124 runSingle = argv[++i];
00125 } else if (arg[1] == 't') {
00126 runSingle = arg.substr(2);
00127 }
00128 } else {
00129 int i = arg.find("=");
00130 if ((0 < i) && (i < arg.size())) {
00131
00132 std::string key = arg.substr(0,i);
00133 std::string val = arg.substr(i + 1);
00134 adhocMap.setStringParam(key,val);
00135 } else {
00136
00137 std::ifstream configFile(arg.c_str());
00138 assert(configFile.good());
00139 configMap.readParams(configFile);
00140 }
00141 }
00142 }
00143 configMap.mergeFrom(adhocMap);
00144
00145
00146
00147 if (.isParamSet(paramDictionaryFileName)) {
00148 std::string dictFileName = "dictWords";
00149 configMap.setStringParam(paramDictionaryFileName,dictFileName);
00150 }
00151
00152 if (verbose) {
00153 configMap.dumpParams(std::cout);
00154 }
00155 }
| TestSuite * TestBase::releaseTestSuite | ( | | ) | [inherited] | | ---------------------------------------------------------------------------------------------- | - | | - | ------------- |
| void TestBase::beforeTestCase | ( | std::string | testCaseName | ) | [inherited] |
|---|
| void TestBase::afterTestCase | ( | std::string | testCaseName | ) | [inherited] |
|---|
| void TestBase::testCaseSetUp | ( | | ) | [virtual, inherited] | | ---------------------------- | - | | - | ---------------------- |
Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked.
Default is no-op.
Reimplemented in LbmEntryTest, LbmExecStreamTestBase, LbmLoadBitmapTest, LbmSearchTest, LbmSplicerExecStreamTest, LcsClusterAppendExecStreamTest, LcsClusterReplaceExecStreamTest, LcsMultiClusterAppendTest, LcsRowScanExecStreamTest, BTreeReadersTest, BTreeTest, BTreeTxnTest, ExecStreamGovernorTest, ExecStreamTestBase, ExecStreamUnitTestBase, ExternalSortExecStreamTest, LhxHashTableTest, LogicalTxnTest, and SnapshotSegmentTestBase.
Definition at line 235 of file TestBase.cpp.
Referenced by ExecStreamTestBase::testCaseSetUp().
| void TestBase::testCaseTearDown | ( | | ) | [virtual, inherited] | | ------------------------------- | - | | - | ---------------------- |
Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked.
Default is no-op.
Reimplemented in LbmEntryTest, LbmLoadBitmapTest, LbmSearchTest, LcsClusterAppendExecStreamTest, LcsClusterReplaceExecStreamTest, LcsMultiClusterAppendTest, LcsRowScanExecStreamTest, BTreeReadersTest, BTreeTest, BTreeTxnTest, CacheTestBase, DatabaseTest, ExecStreamTestBase, LhxHashTableTest, RandomAccessFileDeviceTest, and SparseBitmapTest.
Definition at line 239 of file TestBase.cpp.
Referenced by SparseBitmapTest::testCaseTearDown().
| void TestBase::notifyTrace | ( | std::string | source, |
|---|---|---|---|
| TraceLevel | level, | ||
| std::string | message | ||
| ) | [virtual, inherited] |
| TraceLevel TestBase::getSourceTraceLevel | ( | std::string | source | ) | [virtual, inherited] |
|---|
| void TraceSource::initTraceSource | ( | SharedTraceTarget | pTraceTarget, |
|---|---|---|---|
| std::string | name | ||
| ) | [virtual, inherited] |
| void TraceSource::trace | ( | TraceLevel | level, |
|---|---|---|---|
| std::string | message | ||
| ) | const [inherited] |
| bool TraceSource::isTracing | ( | | ) | const [inline, inherited] | | --------------------------- | - | | - | --------------------------- |
| bool TraceSource::isTracingLevel | ( | TraceLevel | level | ) | const [inline, inherited] |
|---|
| TraceTarget& TraceSource::getTraceTarget | ( | | ) | const [inline, inherited] | | ----------------------------------------------------------------- | - | | - | --------------------------- |
| std::string TraceSource::getTraceSourceName | ( | | ) | const [inline, inherited] | | ------------------------------------------- | - | | - | --------------------------- |
| void TraceSource::setTraceSourceName | ( | std::string const & | n | ) | [inline, inherited] |
|---|
Sets the name of this source.
Useful to construct dynamic names for fine-grained filtering.
Definition at line 136 of file TraceSource.h.
00137 { 00138 name = n; 00139 }
| TraceLevel TraceSource::getMinimumTraceLevel | ( | | ) | const [inline, inherited] | | ------------------------------------------------------------------------------------------------------ | - | | - | --------------------------- |
| void TraceSource::disableTracing | ( | | ) | [inherited] | | -------------------------------- | - | | - | ------------- |
Member Data Documentation
Configuration parameters.
The reason this is static is so that no constructor parameters (which burden virtual bases) are needed.
Definition at line 155 of file TestBase.h.
Referenced by TestBase::afterTestCase(), TestBase::beforeTestCase(), BTreeTxnTest::BTreeTxnTest(), CacheTestBase::CacheTestBase(), BackupRestoreTest::createSnapshotData(), DatabaseTest::DatabaseTest(), TestOptionsTest::extra(), DatabaseTest::loadDatabase(), SparseBitmapTest::openStorage(), PagingTestBase::PagingTestBase(), ParallelExecStreamSchedulerTest::ParallelExecStreamSchedulerTest(), RandomAccessFileDeviceTest::RandomAccessFileDeviceTest(), TestBase::readParams(), SegStorageTestBase::SegStorageTestBase(), TestOptionsTest::test1(), TestOptionsTest::test2(), BackupRestoreTest::testBackupCleanup(), TestBase::TestBase(), BTreeTxnTest::testCaseSetUp(), BTreeTxnTest::testCheckpoint(), DatabaseTest::testCreateEmpty(), DatabaseTest::testForceTxns(), BackupRestoreTest::testHeaderBackupRestore(), SegPageEntryIterTest::testIter(), SegStreamTest::testRead(), BTreeTxnTest::testTxns(), SegStreamTest::testWrite(), ThreadedTestBase::ThreadedTestBase(), and TestBase::~TestBase().
The documentation for this class was generated from the following file:
- /home/pub/open/dev/fennel/calctest/CalcInstFactoryTest.cpp
