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

Side by Side Diff: tests/lib/mirrors/constructor_list_test.dart

Issue 1629553002: List constructor sentinel must not implement 'int' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library test.constructor_lsit_test;
6
7 @MirrorsUsed(targets: const [List])
8 import 'dart:mirrors';
9 import 'package:expect/expect.dart';
10
11 main() {
12 ClassMirror cm;
13 MethodMirror mm;
14
15 cm = reflectClass(List);
16 print(cm);
17
18 var list1 = cm.newInstance(const Symbol(''), []).reflectee;
19 var list2 = cm.newInstance(const Symbol(''), [10]).reflectee;
20
21 Expect.equals(0, list1.length);
22 Expect.equals(10, list2.length);
23 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_array.dart ('k') | tests/lib/mirrors/constructor_optional_args_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698