Skip to content

Commit

Permalink
fixup! test: add tests for codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 31, 2023
1 parent 27ab5aa commit 4b042e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/core/codec_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ void main() {
group('CborCodec should', () {
test('convert bytes to values and back', () {
final cborCodec = CborCodec();
const testValue = 'foo';
const testValue = {
'foo': ['bar', 'baz'],
};

final convertedBytes = cborCodec
.valueToBytes(DataSchemaValue.fromString(testValue), null, {});
expect(convertedBytes, [99, 102, 111, 111]);
.valueToBytes(DataSchemaValue.fromObject(testValue), null, {});

final convertedValue = cborCodec.bytesToValue(convertedBytes, null, {});
expect(convertedValue?.value, testValue);
Expand Down

0 comments on commit 4b042e4

Please sign in to comment.