blob: 2ec26f0b1e729b1c84f9bc1bacbdcde02f423543 [file] [log] [blame]
40 columns |
### The same code is used for formatting top-level and local variables, so we
### don't repeat all of the tests here. Instead, we just ensure that the basics
### are handled for top-level variables and rely on the local variable tests
### for everything else.
>>> Untyped.
late final longVariable = 1, anotherVariable = 2;
<<<
late final longVariable = 1,
anotherVariable = 2;
>>> Typed.
SomeLongTypeName longVariable = longInitializer;
<<<
SomeLongTypeName longVariable =
longInitializer;
>>> Late top level variable.
late var x = 1;
late int y = 2;
<<<
late var x = 1;
late int y = 2;
>>> Constant.
const uptyped = 123 ;
<<<
const uptyped = 123;
>>>
const String typed = 'string' ;
<<<
const String typed = 'string';