Commit e9fe4544 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

[257-withconfigentry-with-char] added WithConfigEntry for char*

parent 71382f55
......@@ -60,11 +60,11 @@ public:
bool disableFileLogging = true;
ConfigMap defaultVerboseMap = {
{"MeshVerbose", "1"},
{"MeshesVerbose", "1"},
{"ConfigVerbose", "0"},
{"OverlapVerbose", "0"},
{"DistributionVerbose", "0"}
{"MeshVerbose", "1"},
{"MeshesVerbose", "1"},
{"ConfigVerbose", "0"},
{"OverlapVerbose", "0"},
{"DistributionVerbose", "0"}
};
MppTestBuilder(int argc, char **argv) : argc(argc), argv(argv) {}
......@@ -94,6 +94,12 @@ public:
return *this;
}
MppTestBuilder WithConfigEntry(const std::string &key, const char* value) {
initDefaultConfig = true;
defaultVerboseMap[key] = std::string(value);
return *this;
}
template<typename T>
MppTestBuilder WithConfigEntry(const std::string &key, const T &value) {
initDefaultConfig = true;
......@@ -111,15 +117,15 @@ class MppTest {
bool withPPM;
public:
MppTest(MppTestBuilder testBuilder)
: MppTest(testBuilder.argc,
testBuilder.argv,
testBuilder.initPPM,
testBuilder.disableScreenLogging,
testBuilder.disableFileLogging,
testBuilder.searchPath,
testBuilder.initDefaultConfig,
testBuilder.parallelListeners,
testBuilder.defaultVerboseMap) {}
: MppTest(testBuilder.argc,
testBuilder.argv,
testBuilder.initPPM,
testBuilder.disableScreenLogging,
testBuilder.disableFileLogging,
testBuilder.searchPath,
testBuilder.initDefaultConfig,
testBuilder.parallelListeners,
testBuilder.defaultVerboseMap) {}
MppTest(int argc, char **argv, bool initPPM, bool disableScreenLogging,
bool disableFileLogging, const std::string &searchPath, bool initDefaultConfig,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment