anchor.diff:          0x18,
           0x19,
           0xff
  -      ];
  -      final buffer = typed.Uint8Buffer();
  -      buffer.addAll(values);
  -      output.putBytes(buffer);
  -      final input = cbor.Input(output.getData());
  -      final decoder = cbor.Decoder.withListener(input, listener);
  -      decoder.run();
  -      expect(listener.lastValue, [
  -        1,
  -        2,
  -        3,
  -        4,
  -        5,
  -        6,
  -        7,
  -        8,
  -        9,
  -        10,
  -        11,
  -        12,
  -        13,
  -        14,
  -        15,
  -        16,
  -        17,
  -        18,
  -        19,
  -        20,
  -        21,
  -        22,
  -        23,
  -        24,
  -        25
  -      ]);
  -      expect(listener.indefiniteStart, isTrue);
  -      decoder.listener = slistener;
  -      input.reset();
  -      slistener.itemStack.clear();
  -      decoder.run();
  -      final decodeStack = cbor.DecodeStack();
  -      decodeStack.build(slistener.itemStack);
  -      final slist = decodeStack.walk();
  -      expect(slist, isNotNull);
  -      expect(slist!.length, 1);
  -      expect(slist[0], [
  -        1,
  -        2,
  -        3,
  -        4,
  -        5,
  -        6,
  -        7,
  -        8,
  -        9,
  -        10,
  -        11,
  -        12,
  -        13,
  -        14,
  -        15,
  -        16,
  -        17,
  -        18,
  -        19,
  -        20,
  -        21,
  -        22,
  -        23,
  -        24,
  -        25
  -      ]);
  +      ]);
  +      expect(decoded is CborList, true);
  +
  +      if (decoded is CborList) {
  +        for (var i = 0; i < 25; i++) {
  +          expect(decoded[i], CborSmallInt(i + 1));
  +        }
  +      }
       });
   
       test('{_ "a":1, "b": [_ 2,3]}', () {
  -      output.clear();
  -      listener.clear();
  -      final values = [
  -        0xbf,
  -        0x61,
  -        0x61,
  -        0x01,
  -        0x61,
  -        0x62,
  -        0x9f,
  -        0x02,
  -        0x03,
  -        0xff,
  -        0xff
  -      ];
  -      final buffer = typed.Uint8Buffer();
  -      buffer.addAll(values);
  -      output.putBytes(buffer);
  -      final input = cbor.Input(output.getData());
  -      final decoder = cbor.Decoder.withListener(input, listener);
  -      decoder.run();
  -      expect(listener.lastValue, ['a', 1, 'b', 2, 3]);
  -      expect(listener.indefiniteStart, isTrue);
  -      decoder.listener = slistener;
  -      input.reset();
  -      slistener.itemStack.clear();
  -      decoder.run();
  -      final decodeStack = cbor.DecodeStack();
  -      decodeStack.build(slistener.itemStack);
  -      final slist = decodeStack.walk();
  -      expect(slist, isNotNull);
  -      expect(slist!.length, 1);
  -      expect(slist[0], {
  -        'a': 1,
  -        'b': [2, 3]
  +      final decoded = cbor.decode(
  +          [0xbf, 0x61, 0x61, 0x01, 0x61, 0x62, 0x9f, 0x02, 0x03, 0xff, 0xff]);
  +      expect(decoded, {
  +        CborString('a'): CborSmallInt(1),
  +        CborString('b'): [CborSmallInt(2), CborSmallInt(3)],
         });
       });
   
       test('["a", {_ "b": "c"}]', () {
  -      output.clear();
  -      listener.clear();
  -      final values = [0x82, 0x61, 0x61, 0xbf, 0x61, 0x62, 0x61, 0x63, 0xff];
  -      final buffer = typed.Uint8Buffer();
  -      buffer.addAll(values);
  -      output.putBytes(buffer);
  -      final input = cbor.Input(output.getData());
  -      final decoder = cbor.Decoder.withListener(input, listener);
  -      decoder.run();
  -      expect(listener.lastValue, ['a', 'b', 'c']);
  -      expect(listener.indefiniteStart, isTrue);
  -      decoder.listener = slistener;
  -      input.reset();
  -      slistener.itemStack.clear();
  -      decoder.run();
  -      final decodeStack = cbor.DecodeStack();
  -      decodeStack.build(slistener.itemStack);
  -      final slist = decodeStack.walk();
  -      expect(slist, isNotNull);
  -      expect(slist!.length, 1);
  -      expect(slist[0], [
  -        'a',
  -        {'b': 'c'}
  +      final decoded =
  +          cbor.decode([0x82, 0x61, 0x61, 0xbf, 0x61, 0x62, 0x61, 0x63, 0xff]);
  +      expect(decoded, [
  +        CborString('a'),
  +        {
  +          CborString('b'): CborString('c'),
  +        },
         ]);
       });
   
       test('{_ "Fun": true, "Amt": -2}', () {
  -      output.clear();
  -      listener.clear();
  -      final values = [
  +      final decoded = cbor.decode([
           0xbf,
           0x63,
           0x46,
  
positive.code:         0x65,
          0x61,
          0x45
        ];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue,
            ['a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E']);
        expect(listener.lastSize, 5);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], {'a': 'A', 'b': 'B', 'c': 'C', 'd': 'D', 'e': 'E'});
      });
  
      test("(_ h'0102', h'030405')", () {
        output.clear();
        listener.clear();
        final values = [0x5f, 0x42, 0x01, 0x02, 0x43, 0x03, 0x04, 0x05, 0xff];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, [
          [1, 2],
          [3, 4, 5]
        ]);
        expect(listener.indefiniteStart, isTrue);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], [1, 2, 3, 4, 5]);
      });
  
      test('(_ "strea", "ming")', () {
        output.clear();
        listener.clear();
        final values = [
          0x7f,
          0x65,
          0x73,
  
negative.code:         0x6e,
          0x67,
          0xff
        ]);
        expect(decoded, CborString('streaming'));
      });
  
      test('[_ ]', () {
        final decoded = cbor.decode([0x9f, 0xff]);
        expect(decoded, []);
      });
  
      test('[_ 1, [2, 3], [_4, 5]]', () {
        final decoded = cbor
            .decode([0x9f, 0x01, 0x82, 0x02, 0x03, 0x9f, 0x04, 0x05, 0xff, 0xff]);
        expect(decoded, [
          CborSmallInt(1),
          [CborSmallInt(2), CborSmallInt(3)],
          [CborSmallInt(4), CborSmallInt(5)],
        ]);
      });
  
      test('[_ 1, [2, 3], [4, 5]]', () {
        final decoded =
            cbor.decode([0x9f, 0x01, 0x82, 0x02, 0x03, 0x82, 0x04, 0x05, 0xff]);
        expect(decoded, [
          CborSmallInt(1),
          [CborSmallInt(2), CborSmallInt(3)],
          [CborSmallInt(4), CborSmallInt(5)],
        ]);
      });
  
      test('[1, [2, 3], [_ 4, 5]]', () {
        final decoded =
            cbor.decode([0x83, 0x01, 0x82, 0x02, 0x03, 0x9f, 0x04, 0x05, 0xff]);
        expect(decoded, [
          CborSmallInt(1),
          [CborSmallInt(2), CborSmallInt(3)],
          [CborSmallInt(4), CborSmallInt(5)],
        ]);
      });
  
      test('[1, [_ 2, 3], [4, 5]]', () {
        final decoded =
            cbor.decode([0x83, 0x01, 0x9f, 0x02, 0x03, 0xff, 0x82, 0x04, 0x05]);
        expect(decoded, [
          CborSmallInt(1),
          [CborSmallInt(2), CborSmallInt(3)],
          [CborSmallInt(4), CborSmallInt(5)],
        ]);
      });
  
      test('[_ 1, 2, 3 .. 25]', () {
        final decoded = cbor.decode([
          0x9f,
          0x01,
          0x02,
  