Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: test/runtime/dart_logging_runtime_test.dart

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/dart_codegen/types/d.dart ('k') | test/runtime/dart_runtime_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runtime/dart_logging_runtime_test.dart
diff --git a/test/runtime/dart_logging_runtime_test.dart b/test/runtime/dart_logging_runtime_test.dart
deleted file mode 100644
index 70f263933af6efc923f137a0451553e4382d307c..0000000000000000000000000000000000000000
--- a/test/runtime/dart_logging_runtime_test.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. 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:dev_compiler/runtime/dart_logging_runtime.dart' as devc;
-import 'package:test/test.dart';
-
-class A<T> {
- T x;
- A(this.x);
-}
-
-class B extends A<String> {
- B() : super("B!");
-}
-
-void runTest() {
- var astring = new A<String>("").runtimeType;
- var l = [new A<String>("hello"), new A("world"), new B(), 42];
- for (var item in l) {
- try {
- devc.cast(item, dynamic, astring);
- } catch (e) {
- // Do nothing
- }
- }
-}
-
-final expected = '''
-Key test/runtime/dart_logging_runtime_test.dart 22:16 in runTest:
- - static type: A<String>
- - runtime types: {A, int}
- - success: 0 (0.0)
- - failure: 1 (0.5)
- - mismatch: 1 (0.5)
- - error: 0 (0.0)
-''';
-
-void main() {
- test('summary', () {
- runTest();
- var output = devc.summary();
- expect(output, equals(expected));
- });
-
- test('handler', () {
- int devcFailures = 0;
- int dartFailures = 0;
- devc.castRecordHandler = (String key, devc.CastRecord record) {
- devcFailures += record.soundCast ? 0 : 1;
- dartFailures += record.dartCast ? 0 : 1;
- };
- runTest();
- expect(devcFailures, equals(2));
- expect(dartFailures, equals(1));
- });
-}
« no previous file with comments | « test/dart_codegen/types/d.dart ('k') | test/runtime/dart_runtime_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698