Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHoogstrate committed Nov 1, 2023
1 parent 43301e6 commit 49379e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
5 changes: 0 additions & 5 deletions geolocator_platform_interface/lib/src/models/position.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ class Position {
longitude: positionMap['longitude'],
timestamp: timestamp,
altitude: positionMap['altitude'] ?? 0.0,
// androidPosition: AndroidPosition(
// satelliteCount: positionMap['gnss_satellite_count'] ?? 0.0,
// satellitesUsedInFix:
// positionMap['gnss_satellites_used_in_fix'] ?? 0.0),
accuracy: positionMap['accuracy'] ?? 0.0,
heading: positionMap['heading'] ?? 0.0,
headingAccuracy: positionMap['heading_accuracy'] ?? 0.0,
Expand All @@ -175,7 +171,6 @@ class Position {
'accuracy': accuracy,
'altitude': altitude,
'altitude_accuracy': altitudeAccuracy,
// 'android_position': androidPosition,
'floor': floor,
'heading': heading,
'heading_accuracy': headingAccuracy,
Expand Down
38 changes: 0 additions & 38 deletions geolocator_platform_interface/test/src/models/position_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -451,44 +451,6 @@ void main() {
);
});

test(
'hashCode should not match when the androidPosition property is different',
() {
// Arrange
final firstPosition = Position(
longitude: 0,
latitude: 0,
timestamp: DateTime.fromMillisecondsSinceEpoch(0),
accuracy: 0,
altitude: 0,
altitudeAccuracy: 0,
heading: 0,
headingAccuracy: 0,
speed: 0,
speedAccuracy: 0,
isMocked: true,
);
final secondPosition = Position(
longitude: 0,
latitude: 0,
timestamp: DateTime.fromMillisecondsSinceEpoch(0),
accuracy: 0,
altitude: 0,
altitudeAccuracy: 0,
heading: 0,
headingAccuracy: 0,
speed: 0,
speedAccuracy: 0,
isMocked: true,
);

// Act & Assert
expect(
firstPosition.hashCode != secondPosition.hashCode,
true,
);
});

test('hashCode should not match when the floor property is different', () {
// Arrange
final firstPosition = Position(
Expand Down

0 comments on commit 49379e1

Please sign in to comment.