mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 22:01:19 +00:00
e51764f89e
R=lrn@google.com Review URL: https://codereview.chromium.org//55533002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29757 260f80e4-7a28-3924-810f-c04153c831b5
35 lines
1.1 KiB
Dart
35 lines
1.1 KiB
Dart
// Copyright (c) 2011, 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:expect/expect.dart";
|
|
|
|
main() {
|
|
var map1 = { "foo": 42, "bar": 499 };
|
|
var map2 = {};
|
|
var map3 = const { "foo": 42, "bar": 499 };
|
|
var map4 = const {};
|
|
var map5 = new Map<String, int>();
|
|
map5["foo"] = 43;
|
|
map5["bar"] = 500;
|
|
var map6 = new Map<String, bool>();
|
|
|
|
Expect.isTrue(map1.keys is Iterable<String>);
|
|
Expect.isTrue(map1.keys is Iterable<bool>);
|
|
|
|
Expect.isTrue(map2.keys is Iterable<String>);
|
|
Expect.isTrue(map2.keys is Iterable<bool>);
|
|
|
|
Expect.isTrue(map3.keys is Iterable<String>);
|
|
Expect.isTrue(map3.keys is Iterable<bool>);
|
|
|
|
Expect.isTrue(map4.keys is Iterable<String>);
|
|
Expect.isTrue(map4.keys is Iterable<bool>);
|
|
|
|
Expect.isTrue(map5.keys is Iterable<String>);
|
|
Expect.isFalse(map5.keys is Iterable<bool>);
|
|
|
|
Expect.isTrue(map6.keys is Iterable<String>);
|
|
Expect.isFalse(map6.keys is Iterable<bool>);
|
|
}
|