blob: 2092115819f94ec5186a70939225d26c6cf92fcc [file] [log] [blame]
// Copyright (c) 2020, 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';
/// https://github.com/dart-lang/sdk/issues/42946
void main() {
// fix bug in constant eval
const x = (2.0 == 2);
const a = (2.0 == 2.0);
const b = (0.0 == 0.0);
const c = (double.nan == double.nan);
const d = (2.0 == 1.0);
Expect.isTrue(x);
Expect.isTrue(a);
Expect.isTrue(b);
Expect.isFalse(c);
Expect.isFalse(d);
}