Skip to content

Commit

Permalink
Fix language_2/ct_const_test
Browse files Browse the repository at this point in the history
Change-Id: Iebb3e40b8835ae5f24afe7ae31117ff24c18aa5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108370
Commit-Queue: Stephen Adams <[email protected]>
Reviewed-by: Lasse R.H. Nielsen <[email protected]>
  • Loading branch information
rakudrama authored and [email protected] committed Jul 11, 2019
1 parent a917043 commit 7cadd70
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/language_2/ct_const_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright (c) 2012, 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.
// All things regarding compile time constant expressions.

// Test of apparent compile-time nature of constant evaluation. Constant Lists,
// Maps and other objects should be identical independent of formation.

import "package:expect/expect.dart";

Expand Down Expand Up @@ -70,7 +72,9 @@ class CTConstTest {
Expect.equals(true, identical(l1, l2));

final evenNumbers = const <int>[2, 2 * 2, 2 * 3, 2 * 4, 2 * 5];
Expect.equals(true, !identical(evenNumbers, const [2, 4, 6, 8, 10]));
Expect.equals(true, identical(evenNumbers, const <int>[2, 4, 6, 8, 10]));
Expect.equals(
true, !identical(evenNumbers, const <dynamic>[2, 4, 6, 8, 10]));

final c11dGermany1 = const {"black": 1, "red": 2, "yellow": 3};
Expect.equals(true,
Expand Down

0 comments on commit 7cadd70

Please sign in to comment.