### ----------------------------------------------------
### -- CBOR::Simple
### -- Licenses: Artistic-2.0
### -- Authors: Geoffrey Broadwell
### -- File: t/05-malformed-tags.rakutest
### ----------------------------------------------------
use Test;
use lib $*PROGRAM.sibling('lib');
use CodecMatches;

use CBOR::Simple;


plan 23;


# TAG FORMAT AND CONTENT REQUIREMENTS

malformed($_, "All-ones multibyte tag numbers invalid") for
    < d9ffff00 daffffffff01 dbffffffffffffffff02 >;

malformed($_, "Tag 24 requires byte string content") for
    < d8180a d8182a d8186141 d818820102 d818a0 d818d8184103 d818f7 >;

malformed($_, "Tag 63 requires byte string content") for
    < d83f0a d83f2a d83f6141 d83f820102 d83fa0 d83fd83f4103 d83ff7 >;

malformed($_, "Tag 275 requires only string keys") for
    < d90109a201020304 d90109a26131020304 >;

malformed($_, "Tag 25441 requires an array containing an optional array followed by an optional map") for
    < d96361a201020304 d9636182a10102a10304 d96361828080 d9636182a0816161 >;


done-testing;


