aves_mio/.flutter/packages/flutter/test/physics/utils_test.dart
Fabio Micheluz 2c988f959b
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-02-19 13:25:23 +01:00

19 lines
688 B
Dart

// Copyright 2014 The Flutter Authors. 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:flutter/physics.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('nearEquals', () {
expect(nearEqual(double.infinity, double.infinity, 0.1), isTrue);
expect(nearEqual(double.negativeInfinity, double.negativeInfinity, 0.1), isTrue);
expect(nearEqual(double.infinity, double.negativeInfinity, 0.1), isFalse);
expect(nearEqual(0.1, 0.11, 0.001), isFalse);
expect(nearEqual(0.1, 0.11, 0.1), isTrue);
expect(nearEqual(0.1, 0.1, 0.0000001), isTrue);
});
}