@@ -497,6 +497,14 @@ void main() {
497
497
expect (list.hasBrackets, isTrue);
498
498
expect (list.separator, equals (ListSeparator .SPACE ));
499
499
});
500
+
501
+ test ("with a slash separator" , () async {
502
+ var list =
503
+ (await _protofy (r"list.join([], [], $separator: slash)" )).list;
504
+ expect (list.contents, isEmpty);
505
+ expect (list.hasBrackets, isTrue);
506
+ expect (list.separator, equals (ListSeparator .SLASH ));
507
+ });
500
508
});
501
509
502
510
group ("without brackets" , () {
@@ -522,6 +530,14 @@ void main() {
522
530
expect (list.hasBrackets, isFalse);
523
531
expect (list.separator, equals (ListSeparator .SPACE ));
524
532
});
533
+
534
+ test ("with a slash separator" , () async {
535
+ var list =
536
+ (await _protofy (r"list.join((), (), $separator: slash)" )).list;
537
+ expect (list.contents, isEmpty);
538
+ expect (list.hasBrackets, isFalse);
539
+ expect (list.separator, equals (ListSeparator .SLASH ));
540
+ });
525
541
});
526
542
});
527
543
@@ -549,6 +565,15 @@ void main() {
549
565
expect (list.hasBrackets, isTrue);
550
566
expect (list.separator, equals (ListSeparator .SPACE ));
551
567
});
568
+
569
+ test ("with a slash separator" , () async {
570
+ var list =
571
+ (await _protofy (r"list.join([true], [], $separator: slash)" ))
572
+ .list;
573
+ expect (list.contents, equals ([_true]));
574
+ expect (list.hasBrackets, isTrue);
575
+ expect (list.separator, equals (ListSeparator .SLASH ));
576
+ });
552
577
});
553
578
554
579
group ("without brackets" , () {
@@ -567,6 +592,15 @@ void main() {
567
592
expect (list.hasBrackets, isFalse);
568
593
expect (list.separator, equals (ListSeparator .SPACE ));
569
594
});
595
+
596
+ test ("with a slash separator" , () async {
597
+ var list =
598
+ (await _protofy (r"list.join(true, (), $separator: slash)" ))
599
+ .list;
600
+ expect (list.contents, equals ([_true]));
601
+ expect (list.hasBrackets, isFalse);
602
+ expect (list.separator, equals (ListSeparator .SLASH ));
603
+ });
570
604
});
571
605
});
572
606
@@ -601,6 +635,13 @@ void main() {
601
635
expect (list.hasBrackets, isFalse);
602
636
expect (list.separator, equals (ListSeparator .SPACE ));
603
637
});
638
+
639
+ test ("with a slash separator" , () async {
640
+ var list = (await _protofy (r"list.slash(true, null, false)" )).list;
641
+ expect (list.contents, equals ([_true, _null, _false]));
642
+ expect (list.hasBrackets, isFalse);
643
+ expect (list.separator, equals (ListSeparator .SLASH ));
644
+ });
604
645
});
605
646
});
606
647
});
@@ -895,6 +936,15 @@ void main() {
895
936
..separator = ListSeparator .SPACE ),
896
937
"[]" );
897
938
});
939
+
940
+ group ("with a slash separator" , () {
941
+ _testSerializationAndRoundTrip (
942
+ Value ()
943
+ ..list = (Value_List ()
944
+ ..hasBrackets = true
945
+ ..separator = ListSeparator .SLASH ),
946
+ "[]" );
947
+ });
898
948
});
899
949
900
950
group ("without brackets" , () {
@@ -927,6 +977,16 @@ void main() {
927
977
"()" ,
928
978
inspect: true );
929
979
});
980
+
981
+ group ("with a slash separator" , () {
982
+ _testSerializationAndRoundTrip (
983
+ Value ()
984
+ ..list = (Value_List ()
985
+ ..hasBrackets = false
986
+ ..separator = ListSeparator .SLASH ),
987
+ "()" ,
988
+ inspect: true );
989
+ });
930
990
});
931
991
});
932
992
@@ -963,6 +1023,16 @@ void main() {
963
1023
..separator = ListSeparator .SPACE ),
964
1024
"[true]" );
965
1025
});
1026
+
1027
+ group ("with a slash separator" , () {
1028
+ _testSerializationAndRoundTrip (
1029
+ Value ()
1030
+ ..list = (Value_List ()
1031
+ ..contents.add (_true)
1032
+ ..hasBrackets = true
1033
+ ..separator = ListSeparator .SLASH ),
1034
+ "[true]" );
1035
+ });
966
1036
});
967
1037
968
1038
group ("without brackets" , () {
@@ -997,6 +1067,16 @@ void main() {
997
1067
..separator = ListSeparator .SPACE ),
998
1068
"true" );
999
1069
});
1070
+
1071
+ group ("with a slash separator" , () {
1072
+ _testSerializationAndRoundTrip (
1073
+ Value ()
1074
+ ..list = (Value_List ()
1075
+ ..contents.add (_true)
1076
+ ..hasBrackets = false
1077
+ ..separator = ListSeparator .SLASH ),
1078
+ "true" );
1079
+ });
1000
1080
});
1001
1081
});
1002
1082
@@ -1025,6 +1105,18 @@ void main() {
1025
1105
inspect: true ),
1026
1106
"[true null false]" );
1027
1107
});
1108
+
1109
+ test ("with a slash separator" , () async {
1110
+ expect (
1111
+ await _deprotofy (
1112
+ Value ()
1113
+ ..list = (Value_List ()
1114
+ ..contents.addAll ([_true, _null, _false])
1115
+ ..hasBrackets = true
1116
+ ..separator = ListSeparator .SLASH ),
1117
+ inspect: true ),
1118
+ "[true / null / false]" );
1119
+ });
1028
1120
});
1029
1121
1030
1122
group ("without brackets" , () {
@@ -1051,6 +1143,18 @@ void main() {
1051
1143
inspect: true ),
1052
1144
"true null false" );
1053
1145
});
1146
+
1147
+ test ("with a slash separator" , () async {
1148
+ expect (
1149
+ await _deprotofy (
1150
+ Value ()
1151
+ ..list = (Value_List ()
1152
+ ..contents.addAll ([_true, _null, _false])
1153
+ ..hasBrackets = false
1154
+ ..separator = ListSeparator .SLASH ),
1155
+ inspect: true ),
1156
+ "true / null / false" );
1157
+ });
1054
1158
});
1055
1159
});
1056
1160
});
0 commit comments