File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
src/DynamoCore/Graph/Nodes Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,9 @@ internal static string InferStaticTypeFromNode(AssociativeNode node)
304
304
case ExprListNode :
305
305
case ArrayNode :
306
306
return "list" ;
307
- case RangeExprNode :
307
+ case RangeExprNode ren :
308
+ if ( ren . HasRangeAmountOperator )
309
+ return "sequence" ;
308
310
return "range" ;
309
311
case IdentifierNode idNode :
310
312
return idNode . Value ;
Original file line number Diff line number Diff line change @@ -1544,6 +1544,24 @@ public void TestTooltipAndLabelMaxLength()
1544
1544
}
1545
1545
}
1546
1546
1547
+ [ Test ]
1548
+ [ Category ( "UnitTests" ) ]
1549
+ public void TestOutportNameForRangeAndSequence ( )
1550
+ {
1551
+ var code =
1552
+ @"0..10..#5;
1553
+ 0..10..1;
1554
+ 0..#4..1;
1555
+ 0..4..~2;" ;
1556
+ var cbn = CreateCodeBlockNode ( ) ;
1557
+ UpdateCodeBlockNodeContent ( cbn , code ) ;
1558
+
1559
+ Assert . AreEqual ( "range" , cbn . OutPorts [ 0 ] . Name ) ;
1560
+ Assert . AreEqual ( "range" , cbn . OutPorts [ 1 ] . Name ) ;
1561
+ Assert . AreEqual ( "sequence" , cbn . OutPorts [ 2 ] . Name ) ;
1562
+ Assert . AreEqual ( "range" , cbn . OutPorts [ 3 ] . Name ) ;
1563
+ }
1564
+
1547
1565
#region CodeBlockUtils Specific Tests
1548
1566
[ Test ]
1549
1567
[ Category ( "UnitTests" ) ]
You can’t perform that action at this time.
0 commit comments