dart-sdk/tests/language_2/extension_methods/static_extension_constant_test.dart
Lasse R.H. Nielsen a5e18113f3 Remove references to triple-shift and generic-metadata experiments.
TEST= removed flags from test. No behavior should change.

Change-Id: I401bfb68c082d1bd405a118d5eca6a47a807945f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199241
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-05-12 13:35:00 +00:00

48 lines
1.1 KiB
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.
// @dart = 2.9
import 'package:expect/expect.dart';
import 'static_extension_constant_lib.dart' hide b, i, d, s;
import 'static_extension_constant_lib.dart' as lib show b, i, d, s;
// Ensure that all expressions in runtimeExtensionCalls invoke
// an extension method rather than an instance method, such that
// static_extension_constant_error_test gets an error for them all.
const dynamic b = lib.b;
const dynamic i = lib.i;
const dynamic d = lib.d;
const dynamic s = lib.s;
// These expressions should be identical to those in
// `lib.runtimeExtensionCalls`.
var dynamicInstanceCalls = <Object>[
~i,
b & b,
b | b,
b ^ b,
i ~/ i,
i >> i,
i << i,
i + i,
-i,
d - d,
d * d,
d / d,
d % d,
d < i,
i <= d,
d > i,
i >= i,
s.length,
];
void main() {
for (int i = 0; i < dynamicInstanceCalls.length; ++i) {
Expect.notEquals(dynamicInstanceCalls[i], runtimeExtensionCalls[i]);
}
}