Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
ec0d6d31
Commit
ec0d6d31
authored
2 years ago
by
Alexander Bock
Browse files
Options
Download
Email Patches
Plain Diff
Also apply the changes to the unit tests
parent
7906db99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/property/test_property_listproperties.cpp
+3
-6
tests/property/test_property_listproperties.cpp
tests/property/test_property_selectionproperty.cpp
+3
-5
tests/property/test_property_selectionproperty.cpp
with
6 additions
and
11 deletions
+6
-11
tests/property/test_property_listproperties.cpp
+
3
-
6
View file @
ec0d6d31
...
...
@@ -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]"
);
}
...
...
This diff is collapsed.
Click to expand it.
tests/property/test_property_selectionproperty.cpp
+
3
-
5
View file @
ec0d6d31
...
...
@@ -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
.
getS
tringValue
(
res
);
CHECK
(
res
==
"[]"
);
std
::
string
res2
=
p
.
s
tringValue
();
CHECK
(
res
2
==
"[]"
);
}
TEST_CASE
(
"SelectionProperty: Set Lua Value"
,
"[selectionproperty]"
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help