Home
last modified time | relevance | path

Searched refs:MEMORY_CONTENT (Results 1 - 3 of 3) sorted by relevance

/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_ashmem_test.cpp37 const std::string MEMORY_CONTENT = "HelloWorld2020\0"; member
91 ret = ashmem->WriteToAshmem(MEMORY_CONTENT.c_str(), sizeof(MEMORY_CONTENT), 0); in HWTEST_F()
94 ret = ashmem->WriteToAshmem(MEMORY_CONTENT.c_str(), sizeof(MEMORY_CONTENT), sizeof(MEMORY_CONTENT)); in HWTEST_F()
97 auto readData = ashmem->ReadFromAshmem(sizeof(MEMORY_CONTENT), 0); in HWTEST_F()
101 EXPECT_EQ(memcmp(MEMORY_CONTENT.c_str(), readContent, sizeof(MEMORY_CONTENT)), 0); in HWTEST_F()
103 readData = ashmem->ReadFromAshmem(sizeof(MEMORY_CONTENT), sizeo in HWTEST_F()
[all...]
/commonlibrary/c_utils/base/test/unittest/rust/
H A Drust_utils_ashmem_test.rs21 const MEMORY_CONTENT: &str = "HelloWorld2023"; consts
46 let c_content = CString::new(MEMORY_CONTENT).expect("CString::new Failed!"); in test_ashmem_ffi_write_read_002()
50 assert!(ashmem.WriteToAshmem(c_content_ptr, MEMORY_CONTENT.len().try_into().expect("Invalid content size."), 0)); in test_ashmem_ffi_write_read_002()
51 assert!(ashmem.WriteToAshmem(c_content_ptr, MEMORY_CONTENT.len().try_into().expect("Invalid content size."), in test_ashmem_ffi_write_read_002()
52 MEMORY_CONTENT.len().try_into().expect("Invalid content size."))); in test_ashmem_ffi_write_read_002()
56 readout_ptr = ashmem::ffi::AsCharPtr(ashmem.ReadFromAshmem(MEMORY_CONTENT.len().try_into().expect("Invalid content size."), 0)); in test_ashmem_ffi_write_read_002()
64 let mut expect = String::from(MEMORY_CONTENT); in test_ashmem_ffi_write_read_002()
65 expect.push_str(MEMORY_CONTENT); in test_ashmem_ffi_write_read_002()
81 let c_content = CString::new(MEMORY_CONTENT).expect("CString::new Failed!"); in test_ashmem_ffi_write_read_003()
85 assert!(ashmem.WriteToAshmem(c_content_ptr, MEMORY_CONTENT in test_ashmem_ffi_write_read_003()
[all...]
/commonlibrary/c_utils/base/test/benchmarktest/ashemem_benchmark_test/
H A Dashemem_benchmark_test.cpp37 const std::string MEMORY_CONTENT = "HelloWorld2020\0"; member
104 ret = ashmem->WriteToAshmem(MEMORY_CONTENT.c_str(), sizeof(MEMORY_CONTENT), 0); in BENCHMARK_F()
107 ret = ashmem->WriteToAshmem(MEMORY_CONTENT.c_str(), sizeof(MEMORY_CONTENT), sizeof(MEMORY_CONTENT)); in BENCHMARK_F()
110 auto readData = ashmem->ReadFromAshmem(sizeof(MEMORY_CONTENT), 0); in BENCHMARK_F()
114 AssertEqual(memcmp(MEMORY_CONTENT.c_str(), readContent, sizeof(MEMORY_CONTENT)), 0, in BENCHMARK_F()
115 "memcmp(MEMORY_CONTENT in BENCHMARK_F()
[all...]

Completed in 2 milliseconds