/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_thread_test.cpp | 132 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, false, TestRun01); in HWTEST_F() local 133 ThreadStatus status = test->Start("test_thread_01", THREAD_PROI_LOW, 1024); in HWTEST_F() 136 pthread_t thread = test->GetThread(); in HWTEST_F() 139 EXPECT_EQ(pthread_equal(thread, -1) != 0, (test->IsRunning() ? false : true)); in HWTEST_F() 142 EXPECT_EQ(test->priority_, DEFAULT_PRIO); in HWTEST_F() 143 EXPECT_EQ(test->name_, DEFAULT_THREAD_NAME); in HWTEST_F() 146 EXPECT_EQ(test->data_, 0); in HWTEST_F() 148 test->NotifyExitSync(); in HWTEST_F() 150 EXPECT_EQ(pthread_equal(test->GetThread(), -1) != 0, (test in HWTEST_F() 160 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, true, TestRun01); HWTEST_F() local 188 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, false, TestRun02); HWTEST_F() local 215 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, true, TestRun02); HWTEST_F() local 243 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, false, TestRun03); HWTEST_F() local 270 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, true, TestRun03); HWTEST_F() local 303 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, true, TestRun03); HWTEST_F() local 327 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(0, true, TestRun03); HWTEST_F() local 382 std::unique_ptr<TestThread2> test = std::make_unique<TestThread2>(0, TestRun03); HWTEST_F() local [all...] |
H A D | utils_rwlock_test.cpp | 29 // This class is designed for test RWLock. "buf" is protected by "rwLock". 73 TestRWLock test; in HWTEST_F() local 75 thread first(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_1))); in HWTEST_F() 79 thread second(bind(&TestRWLock::ReadStr, ref(test), ref(readOut1))); in HWTEST_F() 80 thread third(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_2))); in HWTEST_F() 82 thread fourth(bind(&TestRWLock::ReadStr, ref(test), ref(readOut2))); in HWTEST_F() 102 TestRWLock test(false); in HWTEST_F() 104 thread first(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_1))); in HWTEST_F() 108 thread second(bind(&TestRWLock::ReadStr, ref(test), ref(readOut1))); in HWTEST_F() 109 thread third(bind(&TestRWLock::WriteStr, ref(test), re in HWTEST_F() [all...] |
/commonlibrary/c_utils/base/test/benchmarktest/thread_benchmark_test/ |
H A D | thread_benchmark_test.cpp | 149 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, false, TestRun01); in BENCHMARK_F() local 150 ThreadStatus status = test->Start("test_thread_01", THREAD_PROI_LOW, THREAD_STACK_SIZE); in BENCHMARK_F() 154 pthread_t thread = test->GetThread(); in BENCHMARK_F() 157 AssertEqual((pthread_equal(thread, INVALID_THREAD_ID) != 0), (test->IsRunning() ? false : true), in BENCHMARK_F() 159 (test->IsRunning() ? false : true) as expected.", state); in BENCHMARK_F() 162 AssertEqual(test->priority_, DEFAULT_PRIO, "test->priority_ did not equal DEFAULT_PRIO as expected.", state); in BENCHMARK_F() 163 AssertEqual(test->name_, DEFAULT_THREAD_NAME, in BENCHMARK_F() 164 "test->name_ did not equal DEFAULT_THREAD_NAME as expected.", state); in BENCHMARK_F() 167 AssertEqual(test in BENCHMARK_F() 189 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, true, TestRun01); BENCHMARK_F() local 219 ThreadTestProcedure(std::unique_ptr<TestThread>& test, const int expectedDataValue, benchmark::State& state) ThreadTestProcedure() argument 253 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, false, TestRun02); BENCHMARK_F() local 273 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, true, TestRun02); BENCHMARK_F() local 313 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, false, TestRun03); BENCHMARK_F() local 333 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, true, TestRun03); BENCHMARK_F() local 376 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, true, TestRun03); BENCHMARK_F() local 402 ThreadTestStart(std::unique_ptr<T>& test, benchmark::State& state) ThreadTestStart() argument 426 std::unique_ptr<TestThread> test = std::make_unique<TestThread>(INITIAL_TEST_VALUE, true, TestRun03); BENCHMARK_F() local 479 std::unique_ptr<TestThread2> test = std::make_unique<TestThread2>(0, TestRun03); BENCHMARK_F() local [all...] |
/commonlibrary/c_utils/base/test/unittest/rust/ |
H A D | rust_utils_directory_test.rs | 23 #[test] 26 let str_base_name = "/data/test/rust_utils_directory_test"; in test_get_current_proc_full_file_name_001() 31 #[test] 34 let str_path_name = "/data/test/"; in test_get_current_proc_path_001() 39 #[test] 42 let str_file_path = "/data/test/"; in test_extract_file_path_001() 47 #[test] 55 #[test] 58 let str_base_name = "test/test in test_extract_file_ext_001() [all...] |
H A D | rust_utils_file_test.rs | 48 #[test] 66 #[test] 74 #[test] 85 #[test] 96 #[test] 107 #[test] 118 #[test] 125 #[test] 138 #[test] 151 #[test] [all...] |
/commonlibrary/c_utils/base/test/benchmarktest/rwlock_benchmark_test/ |
H A D | rwlock_benchmark_test.cpp | 53 // This class is designed for test RWLock. "buf_" is protected by "rwLock_". 101 TestRWLock test; in BENCHMARK_F() local 103 thread first(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_1))); in BENCHMARK_F() 108 thread second(bind(&TestRWLock::ReadStr, ref(test), ref(readOut1))); in BENCHMARK_F() 109 thread third(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_2))); in BENCHMARK_F() 111 thread fourth(bind(&TestRWLock::ReadStr, ref(test), ref(readOut2))); in BENCHMARK_F() 137 TestRWLock test(false); in BENCHMARK_F() 139 thread first(bind(&TestRWLock::WriteStr, ref(test), ref(WRITE_IN_1))); in BENCHMARK_F() 143 thread second(bind(&TestRWLock::ReadStr, ref(test), ref(readOut1))); in BENCHMARK_F() 144 thread third(bind(&TestRWLock::WriteStr, ref(test), re in BENCHMARK_F() 169 TestRWLock test; BENCHMARK_F() local 201 TestRWLock test; BENCHMARK_F() local 225 TestRWLock test; BENCHMARK_F() local [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/ |
H A D | ylong_tokio_spawn_blocking.rs | 16 #![feature(test)] 21 extern crate test; 66 #[cfg(test)] 68 extern crate test; 72 use test::Bencher; 80 #[cfg(test)] 82 extern crate test; 86 use test::Bencher;
|
H A D | ylong_tokio_async_file.rs | 21 //! - Add new benchmarks to test write performance. 23 #![feature(test)] 103 #[cfg(test)] 105 extern crate test; 108 use test::Bencher; 119 #[cfg(test)] 124 extern crate test; 127 use test::Bencher; 136 // benchmark to apply the same method to test ylong, tokio, swift, and avoid
|
H A D | ylong_tokio_schedule.rs | 16 #![feature(test)] 65 #[cfg(test)] 67 extern crate test; 71 use test::Bencher; 82 #[cfg(test)] 84 extern crate test; 88 use test::Bencher;
|
H A D | ylong_tokio_multi_threaded.rs | 24 #![feature(test)] 51 ($runtime: ident, $test: ident, $fn: ident) => { 53 fn $test(b: &mut Bencher) { 75 #[cfg(test)] 77 extern crate test; 81 use test::Bencher; 119 #[cfg(test)] 121 extern crate test; 125 use test::Bencher;
|
H A D | ylong_tokio_bounded_mpsc.rs | 16 #![feature(test)] 21 extern crate test; 92 #[cfg(test)] 94 extern crate test; 98 use test::Bencher; 108 #[cfg(test)] 110 extern crate test; 114 use test::Bencher;
|
H A D | ylong_tokio_unbounded_mpsc.rs | 16 #![feature(test)] 21 extern crate test; 92 #[cfg(test)] 94 extern crate test; 98 use test::Bencher; 107 #[cfg(test)] 109 extern crate test; 113 use test::Bencher;
|
/commonlibrary/rust/ylong_http/ylong_http/src/h2/ |
H A D | pseudo.rs | 158 #[cfg(test)] 162 /// UT test cases for `PseudoHeaders::new`. 167 #[test] 177 /// UT test cases for `PseudoHeaders::contains_authority`. 185 #[test] 194 /// UT test cases for `PseudoHeaders::authority`. 201 #[test] 210 /// UT test cases for `PseudoHeaders::set_authority`. 217 #[test] 229 /// UT test case [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/h3/ |
H A D | pseudo.rs | 157 #[cfg(test)] 161 /// UT test cases for `PseudoHeaders::new`. 166 #[test] 176 /// UT test cases for `PseudoHeaders::contains_authority`. 184 #[test] 193 /// UT test cases for `PseudoHeaders::authority`. 200 #[test] 209 /// UT test cases for `PseudoHeaders::set_authority`. 216 #[test] 228 /// UT test case [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
H A D | signal.rs | 33 #[test] 48 #[test] 66 #[test] 92 #[test] 110 #[test] 134 #[test] 149 #[test] 164 #[test] 179 #[test] 194 #[test] [all...] |
H A D | semaphore_test.rs | 20 /// SDV test cases for `AutoRelSemaphore::acquire()`. 27 #[test] 39 /// SDV test cases for `AutoRelSemaphore::try_acquire()`. 47 #[test] 59 /// SDV test cases for `Semaphore::release()`. 65 #[test] 73 /// SDV test cases for `AutoRelSemaphore::close()`. 79 #[test] 95 /// Stress test cases for `AutoRelSemaphore::acquire()`. 101 #[test] [all...] |
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/ |
H A D | settings.rs | 465 #[cfg(test)] 473 /// UT test cases for `Retry::new`. 478 #[test] 488 /// UT test cases for `Redirect::default`. 494 #[test] 503 /// UT test cases for `Retry::clone`. 509 #[test] 515 /// UT test cases for `Retry::default`. 520 #[test] 526 /// UT test case [all...] |
/commonlibrary/rust/ylong_json/src/value/array/ |
H A D | vec.rs | 275 #[cfg(test)] in fmt() 279 /// UT test for `Array::is_empty`. in fmt() 287 /// 3. Checks if the test results are correct. in fmt() 288 #[test] in fmt() 294 /// UT test for `Array::pop`. in fmt() 302 /// 3. Checks if the test results are correct. in fmt() 303 #[test] in fmt() 310 /// UT test for `Array::iter_mut`. in fmt() 318 /// 3. Checks if the test results are correct. in fmt() 319 #[test] in fmt() [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/encode/ |
H A D | part.rs | 240 #[cfg(test)] 245 /// UT test cases for `syn::Body::data` of `MimePartEncoder`. 252 #[test] 263 /// UT test cases for `syn::Body::data` of `MimePartEncoder`. 270 #[test] 282 /// UT test cases for `syn::Body::data` of `MimePartEncoder`. 289 #[test] 301 /// UT test cases for `syn::Body::data` of `MimePartEncoder`. 308 #[test] 322 /// UT test case [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/signal/unix/ |
H A D | mod.rs | 408 #[cfg(test)] 418 /// UT test cases of `SignalKind` conversion. 425 #[test] 433 /// UT test cases for `signal_return_watch` with forbidden input. 438 #[test] 444 /// UT test cases for `recv` and `poll_recv`. 450 #[test] 465 /// UT test cases for SIGALRM signal. 470 #[test] 480 /// UT test case [all...] |
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/config/tls/alpn/ |
H A D | mod.rs | 127 #[cfg(test)] 131 /// UT test cases for `AlpnProtocol::wire_format_bytes`. 137 #[test] 150 /// UT test cases for `AlpnProtocol::clone`. 156 #[test] 161 /// UT test cases for `AlpnProtocolList::new`. 166 #[test] 171 /// UT test cases for `AlpnProtocolList::default`. 176 #[test] 181 /// UT test case [all...] |
/commonlibrary/rust/ylong_json/src/ |
H A D | linked_list.rs | 575 #[cfg(test)] 579 /// UT test for `LinkedList::pop_back`. 587 /// 3. Checks if the test results are correct. 588 #[test] 597 /// UT test for `LinkedList::iter_mut`. 605 /// 3. Checks if the test results are correct. 606 #[test] 618 /// UT test for `LinkedList::back`. 626 /// 3. Checks if the test results are correct. 628 #[test] [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/ |
H A D | ready.rs | 216 #[cfg(test)] 217 mod test { modules 222 // @title ready from_event function ut test 233 #[test] 286 /// UT test cases for ready from_usize function 291 #[test] 297 /// UT test cases for ready is_empty function 303 #[test] 312 /// UT test cases for ready is_readable function 318 #[test] [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/response/ |
H A D | mod.rs | 103 #[cfg(test)] 112 /// UT test cases for `Response::version`. 117 /// 3. Checks if the test result is correct. 118 #[test] 130 /// UT test cases for `Response::status_code`. 136 /// 3. Checks if the test result is correct. 137 #[test] 149 /// UT test cases for `Response::headers`. 154 /// 3. Checks if the test result is correct. 155 #[test] [all...] |
/commonlibrary/rust/ylong_json/src/value/ |
H A D | number.rs | 220 #[cfg(test)] 224 /// UT test for `Number::fmt`. 232 /// 3. Checks if the test results are correct. 233 #[test] 245 /// UT test for `Number::clone`. 253 /// 3. Checks if the test results are correct. 254 #[test] 266 /// UT test for `Number::is_unsigned`. 274 /// 3. Checks if the test results are correct. 275 #[test] [all...] |