OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Unit test of the [NativeBehavior.processSpecString] method. | 5 // Unit test of the [NativeBehavior.processSpecString] method. |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 import 'package:compiler/implementation/native/native.dart'; | 8 import 'package:compiler/src/native/native.dart'; |
9 import 'package:compiler/implementation/dart2jslib.dart' | 9 import 'package:compiler/src/dart2jslib.dart' |
10 show DiagnosticListener; | 10 show DiagnosticListener; |
11 | 11 |
12 const OBJECT = 'Object'; | 12 const OBJECT = 'Object'; |
13 const NULL = 'Null'; | 13 const NULL = 'Null'; |
14 | 14 |
15 class Listener implements DiagnosticListener { | 15 class Listener implements DiagnosticListener { |
16 String errorMessage; | 16 String errorMessage; |
17 internalError(spannable, message) => errorMessage = message; | 17 internalError(spannable, message) => errorMessage = message; |
18 | 18 |
19 noSuchMethod(_) => null; | 19 noSuchMethod(_) => null; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 test('returns:void;creates:A;', returns: [], creates: ['A']); | 67 test('returns:void;creates:A;', returns: [], creates: ['A']); |
68 test('returns:;creates:A|B;', returns: [OBJECT, NULL], creates: ['A', 'B']); | 68 test('returns:;creates:A|B;', returns: [OBJECT, NULL], creates: ['A', 'B']); |
69 test('returns:var;creates:A|B|C;', | 69 test('returns:var;creates:A|B|C;', |
70 returns: [OBJECT, NULL], creates: ['A', 'B', 'C']); | 70 returns: [OBJECT, NULL], creates: ['A', 'B', 'C']); |
71 test('returns:A; creates:A|B|C; ', returns: ['A'], creates: ['A', 'B', 'C']); | 71 test('returns:A; creates:A|B|C; ', returns: ['A'], creates: ['A', 'B', 'C']); |
72 test(' returns:A|B; creates:A|C;', | 72 test(' returns:A|B; creates:A|C;', |
73 returns: ['A', 'B'], creates: ['A', 'C']); | 73 returns: ['A', 'B'], creates: ['A', 'C']); |
74 test(' returns:A|B|C; creates:A; ', | 74 test(' returns:A|B|C; creates:A; ', |
75 returns: ['A', 'B', 'C'], creates: ['A']); | 75 returns: ['A', 'B', 'C'], creates: ['A']); |
76 } | 76 } |
OLD | NEW |