Skip to content

Commit

Permalink
Add extra test case
Browse files Browse the repository at this point in the history
  • Loading branch information
njooma committed Nov 11, 2024
1 parent ee6ec76 commit 1e94864
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit_test/utils/utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,15 @@ void main() {
'geopoint': Value(structValue: {'_type': 'geopoint', 'lat': 12.3, 'lng': 45.6}.toStruct()),
'angular_velocity': Value(structValue: {'_type': 'angular_velocity', 'x': 1, 'y': 2, 'z': 3}.toStruct()),
'euler': Value(structValue: {'_type': 'euler', 'roll': 1, 'pitch': 2, 'yaw': 3}.toStruct()),
'no_change': Value(numberValue: 182),
};
final response = GetReadingsResponse(readings: input);
final output = response.toPrimitive();
expect(output['velocity'], Vector3(x: 1, y: 2, z: 3));
expect(output['geopoint'], GeoPoint(latitude: 12.3, longitude: 45.6));
expect(output['angular_velocity'], Vector3(x: 1, y: 2, z: 3));
expect(output['euler'], Orientation_EulerAngles(roll: 1, pitch: 2, yaw: 3));
expect(output['no_change'], 182);
});
});
});
Expand Down

0 comments on commit 1e94864

Please sign in to comment.