rooibos-roku 5.3.4 → 5.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1176,10 +1176,17 @@ namespace rooibos
|
|
|
1176
1176
|
end if
|
|
1177
1177
|
try
|
|
1178
1178
|
if type(node) = "roSGNode"
|
|
1179
|
-
if node.
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1179
|
+
if node.isSubType("mc_Node")
|
|
1180
|
+
if node.isSubType("mc_Node")
|
|
1181
|
+
childCount = node.length
|
|
1182
|
+
else
|
|
1183
|
+
childCount = node.getChildCount()
|
|
1184
|
+
end if
|
|
1185
|
+
if childCount <> count
|
|
1186
|
+
msg = "node items count <> " + Rooibos.Common.asString(count) + ". Received " + Rooibos.Common.asString(childCount)
|
|
1187
|
+
m.currentResult.fail(msg, m.currentAssertLineNumber)
|
|
1188
|
+
return false
|
|
1189
|
+
end if
|
|
1183
1190
|
end if
|
|
1184
1191
|
else
|
|
1185
1192
|
msg = "Input value is not an node."
|
|
@@ -1212,7 +1219,12 @@ namespace rooibos
|
|
|
1212
1219
|
end if
|
|
1213
1220
|
try
|
|
1214
1221
|
if type(node) = "roSGNode"
|
|
1215
|
-
if node.
|
|
1222
|
+
if node.isSubType("mc_Node")
|
|
1223
|
+
childCount = node.length
|
|
1224
|
+
else
|
|
1225
|
+
childCount = node.getChildCount()
|
|
1226
|
+
end if
|
|
1227
|
+
if childCount = count
|
|
1216
1228
|
msg = "node items count = " + Rooibos.Common.asString(count) + "."
|
|
1217
1229
|
m.currentResult.fail(msg, m.currentAssertLineNumber)
|
|
1218
1230
|
return false
|
|
@@ -1247,7 +1259,12 @@ namespace rooibos
|
|
|
1247
1259
|
end if
|
|
1248
1260
|
try
|
|
1249
1261
|
if type(node) = "roSGNode"
|
|
1250
|
-
if node.
|
|
1262
|
+
if node.isSubType("mc_Node")
|
|
1263
|
+
childCount = node.length
|
|
1264
|
+
else
|
|
1265
|
+
childCount = node.getChildCount()
|
|
1266
|
+
end if
|
|
1267
|
+
if childCount > 0
|
|
1251
1268
|
msg = "node is not empty."
|
|
1252
1269
|
m.currentResult.fail(msg, m.currentAssertLineNumber)
|
|
1253
1270
|
return false
|
|
@@ -1350,10 +1367,17 @@ namespace rooibos
|
|
|
1350
1367
|
msg = "Node doesn't have the '" + Rooibos.Common.asString(value, true) + "' value."
|
|
1351
1368
|
m.currentResult.fail(msg, m.currentAssertLineNumber)
|
|
1352
1369
|
return false
|
|
1353
|
-
else
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1370
|
+
else
|
|
1371
|
+
if node.isSubType("mc_Node")
|
|
1372
|
+
childCount = node.length
|
|
1373
|
+
else
|
|
1374
|
+
childCount = node.getChildCount()
|
|
1375
|
+
end if
|
|
1376
|
+
if childCount <> 1
|
|
1377
|
+
msg = "Node Contains specified value; but other values as well"
|
|
1378
|
+
m.currentResult.fail(msg, m.currentAssertLineNumber)
|
|
1379
|
+
return false
|
|
1380
|
+
end if
|
|
1357
1381
|
end if
|
|
1358
1382
|
else
|
|
1359
1383
|
msg = "Input value is not an Node."
|
|
@@ -570,12 +570,21 @@ namespace rooibos.Common
|
|
|
570
570
|
' */
|
|
571
571
|
function findElementIndexInNode(node, value) as integer
|
|
572
572
|
if type(node) = "roSGNode"
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
573
|
+
if node.isSubType("mc_Node")
|
|
574
|
+
for i = 0 to node.length - 1
|
|
575
|
+
compareValue = node@.getChild(i)
|
|
576
|
+
if type(compareValue) = "roSGNode" and compareValue.isSameNode(value)
|
|
577
|
+
return i
|
|
578
|
+
end if
|
|
579
|
+
end for
|
|
580
|
+
else
|
|
581
|
+
for i = 0 to node.getChildCount() - 1
|
|
582
|
+
compareValue = node.getChild(i)
|
|
583
|
+
if type(compareValue) = "roSGNode" and compareValue.isSameNode(value)
|
|
584
|
+
return i
|
|
585
|
+
end if
|
|
586
|
+
end for
|
|
587
|
+
end if
|
|
579
588
|
end if
|
|
580
589
|
return -1
|
|
581
590
|
end function
|