aves_mio/.flutter/packages/flutter/test/physics/near_equal_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

21 lines
667 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('test_friction', () {
expect(nearEqual(5.0, 6.0, 2.0), isTrue);
expect(nearEqual(6.0, 5.0, 2.0), isTrue);
expect(nearEqual(5.0, 6.0, 0.5), isFalse);
expect(nearEqual(6.0, 5.0, 0.5), isFalse);
});
test('test_null', () {
expect(nearEqual(5.0, null, 2.0), isFalse);
expect(nearEqual(null, 5.0, 2.0), isFalse);
expect(nearEqual(null, null, 2.0), isTrue);
});
}