Commit ec0d6d31 authored by Alexander Bock's avatar Alexander Bock
Browse files

Also apply the changes to the unit tests

parent 7906db99
Showing with 6 additions and 11 deletions
+6 -11
......@@ -60,8 +60,7 @@ TEST_CASE("StringListProperty: Get String Value", "[stringlistproperty]") {
const std::vector<std::string> list{ "a", "b", "c" };
p.setValue(list);
std::string res;
p.getStringValue(res);
std::string res = p.stringValue();
CHECK(res == "[\"a\",\"b\",\"c\"]");
}
......@@ -160,8 +159,7 @@ TEST_CASE("IntListProperty: Get String Value", "[intlistproperty]") {
const std::vector<int> list{ 1, 2, 3 };
p.setValue(list);
std::string res;
p.getStringValue(res);
std::string res = p.stringValue();
CHECK(res == "[1,2,3]");
}
......@@ -271,8 +269,7 @@ TEST_CASE("DoubleListProperty: Get String Value", "[doublelistproperty]") {
const std::vector<double> list{ 1.0, 2.0, 3.0 };
p.setValue(list);
std::string res;
p.getStringValue(res);
std::string res = p.stringValue();
CHECK(res == "[1.0,2.0,3.0]");
}
......
......@@ -121,14 +121,12 @@ TEST_CASE("SelectionProperty: Get String Value", "[selectionproperty]") {
const std::set<std::string> list{ "a", "b" };
p.setValue(list);
std::string res;
p.getStringValue(res);
std::string res = p.stringValue();
CHECK(res == "[\"a\",\"b\"]");
p.setValue({});
p.getStringValue(res);
CHECK(res == "[]");
std::string res2 = p.stringValue();
CHECK(res2 == "[]");
}
TEST_CASE("SelectionProperty: Set Lua Value", "[selectionproperty]") {
......
Supports Markdown
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