Files
sdk/pkg/_fe_analyzer_shared/test/constants/data/map.dart
T
Paul Berry a0ee662b7b Move shared analyzer/FE integration test data into shared package.
This moves the five test suites for flow analysis along with the
constants test suite.

Note that a few files have formatting errors.  I'll fix those in a
follow-up CL.

Change-Id: Ie9bba74c7d91e49ac6c9d3c64a96be007b6a94c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123680
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-31 15:02:03 +00:00

25 lines
956 B
Dart

// Copyright (c) 2019, 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.
const map0 = /*cfe.Map<dynamic,dynamic>()*/ {};
// TODO(johnniwinther): This seems like an odd offset for the constant. It
// should probably be at the start of the type arguments.
const map1 = <String, int> /*cfe.Map<String,int>()*/ {};
const Map<String, int> map2 = /*cfe.Map<String,int>()*/ {};
const map3 = /*cfe.Map<String,int>(String(foo):Int(42))*/ {'foo': 42};
const map4 = /*cfe.Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/
{'foo': 42, 'bar': 87};
main() {
print(/*Map<dynamic,dynamic>()*/ map0);
print(/*Map<String,int>()*/ map1);
print(/*Map<String,int>()*/ map2);
print(/*Map<String,int>(String(foo):Int(42))*/ map3);
print(/*Map<String,int>(String(foo):Int(42),String(bar):Int(87))*/ map4);
}