/test/xts/acts/distributed_schedule_lite/distributed_schedule_posix/src/ |
D | MsgParserFuncTest.cpp | 26 static int8_t RunTest(const uint8_t *buffer, uint16_t bufferLen, const TlvParseCallback onTlvParseD… in RunTest() argument 36 interInfo.payload = buffer; in RunTest() 69 uint8_t buffer[] = { variable 88 RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr); 98 uint8_t buffer[] = { variable 111 int8_t resultCode = RunTest(nullptr, sizeof(buffer), onTlvParseDone, nullptr); 121 uint8_t buffer[] = { variable 129 int8_t resultCode = RunTest(buffer, sizeof(buffer), onTlvParseDone, nullptr); 139 uint8_t buffer[] = { variable 152 int8_t resultCode = RunTest(buffer, MAX_LENGTH + 1, onTlvParseDone, nullptr); [all …]
|
D | MsgParserLenFuncTest.cpp | 26 static int8_t RunTest(const uint8_t *buffer, uint16_t bufferLen, const TlvParseCallback onTlvParseD… in RunTest() argument 36 interInfo.payload = buffer; in RunTest() 73 char buffer[PACKET_DATA_SIZE] = {0}; variable 75 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE}; 92 RunTest((uint8_t *)buffer, dataSize, onTlvParseDone, nullptr); 107 char buffer[PACKET_DATA_SIZE] = {0}; variable 109 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE}; 126 RunTest((uint8_t *)buffer, dataSize, onTlvParseDone, nullptr); 139 char buffer[PACKET_DATA_SIZE] = {0}; variable 141 DmsPacket dmsPacket {buffer, PACKET_DATA_SIZE}; [all …]
|
/test/xts/acts/commonlibrary/ets_utils/buffer_lib_standard/src/main/js/test/ |
D | Buffer.test.js | 16 import buffer from "@ohos.buffer"; 29 let buf = buffer.alloc(10); 45 let buf = buffer.alloc(10).fill("ab$#", encode); 59 let buf1 = buffer.alloc(10); 60 let buf = buffer.alloc(10).fill(buf1); 73 let buf = buffer.alloc(0); 89 let buf = buffer.alloc(0).fill("ab$#", encode); 103 let buf1 = buffer.alloc(10); 104 let buf = buffer.alloc(0).fill(buf1); 118 let buf = buffer.alloc(-5); [all …]
|
/test/xts/hats/kernel/dmabuffer/ |
D | dmabuf_alloc.cpp | 85 DmabufHeapBuffer buffer = { .size = BUFFER_SIZE, .heapFlags = 0 }; variable 86 ASSERT_EQ(0, DmabufHeapBufferAlloc(heapFd, &buffer)); 88 void *ptr = mmap(nullptr, BUFFER_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, buffer.fd, 0); 91 ASSERT_EQ(0, DmabufHeapBufferSyncStart(buffer.fd, DMA_BUF_HEAP_BUF_SYNC_RW)); 95 ASSERT_EQ(0, DmabufHeapBufferSyncEnd(buffer.fd, DMA_BUF_HEAP_BUF_SYNC_RW)); 101 ASSERT_EQ(0, DmabufHeapBufferFree(&buffer)); 113 DmabufHeapBuffer buffer = { .size = BUFFER_SIZE, .heapFlags = 0 }; variable 114 ASSERT_EQ(0, DmabufHeapBufferAlloc(heapFd, &buffer)); 116 void *ptr = mmap(nullptr, BUFFER_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, buffer.fd, 0); 119 ASSERT_EQ(0, DmabufHeapBufferSyncStart(buffer.fd, DMA_BUF_HEAP_BUF_SYNC_RW)); [all …]
|
/test/xts/acts/graphic/graphicnapitest/ |
D | NativeBufferTest.cpp | 37 static inline OH_NativeBuffer* buffer = nullptr; member in OHOS::Rosen::NativeBufferTest 42 buffer = nullptr; in SetUpTestCase() 47 buffer = nullptr; in TearDownTestCase() 57 buffer = OH_NativeBuffer_Alloc(nullptr); 58 ASSERT_EQ(buffer, nullptr); 68 buffer = OH_NativeBuffer_Alloc(&config); 69 ASSERT_NE(buffer, nullptr); 90 uint32_t id = OH_NativeBuffer_GetSeqNum(buffer); 101 OH_NativeBuffer_GetConfig(buffer, &checkConfig); 142 int32_t ret = OH_NativeBuffer_Reference(buffer); [all …]
|
/test/xts/acts/commonlibrary/thirdparty/musl/entry/src/main/cpp/ |
D | complexndk.cpp | 89 char buffer[20]; in Conj() local 91 sprintf(buffer, "%.2f", getRealAndImage); in Conj() 92 strcat(backParam, buffer); in Conj() 95 sprintf(buffer, "%.2f", getRealAndImage); in Conj() 96 strcat(backParam, buffer); in Conj() 117 char buffer[20]; in ConjF() local 119 sprintf(buffer, "%.2f", getRealAndImage); in ConjF() 120 strcat(backParam, buffer); in ConjF() 123 sprintf(buffer, "%.2f", getRealAndImage); in ConjF() 124 strcat(backParam, buffer); in ConjF() [all …]
|
/test/xts/acts/multimedia_lite/media_lite_posix/audio_native/src/ |
D | ActsMediaAudioTest.cpp | 66 uint8_t *buffer; variable 68 audioCapturer->Read(buffer, framesize, false); 69 EXPECT_TRUE(sizeof(buffer) > 0); 92 uint8_t *buffer; variable 95 audioCapturer->Read(buffer, framesize, false); 96 EXPECT_TRUE(sizeof(buffer) > 0); 119 uint8_t *buffer; variable 122 audioCapturer->Read(buffer, framesize, false); 123 EXPECT_TRUE(sizeof(buffer) > 0); 146 uint8_t *buffer; variable [all …]
|
/test/xts/acts/communication/bluetooth_standard/src/main/js/test/ |
D | BtGattAdvertiser.test.js | 132 manufactureValue:manufactureValueBuffer.buffer 136 serviceValue:serviceValueBuffer.buffer 143 manufactureValue:manufactureValueBuffer.buffer 147 serviceValue:serviceValueBuffer.buffer 186 manufactureValue:manufactureValueBuffer.buffer 190 serviceValue:serviceValueBuffer.buffer 197 manufactureValue:manufactureValueBuffer.buffer 201 serviceValue:serviceValueBuffer.buffer 240 manufactureValue:manufactureValueBuffer.buffer 244 serviceValue:serviceValueBuffer.buffer [all …]
|
/test/testfwk/developer_test/aw/cxx/hwext/ |
D | perf.cpp | 310 char buffer[ID_PROPERTY_LENGTH] = {0}; in SaveResult() local 319 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult() 320 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%g", m_dbBaseLine) > 0) { in SaveResult() 321 m_pTester->RecordProperty("baseline", buffer); in SaveResult() 324 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult() 325 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%d", m_dCaseVersion) > 0) { in SaveResult() 326 m_pTester->RecordProperty("tc_version", buffer); in SaveResult() 329 (void)memset_s(buffer, sizeof(buffer), 0, sizeof(buffer)); in SaveResult() 330 if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) - 1, "%g", m_dbLastValue) > 0) { in SaveResult() 331 m_pTester->RecordProperty("lastvalue", m_bHasLastValue ? buffer : ""); in SaveResult() [all …]
|
/test/xts/acts/communication/bluetooth_gatt/src/main/js/test/ |
D | BtManagerGattAdvertiser.test.js | 133 manufactureValue:manufactureValueBuffer.buffer 137 serviceValue:serviceValueBuffer.buffer 144 manufactureValue:manufactureValueBuffer.buffer 148 serviceValue:serviceValueBuffer.buffer 189 manufactureValue:manufactureValueBuffer.buffer 193 serviceValue:serviceValueBuffer.buffer 200 manufactureValue:manufactureValueBuffer.buffer 204 serviceValue:serviceValueBuffer.buffer 245 manufactureValue:manufactureValueBuffer.buffer 249 serviceValue:serviceValueBuffer.buffer [all …]
|
/test/xts/device_attest/services/core/adapter/ |
D | attest_adapter.c | 41 int32_t AttestReadAuthStatus(char* buffer, uint32_t bufferLen) in AttestReadAuthStatus() argument 43 return OEMReadAuthStatus(buffer, bufferLen); in AttestReadAuthStatus() 79 int32_t AttestWriteNetworkConfig(const char* buffer, uint32_t bufferLen) in AttestWriteNetworkConfig() argument 81 return OEMWriteNetworkConfig(buffer, bufferLen); in AttestWriteNetworkConfig() 84 int32_t AttestReadNetworkConfig(char* buffer, uint32_t bufferLen) in AttestReadNetworkConfig() argument 86 return OEMReadNetworkConfig(buffer, bufferLen); in AttestReadNetworkConfig() 89 int32_t AttestReadDefaultNetworkConfig(char* buffer, uint32_t bufferLen) in AttestReadDefaultNetworkConfig() argument 91 return OEMReadDefaultNetworkConfig(buffer, bufferLen); in AttestReadDefaultNetworkConfig() 99 int32_t AttestReadAuthResultCode(char* buffer, uint32_t bufferLen) in AttestReadAuthResultCode() argument 101 return OEMReadAuthResultCode(buffer, bufferLen); in AttestReadAuthResultCode()
|
D | attest_adapter_oem.c | 58 int32_t OEMReadAuthStatus(char* buffer, uint32_t bufferLen) in OEMReadAuthStatus() argument 60 return ReadFile(AUTH_RESULT_PATH, AUTH_STATUS_FILE_NAME, buffer, bufferLen); in OEMReadAuthStatus() 105 int32_t OEMWriteNetworkConfig(const char* buffer, uint32_t bufferLen) in OEMWriteNetworkConfig() argument 110 return WriteFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMWriteNetworkConfig() 114 int32_t OEMReadNetworkConfig(char* buffer, uint32_t bufferLen) in OEMReadNetworkConfig() argument 116 return ReadFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMReadNetworkConfig() 120 int32_t OEMReadDefaultNetworkConfig(char* buffer, uint32_t bufferLen) in OEMReadDefaultNetworkConfig() argument 122 return ReadFile(ETC_DEVICE_ATTEST_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMReadDefaultNetworkConfig() 135 int32_t OEMReadAuthResultCode(char* buffer, uint32_t bufferLen) in OEMReadAuthResultCode() argument 137 return ReadFile(AUTH_RESULT_PATH, AUTH_RESULT_CODE_FILE_NAME, buffer, bufferLen); in OEMReadAuthResultCode()
|
/test/ostest/wukong/common/include/ |
D | special_test_object.h | 55 char buffer[50]; in toString() local 58 …result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", endX_, endY_, startX_, st… in toString() 60 …result = sprintf_s(buffer, sizeof(buffer), "Swap: (%d, %d) -> (%d, %d)", startX_, startY_, endX_, … in toString() 65 return std::string(buffer); in toString() 84 char buffer[50]; in toString() local 85 int result = sprintf_s(buffer, sizeof(buffer), "Point: (%d, %d)", x_, y_); in toString() 89 return std::string(buffer); in toString() 104 char buffer[50]; in toString() local 105 int result = sprintf_s(buffer, sizeof(buffer), "Bundlename: (%s)", bundlename_.c_str()); in toString() 109 return std::string(buffer); in toString()
|
/test/xts/acts/graphic/nativebuffer/entry/src/main/cpp/ |
D | nativebuffer.cpp | 31 OH_NativeBuffer *buffer = OH_NativeBuffer_Alloc(&config); in getBuffer() local 32 return buffer; in getBuffer() 39 OH_NativeBuffer *buffer = getBuffer(); in OHNativeBufferAlloc() local 40 if (buffer != nullptr) { in OHNativeBufferAlloc() 50 OH_NativeBuffer *buffer = OH_NativeBuffer_Alloc(nullptr); in OHNativeBufferAllocAbnormal() local 52 if (buffer != nullptr) { in OHNativeBufferAllocAbnormal() 62 OH_NativeBuffer *buffer = getBuffer(); in OHNativeBufferReference() local 63 if (buffer != nullptr) { in OHNativeBufferReference() 64 int32_t ret = OH_NativeBuffer_Reference(buffer); in OHNativeBufferReference() 85 OH_NativeBuffer *buffer = getBuffer(); in OHNativeBufferUnreference() local [all …]
|
/test/xts/acts/arkui/ace_napi_test/entry/src/main/ets/test/ |
D | NativeApiArrayBufferTest.ets | 38 const buffer = napitest.External(); 39 expect(!napitest.IsDetachedTest(buffer.buffer)).assertTrue(); 48 const buffer = new ArrayBuffer(128); 49 expect(!napitest.IsDetachedTest(buffer)).assertTrue(); 58 const buffer = napitest.External(); 59 expect(!napitest.IsDetachedTest(buffer.buffer)).assertTrue(); 60 napitest.DetachTest(buffer); 61 expect(napitest.IsDetachedTest(buffer.buffer)).assertTrue();
|
/test/xts/hats/ai/nnrt/hdi/v2_0/common/ |
D | hdi_nnrt_test_utils.cpp | 146 OHOS::HDI::Nnrt::V2_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateIOTensor() local 147 int ret = device->AllocateBuffer(ADDEND_BUFFER_LENGTH, buffer); in CreateIOTensor() 148 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateIOTensor() 149 … printf("[NNRtTest] [CreateIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateIOTensor() 155 .data = buffer}; in CreateIOTensor() 165 OHOS::HDI::Nnrt::V2_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateInputIOTensor() local 166 auto ret = device->AllocateBuffer(length, buffer); in CreateInputIOTensor() 168 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateInputIOTensor() 169 …rintf("[NNRtTest] [CreateInputIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateInputIOTensor() 173 auto memAddress = memManager->MapMemory(buffer.fd, length); in CreateInputIOTensor() [all …]
|
/test/xts/hats/ai/nnrt/hdi/v1_0/common/ |
D | hdi_nnrt_test_utils.cpp | 146 OHOS::HDI::Nnrt::V1_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateIOTensor() local 147 int ret = device->AllocateBuffer(ADDEND_BUFFER_LENGTH, buffer); in CreateIOTensor() 148 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateIOTensor() 149 … printf("[NNRtTest] [CreateIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateIOTensor() 155 .data = buffer}; in CreateIOTensor() 165 OHOS::HDI::Nnrt::V1_0::SharedBuffer buffer{NNRT_INVALID_FD, 0, 0, 0}; in CreateInputIOTensor() local 166 auto ret = device->AllocateBuffer(length, buffer); in CreateInputIOTensor() 168 if (ret != HDF_SUCCESS || buffer.fd == NNRT_INVALID_FD) { in CreateInputIOTensor() 169 …rintf("[NNRtTest] [CreateInputIOTensor] allocate buffer error. ret: %d, fd: %d\n", ret, buffer.fd); in CreateInputIOTensor() 173 auto memAddress = memManager->MapMemory(buffer.fd, length); in CreateInputIOTensor() [all …]
|
/test/xts/hats/hdf/camera/cameraHdi/buffer_manager/ |
D | buffer_manager_utest.cpp | 66 OHOS::SurfaceBuffer* buffer = consumer->AcquireBuffer(); in __anon076448480202() local 67 if (buffer != nullptr) { in __anon076448480202() 68 consumer->ReleaseBuffer(buffer); in __anon076448480202() 87 sptr<SurfaceBuffer> buffer = nullptr; in __anon076448480302() local 88 consumer->AcquireBuffer(buffer, flushFence, timestamp, damage); in __anon076448480302() 89 if (buffer != nullptr) { in __anon076448480302() 90 SurfaceError ret = consumer->ReleaseBuffer(buffer, -1); in __anon076448480302() 161 std::shared_ptr<IBuffer> buffer; variable 170 buffer = bufferPool->AcquireBuffer(); 171 EXPECT_EQ(true, buffer != nullptr); [all …]
|
/test/xts/acts/graphic/webGL/src/main/js/test/ |
D | 1.txt | 513 ./WebGL1.buffer.js:56: * @tc.name webgl_test_createBuffer 514 ./WebGL1.buffer.js:81: * @tc.name webgl_test_isBuffer 515 ./WebGL1.buffer.js:103: * @tc.name webgl_test_isBuffer_1 516 ./WebGL1.buffer.js:116: * @tc.name webgl_test_isBuffer_2 517 ./WebGL1.buffer.js:141: * @tc.name webgl_test_bindBuffer 518 ./WebGL1.buffer.js:163: * @tc.name webgl_test_bindBuffer_1 519 ./WebGL1.buffer.js:181: * @tc.name webgl_test_bindBuffer_2 520 ./WebGL1.buffer.js:199: * @tc.name webgl_test_bindBuffer_3 521 ./WebGL1.buffer.js:217: * @tc.name webgl_test_bindBuffer_4 522 ./WebGL1.buffer.js:245: * @tc.name webgl_test_deleteBuffer [all …]
|
/test/xts/acts/kernel_lite/time_posix/src/ |
D | TimeUtilsTest.cpp | 253 char buffer[80] = {0}; variable 260 size_t ftime = strftime(buffer, sizeof(buffer) - 1, "%Ex %EX %A", localTime); 262 EXPECT_STREQ(buffer, "01/01/70 05:14:40 Thursday") << "buffer return error!"; 267 ftime = strftime(buffer, sizeof(buffer) - 1, "%y-%m-%d %H:%M:%S", localTime); 268 EXPECT_STREQ(buffer, "38-01-19 03:14:07") << "buffer return error!"; 273 ftime = strftime(buffer, sizeof(buffer) - 1, "%Y-%m-%d %H:%M:%S", localTime); 274 EXPECT_STREQ(buffer, "9999-12-31 23:59:59") << "buffer return error!"; 279 ftime = strftime(buffer, sizeof(buffer) - 1, "%x %X", localTime); 280 EXPECT_STREQ(buffer, "12/13/01 20:45:52") << "buffer return error!"; 282 ftime = strftime(buffer, sizeof(buffer) - 1, "%Y-%m-%d %H:%M:%S", localTime); [all …]
|
/test/xts/hats/hdf/display/buffer/unittest/ |
D | display_buffer_ut.cpp | 277 BufferHandle *buffer = nullptr; in AllocMemTest() local 280 ret = displayBuffer_->AllocMem(info, buffer); in AllocMemTest() 285 if (ret != DISPLAY_SUCCESS || buffer == nullptr) { in AllocMemTest() 289 MetadataTest(*buffer); in AllocMemTest() 290 void *vAddr = displayBuffer_->Mmap(*buffer); in AllocMemTest() 293 displayBuffer_->FreeMem(*buffer); in AllocMemTest() 297 ret = displayBuffer_->InvalidateCache(*buffer); in AllocMemTest() 300 displayBuffer_->Unmap(*buffer); in AllocMemTest() 301 displayBuffer_->FreeMem(*buffer); in AllocMemTest() 305 if (memset_s(vAddr, buffer->size, 0, buffer->size) != EOK) { in AllocMemTest() [all …]
|
/test/xts/device_attest_lite/services/core/adapter/ |
D | attest_adapter_oem.c | 58 int32_t OEMReadAuthStatus(char* buffer, uint32_t bufferLen) in OEMReadAuthStatus() argument 60 return ReadFile(AUTH_RESULT_PATH, AUTH_STATUS_FILE_NAME, buffer, bufferLen); in OEMReadAuthStatus() 99 int32_t OEMWriteNetworkConfig(const char* buffer, uint32_t bufferLen) in OEMWriteNetworkConfig() argument 104 return WriteFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMWriteNetworkConfig() 108 int32_t OEMReadNetworkConfig(char* buffer, uint32_t bufferLen) in OEMReadNetworkConfig() argument 110 return ReadFile(AUTH_RESULT_PATH, NETWORK_CONFIG_FILE_NAME, buffer, bufferLen); in OEMReadNetworkConfig() 123 int32_t OEMReadAuthResultCode(char* buffer, uint32_t bufferLen) in OEMReadAuthResultCode() argument 125 return ReadFile(AUTH_RESULT_PATH, AUTH_RESULT_CODE_FILE_NAME, buffer, bufferLen); in OEMReadAuthResultCode()
|
/test/xts/hats/hdf/display/composer/common/ |
D | hdi_test_layer.cpp | 39 BufferHandle* buffer = nullptr; in HdiGrallocBuffer() local 40 int ret = gralloc->AllocMem(info, buffer); in HdiGrallocBuffer() 44 if (buffer != nullptr) { in HdiGrallocBuffer() 45 void* vaddr = gralloc->Mmap(*buffer); in HdiGrallocBuffer() 49 buffer_ = buffer; in HdiGrallocBuffer() 118 HdiGrallocBuffer* buffer = nullptr; in GetFrontBuffer() local 120 buffer = frontBuffers_.front().get(); in GetFrontBuffer() 122 return buffer; in GetFrontBuffer() 127 HdiGrallocBuffer* buffer = nullptr; in GetBackBuffer() local 129 buffer = backBuffers_.front().get(); in GetBackBuffer() [all …]
|
/test/xts/device_attest/services/core/include/adapter/ |
D | attest_adapter_oem.h | 46 int32_t OEMReadAuthStatus(char* buffer, uint32_t bufferLen); 56 int32_t OEMWriteNetworkConfig(const char* buffer, uint32_t bufferLen); 58 int32_t OEMReadNetworkConfig(char* buffer, uint32_t bufferLen); 60 int32_t OEMReadDefaultNetworkConfig(char* buffer, uint32_t bufferLen); 64 int32_t OEMReadAuthResultCode(char* buffer, uint32_t bufferLen);
|
/test/xts/acts/communication/btmanager_errorcode401/src/main/js/test/ |
D | BtMGattAdvertiser401.test.js | 124 manufactureValue:manufactureValueBuffer.buffer 128 serviceValue:serviceValueBuffer.buffer 135 manufactureValue:manufactureValueBuffer.buffer 139 serviceValue:serviceValueBuffer.buffer 176 manufactureValue:manufactureValueBuffer.buffer 180 serviceValue:serviceValueBuffer.buffer 187 manufactureValue:manufactureValueBuffer.buffer 191 serviceValue:serviceValueBuffer.buffer 233 manufactureValue:manufactureValueBuffer.buffer 237 serviceValue:serviceValueBuffer.buffer [all …]
|