@@ -198,31 +198,6 @@ def format(q)
198
198
q . text ( "]" )
199
199
end
200
200
end
201
-
202
- test ( "[]" )
203
- test ( "[ # comment\n ]" )
204
- test ( "[\n # comment1\n # comment2\n ]" )
205
- test ( "[] # comment" )
206
- test ( "[\n {{long}}\n ] # comment" )
207
-
208
- test ( "[1, 2, 3]" )
209
- test ( "[1, 2, 3]" , "[1, 2, 3,]" )
210
- test ( "[\n 1,\n {{long}},\n 3\n ]" , "[1, {{long}}, 3]" )
211
-
212
- test ( "%w[foo bar baz]" )
213
- test ( "%w[\n foo\n {{long}}\n baz\n ]" , "%w[foo {{long}} baz]" )
214
-
215
- test ( "%W[foo bar baz]" )
216
- test ( "%W[\n foo\n {{long}}\n baz\n ]" , "%W[foo {{long}} baz]" )
217
-
218
- test ( "%i[foo bar baz]" )
219
- test ( "%i[\n foo\n {{long}}\n baz\n ]" , "%i[foo {{long}} baz]" )
220
-
221
- test ( "%I[foo bar baz]" )
222
- test ( "%I[\n foo\n {{long}}\n baz\n ]" , "%I[foo {{long}} baz]" )
223
-
224
- test ( "foo = 1, 2, 3" , &:value )
225
- test ( "foo =\n 1,\n 2, # comment\n 3" , "foo = 1, 2, # comment\n 3" , &:value )
226
201
end
227
202
228
203
class ArrayPatternNode
@@ -288,10 +263,6 @@ class AssocSplatNode
288
263
def format ( q )
289
264
q . format_prefix ( operator_loc , value )
290
265
end
291
-
292
- test ( "foo in { bar: :baz, ** }" ) { |node | node . pattern . assocs . last }
293
- test ( "{ **foo }" ) { |node | node . elements . first }
294
- test ( "{\n ** # comment\n foo\n }" , "{ ** # comment\n foo }" ) { |node | node . elements . first }
295
266
end
296
267
297
268
class BackReferenceReadNode
@@ -302,9 +273,6 @@ class BackReferenceReadNode
302
273
def format ( q )
303
274
q . text ( slice )
304
275
end
305
-
306
- test ( "$+" )
307
- test ( "$+ # comment" )
308
276
end
309
277
310
278
class BeginNode
@@ -395,8 +363,6 @@ class BlockLocalVariableNode
395
363
def format ( q )
396
364
q . text ( name . name )
397
365
end
398
-
399
- test ( "a { |; b| }" ) { |node | node . block . parameters . locals . first }
400
366
end
401
367
402
368
class BlockNode
@@ -888,9 +854,6 @@ class ClassVariableReadNode
888
854
def format ( q )
889
855
q . text ( name . name )
890
856
end
891
-
892
- test ( "@@foo" )
893
- test ( "@@foo # comment" )
894
857
end
895
858
896
859
class ClassVariableTargetNode
@@ -902,8 +865,6 @@ class ClassVariableTargetNode
902
865
def format ( q )
903
866
q . text ( name . name )
904
867
end
905
-
906
- test ( "@@foo, @@bar = baz" ) { |node | node . targets . first }
907
868
end
908
869
909
870
class ClassVariableWriteNode
@@ -914,10 +875,6 @@ class ClassVariableWriteNode
914
875
def format ( q )
915
876
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
916
877
end
917
-
918
- test ( "@@foo = 1" )
919
- test ( "@@foo = # comment\n 1" )
920
- test ( "@@foo = 1 # comment" )
921
878
end
922
879
923
880
class ClassVariableAndWriteNode
@@ -929,10 +886,6 @@ class ClassVariableAndWriteNode
929
886
def format ( q )
930
887
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
931
888
end
932
-
933
- test ( "@@foo &&= 1" )
934
- test ( "@@foo &&= # comment\n 1" )
935
- test ( "@@foo &&= 1 # comment" )
936
889
end
937
890
938
891
class ClassVariableOrWriteNode
@@ -944,10 +897,6 @@ class ClassVariableOrWriteNode
944
897
def format ( q )
945
898
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
946
899
end
947
-
948
- test ( "@@foo ||= 1" )
949
- test ( "@@foo ||= # comment\n 1" )
950
- test ( "@@foo ||= 1 # comment" )
951
900
end
952
901
953
902
class ClassVariableOperatorWriteNode
@@ -958,10 +907,6 @@ class ClassVariableOperatorWriteNode
958
907
def format ( q )
959
908
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
960
909
end
961
-
962
- test ( "@@foo += 1" )
963
- test ( "@@foo += # comment\n 1" )
964
- test ( "@@foo += 1 # comment" )
965
910
end
966
911
967
912
class ConstantReadNode
@@ -972,9 +917,6 @@ class ConstantReadNode
972
917
def format ( q )
973
918
q . text ( name . name )
974
919
end
975
-
976
- test ( "Foo" )
977
- test ( "Foo # comment" )
978
920
end
979
921
980
922
class ConstantTargetNode
@@ -986,8 +928,6 @@ class ConstantTargetNode
986
928
def format ( q )
987
929
q . text ( name . name )
988
930
end
989
-
990
- test ( "Foo, Bar = baz" ) { |node | node . targets . first }
991
931
end
992
932
993
933
class ConstantWriteNode
@@ -998,10 +938,6 @@ class ConstantWriteNode
998
938
def format ( q )
999
939
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
1000
940
end
1001
-
1002
- test ( "Foo = 1" )
1003
- test ( "Foo = # comment\n 1" )
1004
- test ( "Foo = 1 # comment" )
1005
941
end
1006
942
1007
943
class ConstantAndWriteNode
@@ -1012,10 +948,6 @@ class ConstantAndWriteNode
1012
948
def format ( q )
1013
949
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
1014
950
end
1015
-
1016
- test ( "Foo &&= 1" )
1017
- test ( "Foo &&= # comment\n 1" )
1018
- test ( "Foo &&= 1 # comment" )
1019
951
end
1020
952
1021
953
class ConstantOrWriteNode
@@ -1026,10 +958,6 @@ class ConstantOrWriteNode
1026
958
def format ( q )
1027
959
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
1028
960
end
1029
-
1030
- test ( "Foo ||= 1" )
1031
- test ( "Foo ||= # comment\n 1" )
1032
- test ( "Foo ||= 1 # comment" )
1033
961
end
1034
962
1035
963
class ConstantOperatorWriteNode
@@ -1040,10 +968,6 @@ class ConstantOperatorWriteNode
1040
968
def format ( q )
1041
969
q . format_write ( operator_loc , value ) { q . text ( name . name ) }
1042
970
end
1043
-
1044
- test ( "Foo += 1" )
1045
- test ( "Foo += # comment\n 1" )
1046
- test ( "Foo += 1 # comment" )
1047
971
end
1048
972
1049
973
class ConstantPathNode
@@ -1698,9 +1622,6 @@ class ImaginaryNode
1698
1622
def format ( q )
1699
1623
q . text ( slice )
1700
1624
end
1701
-
1702
- test ( "1i" )
1703
- test ( "1i # comment" )
1704
1625
end
1705
1626
1706
1627
class ImplicitNode
@@ -2028,11 +1949,6 @@ def format(q)
2028
1949
q . text ( slice )
2029
1950
end
2030
1951
end
2031
-
2032
- test ( "1" )
2033
- test ( "1 # comment" )
2034
- test ( "1_2_3_4_5" )
2035
- test ( "12_345" , "12345" )
2036
1952
end
2037
1953
2038
1954
class KeywordRestParameterNode
@@ -2585,11 +2501,6 @@ def format(q)
2585
2501
q . text ( content )
2586
2502
q . text ( closing )
2587
2503
end
2588
-
2589
- test ( "/foo/i" )
2590
- test ( "%r{foo}i" )
2591
- test ( "/foo/i # comment" )
2592
- test ( "%r{foo}i # comment" )
2593
2504
end
2594
2505
2595
2506
class RequiredDestructuredParameterNode
0 commit comments