test method Null safety

  1. @protected
Future<void> test(
  1. String msg,
  2. Future<void> tests(
      )
    )

    Implementation

    @protected
    Future<void> test(String msg, Future<void> Function() tests) async {
      debugPrint('Running tests:  $msg');
      testsRun++;
      try {
        await tests();
        // ignore: avoid_catches_without_on_clauses
      } catch (e, s) {
        debugPrint('');
        debugPrint('*** Exception in test:  $e');
        debugPrint('');
        debugPrint(s.toString());
        debugPrint('');
        errorsSeen++;
      }
    }