From 694c57b76c7dc403d1116354350b12e809568ebe Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 18 Jun 2015 12:13:31 -0700 Subject: [PATCH] Demonstrate that we don't crash on a bogus import Fixes #167 R=ianh@google.com Review URL: https://codereview.chromium.org/1193713002. --- engine/src/flutter/tests/raw/bogus_import-expected.txt | 6 ++++++ engine/src/flutter/tests/raw/bogus_import.dart | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 engine/src/flutter/tests/raw/bogus_import-expected.txt create mode 100644 engine/src/flutter/tests/raw/bogus_import.dart diff --git a/engine/src/flutter/tests/raw/bogus_import-expected.txt b/engine/src/flutter/tests/raw/bogus_import-expected.txt new file mode 100644 index 0000000000..5b455fee02 --- /dev/null +++ b/engine/src/flutter/tests/raw/bogus_import-expected.txt @@ -0,0 +1,6 @@ +CONSOLE: unittest-suite-wait-for-done +CONSOLE: PASS: shouldn't crash on a bogus import (see line 1) +CONSOLE: +CONSOLE: All 1 tests passed. +CONSOLE: unittest-suite-success +DONE diff --git a/engine/src/flutter/tests/raw/bogus_import.dart b/engine/src/flutter/tests/raw/bogus_import.dart new file mode 100644 index 0000000000..607598f03c --- /dev/null +++ b/engine/src/flutter/tests/raw/bogus_import.dart @@ -0,0 +1,10 @@ +import 'dart:bogus'; + +import '../resources/third_party/unittest/unittest.dart'; +import '../resources/unit.dart'; + +void main() { + initUnit(); + + test("shouldn't crash on a bogus import (see line 1)", () { }); +}