Lines Matching defs:bytes
221 * @tc.desc: Interconversion between trace id and bytes array.
230 * @tc.steps: step2. convert trace id to bytes array.
232 * @tc.steps: step3. convert bytes array to trace id.
234 * @tc.steps: step4. convert invalid id to bytes array.
236 * @tc.steps: step5. convert invalid bytes array to id.
239 // id to bytes
249 uint8_t bytes[idLen + 1];
250 int len = HiTraceChainIdToBytes(&id, bytes, idLen - 1);
252 len = HiTraceChainIdToBytes(&id, bytes, idLen + 1);
254 len = HiTraceChainIdToBytes(&id, bytes, idLen);
256 PRINT_ID(reinterpret_cast<HiTraceIdStruct*>(bytes));
258 // bytes to id
259 HiTraceIdStruct bytesToId = HiTraceChainBytesToId(bytes, idLen - 1);
261 bytesToId = HiTraceChainBytesToId(bytes, idLen + 1);
263 bytesToId = HiTraceChainBytesToId(bytes, idLen);
274 EXPECT_EQ(0, HiTraceChainIdToBytes(&invalidId, bytes, idLen));