flutter_flutter/packages/flutter/test/physics/gravity_simulation_test.dart
Alexandre Ardhuin 4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00

16 lines
501 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.
// @dart = 2.8
import 'package:flutter/physics.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('gravity simulation', () {
expect(GravitySimulation(9.81, 10.0, 0.0, 0.0), hasOneLineDescription);
expect(GravitySimulation(9.81, 10.0, 0.0, 0.0).x(10.0), moreOrLessEquals(50.0 * 9.81 + 10.0));
});
}