Skip to content

Commit 2ebc5bd

Browse files
author
Robyn Jackey
committed
work on SearchDropDown and unit test
1 parent 6f4cdc6 commit 2ebc5bd

File tree

14 files changed

+1086
-10
lines changed

14 files changed

+1086
-10
lines changed
7.42 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="design"/>
5+
</Category>
6+
</Info>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="SearchDropDown.m" type="File"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="design"/>
5+
</Category>
6+
</Info>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="SearchDropDown.m" type="File"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="design"/>
5+
</Category>
6+
</Info>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="SearchDropDownExample.mlx" type="File"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="SearchDropdownExample.png" type="File"/>

test/+wt/+test/BaseTest.m

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,34 @@ function verifyPropertyValue(testCase, component, property, expValue)
191191
expValue
192192
end
193193

194-
import matlab.unittest.constraints.Eventually
195-
import matlab.unittest.constraints.IsEqualTo
194+
import matlab.unittest.constraints.*
196195

197196
% Verify values
197+
if isStringScalar(expValue)
198+
199+
constraint = IsEqualTo(expValue,...
200+
"Using", StringComparator);
201+
202+
elseif islogical(expValue)
203+
204+
constraint = IsEqualTo(expValue,...
205+
"Using", LogicalComparator);
206+
207+
elseif isnumeric(expValue)
208+
209+
constraint = IsEqualTo(expValue,...
210+
"Using", NumericComparator);
211+
212+
else
213+
214+
constraint = IsEqualTo(expValue);
215+
216+
end
217+
218+
% Perform the verification
198219
testCase.verifyThat(...
199220
@()get(component, property),...
200-
Eventually(IsEqualTo(expValue), "WithTimeoutOf", 5));
221+
Eventually(constraint, "WithTimeoutOf", 5));
201222

202223
end %function
203224

0 commit comments

Comments
 (0)