From 3ba3d8200eacbff74f8d61fc2eb02f4a6837117c Mon Sep 17 00:00:00 2001 From: Guillem Poy Date: Mon, 22 Jan 2024 18:10:16 +0100 Subject: [PATCH] Added test - does not pass --- geolocator/pubspec.yaml | 2 +- geolocator/test/geolocator_test.dart | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/geolocator/pubspec.yaml b/geolocator/pubspec.yaml index bfbf5e7c..5b8dc25d 100644 --- a/geolocator/pubspec.yaml +++ b/geolocator/pubspec.yaml @@ -2,7 +2,7 @@ name: geolocator description: Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions. repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen -version: 10.1.0 +version: 10.1.1 environment: sdk: ">=2.15.0 <4.0.0" diff --git a/geolocator/test/geolocator_test.dart b/geolocator/test/geolocator_test.dart index 59099a9f..65926baf 100644 --- a/geolocator/test/geolocator_test.dart +++ b/geolocator/test/geolocator_test.dart @@ -44,6 +44,15 @@ void main() { expect(isLocationServiceEnabled, true); }); + test('generatePositionWithoutTimestamp', () async { + final Position? position = Position.fromMap({ + 'latitude': 0.0, + 'longitude': 0.0, + }); + + expect(position != null, true); + }); + test('getLastKnownPosition', () async { final position = await Geolocator.getLastKnownPosition();