Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Sep 14, 2023
1 parent 0c7c5a4 commit 4233f98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/decode_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void main() {
'0.0': [0, 0, 0, 0, 0, 0, 0, 1], // .0 or 0.0
};

final decoder = PostgresBinaryDecoder(1700);
final decoder = PostgresBinaryDecoder(PostgreSQLDataType.numeric);
binaries.forEach((key, value) {
final uint8List = Uint8List.fromList(value);
final res = decoder.convert(uint8List);
Expand Down
8 changes: 1 addition & 7 deletions test/encoding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -692,14 +692,8 @@ Future expectInverse(dynamic value, PostgreSQLDataType dataType) async {
} else if (dataType == PostgreSQLDataType.bigSerial) {
dataType = PostgreSQLDataType.bigInteger;
}
late int code;
PostgresBinaryDecoder.typeMap.forEach((key, type) {
if (type == dataType) {
code = key;
}
});

final decoder = PostgresBinaryDecoder(code);
final decoder = PostgresBinaryDecoder(dataType);
final decodedValue = decoder.convert(encodedValue);

expect(decodedValue, value);
Expand Down

0 comments on commit 4233f98

Please sign in to comment.