File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818* Pass Node.js test process connection configuration and secret token via a
1919 restricted temporary authentication file to prevent secret leakage in command
2020 line process arguments.
21+ * Enable asserts in the ` exe ` compiler.
2122
2223## 1.31.2
2324
Original file line number Diff line number Diff line change @@ -200,6 +200,25 @@ void main() {
200200 await test.shouldExit (0 );
201201 });
202202 }
203+
204+ test (
205+ 'enables asserts' ,
206+ () async {
207+ await d.file ('test.dart' , _assertionsEnabledTest).create ();
208+ var test = await runTest (testArgs);
209+
210+ expect (
211+ test.stdout,
212+ emitsThrough (contains ('+1: All tests passed!' )),
213+ );
214+ await test.shouldExit (0 );
215+ },
216+ skip: compiler == Compiler .cli
217+ ? 'https://github.com/dart-lang/test/issues/2718'
218+ : runtime == Runtime .safari
219+ ? 'https://github.com/dart-lang/test/issues/2720'
220+ : null ,
221+ );
203222 },
204223 );
205224 }
@@ -263,3 +282,15 @@ void main() {
263282 });
264283}
265284''' ;
285+
286+ final _assertionsEnabledTest = '''
287+ import 'package:test/test.dart';
288+
289+ void main() {
290+ test('asserts are enabled', () {
291+ expect(() {
292+ assert(false);
293+ }, throwsA(isA<AssertionError>()));
294+ });
295+ }
296+ ''' ;
Original file line number Diff line number Diff line change 1010 it when only using coverage.
1111* Migrate out of process VM tests communication channel from TCP sockets to Unix
1212 domain sockets inside a restricted temporary directory.
13+ * Enable asserts in the ` exe ` compiler.
1314
1415## 0.6.19
1516
Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ stderr: ${processResult.stderr}''');
367367 if (platform.runtime == Runtime .vmAsan) '--target-sanitizer=asan' ,
368368 if (platform.runtime == Runtime .vmMsan) '--target-sanitizer=msan' ,
369369 if (platform.runtime == Runtime .vmTsan) '--target-sanitizer=tsan' ,
370+ '--enable-asserts' ,
370371 ]);
371372 if (processResult.exitCode != 0 || ! (await output.exists ())) {
372373 throw LoadException (path, '''
You can’t perform that action at this time.
0 commit comments