Commit 789c2f1f authored by Mikkel Nygaard Ravn's avatar Mikkel Nygaard Ravn Committed by GitHub

Fixed endianness unit test (#8753)

parent 8eac6cd0
...@@ -66,27 +66,27 @@ void main() { ...@@ -66,27 +66,27 @@ void main() {
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
-0x7fffffff - 1, -0x7fffffff - 1,
<int>[3, 0x80, 0x00, 0x00, 0x00], <int>[3, 0x00, 0x00, 0x00, 0x80],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
-0x7fffffff - 2, -0x7fffffff - 2,
<int>[4, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff], <int>[4, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
0x7fffffff, 0x7fffffff,
<int>[3, 0x7f, 0xff, 0xff, 0xff], <int>[3, 0xff, 0xff, 0xff, 0x7f],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
0x7fffffff + 1, 0x7fffffff + 1,
<int>[4, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00], <int>[4, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
-0x7fffffffffffffff - 1, -0x7fffffffffffffff - 1,
<int>[4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], <int>[4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
...@@ -96,7 +96,7 @@ void main() { ...@@ -96,7 +96,7 @@ void main() {
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
0x7fffffffffffffff, 0x7fffffffffffffff,
<int>[4, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], <int>[4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f],
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
...@@ -113,7 +113,7 @@ void main() { ...@@ -113,7 +113,7 @@ void main() {
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
new Uint8List(254), new Uint8List(254),
<int>[8, 254, 0, 254]..addAll(new List<int>.filled(254, 0)), <int>[8, 254, 254, 0]..addAll(new List<int>.filled(254, 0)),
); );
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
...@@ -123,7 +123,7 @@ void main() { ...@@ -123,7 +123,7 @@ void main() {
_checkEncoding<dynamic>( _checkEncoding<dynamic>(
standard, standard,
new Uint8List(0xffff + 1), new Uint8List(0xffff + 1),
<int>[8, 255, 0, 1, 0, 0]..addAll(new List<int>.filled(0xffff + 1, 0)), <int>[8, 255, 0, 0, 1, 0]..addAll(new List<int>.filled(0xffff + 1, 0)),
); );
}); });
test('should encode and decode simple messages', () { test('should encode and decode simple messages', () {
...@@ -251,4 +251,4 @@ bool _deepEqualsMap(Map<dynamic, dynamic> valueA, Map<dynamic, dynamic> valueB) ...@@ -251,4 +251,4 @@ bool _deepEqualsMap(Map<dynamic, dynamic> valueA, Map<dynamic, dynamic> valueB)
return false; return false;
} }
return true; return true;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment