summaryrefslogtreecommitdiffstats
path: root/Source/cmTest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTest.cxx')
-rw-r--r--Source/cmTest.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx
index 9cda978..28a7bb1 100644
--- a/Source/cmTest.cxx
+++ b/Source/cmTest.cxx
@@ -38,12 +38,8 @@ cmListFileBacktrace const& cmTest::GetBacktrace() const
}
//----------------------------------------------------------------------------
-void cmTest::SetName(const char* name)
+void cmTest::SetName(const std::string& name)
{
- if ( !name )
- {
- name = "";
- }
this->Name = name;
}
@@ -54,7 +50,7 @@ void cmTest::SetCommand(std::vector<std::string> const& command)
}
//----------------------------------------------------------------------------
-const char *cmTest::GetProperty(const char* prop) const
+const char *cmTest::GetProperty(const std::string& prop) const
{
bool chain = false;
const char *retVal =
@@ -67,28 +63,20 @@ const char *cmTest::GetProperty(const char* prop) const
}
//----------------------------------------------------------------------------
-bool cmTest::GetPropertyAsBool(const char* prop) const
+bool cmTest::GetPropertyAsBool(const std::string& prop) const
{
return cmSystemTools::IsOn(this->GetProperty(prop));
}
//----------------------------------------------------------------------------
-void cmTest::SetProperty(const char* prop, const char* value)
+void cmTest::SetProperty(const std::string& prop, const char* value)
{
- if (!prop)
- {
- return;
- }
-
this->Properties.SetProperty(prop, value, cmProperty::TEST);
}
//----------------------------------------------------------------------------
-void cmTest::AppendProperty(const char* prop, const char* value, bool asString)
+void cmTest::AppendProperty(const std::string& prop,
+ const char* value, bool asString)
{
- if (!prop)
- {
- return;
- }
this->Properties.AppendProperty(prop, value, cmProperty::TEST, asString);
}