Skip to content

Commit c6e1b27

Browse files
committed
fix endianness of the older date unit tests
1 parent 6317600 commit c6e1b27

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/extensions_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ import 'package:flutter_test/flutter_test.dart';
66
void main() {
77
group("Concept2DateExtension - ", () {
88
test('converting a time from bytes', () {
9-
// TODO: fixme, my endianness is backwards
10-
final bytes = Uint8List.fromList([42, 156, 1, 14]); //date 10908
9+
final bytes = Uint8List.fromList([156, 42, 1, 14]); //date 10908
1110
expect(
1211
Concept2DateExtension.fromBytes(bytes), DateTime(2021, 12, 9, 14, 1));
1312
// expect(CsafeIntExtension.fromBytes(bytes, Endian.little), 2147483648);
1413
});
1514

1615
test('converting another time from bytes', () {
17-
// TODO: fixme, my endianness is backwards
18-
final bytes = Uint8List.fromList([45, 241, 1, 14]);
16+
final bytes = Uint8List.fromList([241, 45, 1, 14]);
1917
expect(
2018
Concept2DateExtension.fromBytes(bytes), DateTime(2022, 1, 31, 14, 1));
2119
// expect(CsafeIntExtension.fromBytes(bytes, Endian.little), 2147483648);

0 commit comments

Comments
 (0)