exception_handling_test.dart 781 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('Exception handling in test harness - string', (WidgetTester tester) async {
    throw 'Who lives, who dies, who tells your story?';
  });
  testWidgets('Exception handling in test harness - FlutterError', (WidgetTester tester) async {
13
    throw FlutterError('Who lives, who dies, who tells your story?');
14 15
  });
  testWidgets('Exception handling in test harness - uncaught Future error', (WidgetTester tester) async {
16
    Future<void>.error('Who lives, who dies, who tells your story?');
17 18
  });
}