Commits (1)
...@@ -60,11 +60,11 @@ public: ...@@ -60,11 +60,11 @@ public:
bool disableFileLogging = true; bool disableFileLogging = true;
ConfigMap defaultVerboseMap = { ConfigMap defaultVerboseMap = {
{"MeshVerbose", "1"}, {"MeshVerbose", "1"},
{"MeshesVerbose", "1"}, {"MeshesVerbose", "1"},
{"ConfigVerbose", "0"}, {"ConfigVerbose", "0"},
{"OverlapVerbose", "0"}, {"OverlapVerbose", "0"},
{"DistributionVerbose", "0"} {"DistributionVerbose", "0"}
}; };
MppTestBuilder(int argc, char **argv) : argc(argc), argv(argv) {} MppTestBuilder(int argc, char **argv) : argc(argc), argv(argv) {}
...@@ -94,6 +94,12 @@ public: ...@@ -94,6 +94,12 @@ public:
return *this; return *this;
} }
MppTestBuilder WithConfigEntry(const std::string &key, const char* value) {
initDefaultConfig = true;
defaultVerboseMap[key] = std::string(value);
return *this;
}
template<typename T> template<typename T>
MppTestBuilder WithConfigEntry(const std::string &key, const T &value) { MppTestBuilder WithConfigEntry(const std::string &key, const T &value) {
initDefaultConfig = true; initDefaultConfig = true;
...@@ -111,15 +117,15 @@ class MppTest { ...@@ -111,15 +117,15 @@ class MppTest {
bool withPPM; bool withPPM;
public: public:
MppTest(MppTestBuilder testBuilder) MppTest(MppTestBuilder testBuilder)
: MppTest(testBuilder.argc, : MppTest(testBuilder.argc,
testBuilder.argv, testBuilder.argv,
testBuilder.initPPM, testBuilder.initPPM,
testBuilder.disableScreenLogging, testBuilder.disableScreenLogging,
testBuilder.disableFileLogging, testBuilder.disableFileLogging,
testBuilder.searchPath, testBuilder.searchPath,
testBuilder.initDefaultConfig, testBuilder.initDefaultConfig,
testBuilder.parallelListeners, testBuilder.parallelListeners,
testBuilder.defaultVerboseMap) {} testBuilder.defaultVerboseMap) {}
MppTest(int argc, char **argv, bool initPPM, bool disableScreenLogging, MppTest(int argc, char **argv, bool initPPM, bool disableScreenLogging,
bool disableFileLogging, const std::string &searchPath, bool initDefaultConfig, bool disableFileLogging, const std::string &searchPath, bool initDefaultConfig,
......