@@ -27,10 +27,16 @@ main() {
2727 await test ([Flags .cfeOnly], exitCode: 1 );
2828 await test ([Flags .cfeOnly, 'foo.dart' ], out: 'out.dill' );
2929 await test ([Flags .cfeOnly, 'foo.dart' , '--out=out.dill' ], out: 'out.dill' );
30+ await test ([Flags .cfeOnly, 'foo.dart' , Flags .readClosedWorld], exitCode: 1 );
31+ await test (['foo.dart' , Flags .readClosedWorld, Flags .cfeOnly], exitCode: 1 );
3032 await test ([Flags .cfeOnly, 'foo.dart' , Flags .readData], exitCode: 1 );
3133 await test (['foo.dart' , Flags .readData, Flags .cfeOnly], exitCode: 1 );
3234 await test ([Flags .cfeOnly, 'foo.dart' , Flags .readCodegen], exitCode: 1 );
3335 await test (['foo.dart' , Flags .readCodegen, Flags .cfeOnly], exitCode: 1 );
36+ await test ([Flags .cfeOnly, 'foo.dart' , Flags .writeClosedWorld],
37+ exitCode: 1 );
38+ await test (['foo.dart' , Flags .writeClosedWorld, Flags .cfeOnly],
39+ exitCode: 1 );
3440 await test ([Flags .cfeOnly, 'foo.dart' , Flags .writeData], exitCode: 1 );
3541 await test (['foo.dart' , Flags .writeData, Flags .cfeOnly], exitCode: 1 );
3642 await test ([Flags .cfeOnly, 'foo.dart' , Flags .writeCodegen], exitCode: 1 );
@@ -40,11 +46,51 @@ main() {
4046 out: 'out.dill' , writeData: 'out.dill.data' );
4147 await test (['${Flags .writeData }=foo.data' , 'foo.dart' , '--out=foo.dill' ],
4248 out: 'foo.dill' , writeData: 'foo.data' );
49+ await test ([Flags .readClosedWorld, Flags .writeClosedWorld, 'foo.dart' ],
50+ exitCode: 1 );
51+ await test ([Flags .writeClosedWorld, Flags .readClosedWorld, 'foo.dart' ],
52+ exitCode: 1 );
4353 await test ([Flags .readData, Flags .writeData, 'foo.dart' ], exitCode: 1 );
4454 await test ([Flags .writeData, Flags .readData, 'foo.dart' ], exitCode: 1 );
55+ await test ([Flags .readCodegen, Flags .writeClosedWorld, 'foo.dart' ],
56+ exitCode: 1 );
4557 await test ([Flags .readCodegen, Flags .writeData, 'foo.dart' ], exitCode: 1 );
58+ await test ([Flags .writeClosedWorld, Flags .readData, 'foo.dart' ],
59+ exitCode: 1 );
60+ await test ([Flags .writeClosedWorld, Flags .readCodegen, 'foo.dart' ],
61+ exitCode: 1 );
4662 await test ([Flags .writeData, Flags .readCodegen, 'foo.dart' ], exitCode: 1 );
4763
64+ await test ([
65+ Flags .writeClosedWorld,
66+ 'foo.dart' ,
67+ ], out: 'out.dill' , writeClosedWorld: 'out.dill.world' );
68+ await test (
69+ ['${Flags .writeClosedWorld }=foo.world' , 'foo.dart' , '--out=foo.dill' ],
70+ out: 'foo.dill' , writeClosedWorld: 'foo.world' );
71+
72+ await test ([Flags .readClosedWorld, 'foo.dill' ],
73+ out: 'out.js' , readClosedWorld: 'foo.dill.world' );
74+ await test ([Flags .readClosedWorld, 'foo.dill' , '--out=foo.js' ],
75+ out: 'foo.js' , readClosedWorld: 'foo.dill.world' );
76+ await test (['${Flags .readClosedWorld }=out.world' , 'foo.world' ],
77+ out: 'out.js' , readClosedWorld: 'out.world' );
78+ await test (
79+ ['${Flags .readClosedWorld }=out.world' , 'foo.world' , '--out=foo.js' ],
80+ out: 'foo.js' , readClosedWorld: 'out.world' );
81+ await test (
82+ [Flags .readClosedWorld, Flags .writeData, 'foo.dill' ],
83+ out: 'out.dill' ,
84+ readClosedWorld: 'foo.dill.world' ,
85+ writeData: 'out.dill.data' ,
86+ );
87+ await test ([
88+ '${Flags .readClosedWorld }=foo.world' ,
89+ '${Flags .writeData }=foo.data' ,
90+ 'foo.dart' ,
91+ '--out=foo.dill'
92+ ], out: 'foo.dill' , readClosedWorld: 'foo.world' , writeData: 'foo.data' );
93+
4894 await test ([Flags .readData, 'foo.dill' ],
4995 out: 'out.js' , readData: 'foo.dill.data' );
5096 await test ([Flags .readData, 'foo.dill' , '--out=foo.js' ],
@@ -199,6 +245,8 @@ main() {
199245Future test (List <String > arguments,
200246 {int exitCode,
201247 String out,
248+ String readClosedWorld,
249+ String writeClosedWorld,
202250 String readData,
203251 String writeData,
204252 String readCodegen,
@@ -231,6 +279,10 @@ Future test(List<String> arguments,
231279 if (actualExitCode == null ) {
232280 Expect .isNotNull (options, "Missing options object" );
233281 Expect .equals (toUri (out), options.outputUri, "Unexpected output uri." );
282+ Expect .equals (toUri (readClosedWorld), options.readClosedWorldUri,
283+ "Unexpected readClosedWorld uri" );
284+ Expect .equals (toUri (writeClosedWorld), options.writeClosedWorldUri,
285+ "Unexpected writeClosedWorld uri" );
234286 Expect .equals (
235287 toUri (readData), options.readDataUri, "Unexpected readData uri" );
236288 Expect .equals (
0 commit comments