20 lines
755 B
Dart
20 lines
755 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:geolocator/geolocator.dart';
|
|
// Since LocationService's internals are private, we either test via its stream
|
|
// or just ensure it compiles. For now, we leave it as a compilation test.
|
|
// import 'package:motorcycle_dash/services/location_service.dart';
|
|
|
|
void main() {
|
|
group('LocationService Filtering', () {
|
|
test('rejects impossible speeds (conceptual test)', () {
|
|
final position = Position(
|
|
longitude: 0, latitude: 0, timestamp: DateTime.now(),
|
|
accuracy: 10, altitude: 0, heading: 0, speed: 150.0, // Over 100 max
|
|
speedAccuracy: 0, altitudeAccuracy: 0, headingAccuracy: 0
|
|
);
|
|
|
|
expect(position.speed, greaterThan(100.0));
|
|
});
|
|
});
|
|
}
|