Changeset 4904 in CLRX


Ignore:
Timestamp:
Aug 18, 2019, 4:31:51 PM (4 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCm: Add next testcases for ROCm MsgPack? parser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/tests/amdbin/ROCmMsgPack.cpp

    r4903 r4904  
    481481        assertValue("MsgPack0", "tc20.DataPtr", dataPtr, tc20 + sizeof(tc20));
    482482    }
     483    for (cxuint i = 1; i <= 5; i ++)
     484    {
     485        dataPtr = tc20;
     486        MsgPackArrayParser arrParser(dataPtr, dataPtr + sizeof(tc20)-i);
     487        assertCLRXException("MsgPack0", "tc20_1.Ex", "MsgPack: Can't parse string",
     488                    [&arrParser]() { arrParser.parseString(); });
     489        assertValue("MsgPack0", "tc20_1.DataPtr", dataPtr, tc20 + 2);
     490    }
    483491    const cxbyte tc21[0x2c] = { 0x91, 0xd9, 0x29,
    484492        0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x99,
     
    494502                        v.size(), reinterpret_cast<const cxbyte*>(v.c_str()));
    495503        assertValue("MsgPack0", "tc21.DataPtr", dataPtr, tc21 + sizeof(tc21));
     504    }
     505    for (cxuint i = 1; i <= 20; i ++)
     506    {
     507        dataPtr = tc21;
     508        MsgPackArrayParser arrParser(dataPtr, dataPtr + sizeof(tc21)-i);
     509        assertCLRXException("MsgPack0", "tc21_1.Ex", "MsgPack: Can't parse string",
     510                    [&arrParser]() { arrParser.parseString(); });
     511        assertValue("MsgPack0", "tc21_1.DataPtr", dataPtr, tc21 + 3);
    496512    }
    497513    // longer data (16-bit size)
Note: See TracChangeset for help on using the changeset viewer.