Handle missing flutter_test dependency cleanly (#7421)

We now produce a more reasonable error message when we're missing the
flutter_test dependency in a test. Also, remove the flutter_tools stack traces
when the engine dies.

Fixes #6187
This commit is contained in:
Adam Barth
2017-01-10 11:31:24 -08:00
committed by GitHub
parent 2155fb74b6
commit b9f49a40f7
6 changed files with 63 additions and 14 deletions

View File

@@ -0,0 +1,9 @@
.atom
.DS_Store
.buildlog
.idea
.packages
.pub/
build/
packages
pubspec.lock

View File

@@ -0,0 +1,4 @@
name: missing_dependency_tests
dependencies:
flutter:
sdk: flutter

View File

@@ -0,0 +1,4 @@
<<skip until matching line>>
<<stderr>>
<<skip until matching line>>
Failed to load test harness\. +Are you missing a dependency on flutter_test\?

View File

@@ -0,0 +1,11 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:test/test.dart';
void main() {
test('Trival test', () {
expect(42, 42);
});
}