diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-23 20:16:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 20:16:02 -0500 |
| commit | 85f89ee4bb137100cbeffcbc10168eb8ea52e6cc (patch) | |
| tree | f6e2063319ceaaa02f523fb5c289e4f37411a2df /dev/tests/chunk_string/chunk_test.cc | |
| parent | 9a70f32ddaec0eef99efbf7ff5597c2adf08f45a (diff) | |
| parent | 65a8349aa5526d071b18cd4d42586c46faaa3823 (diff) | |
Merge pull request #18 from amlel-el-mahrouss/developv1.0.48
OCL v1.0.48
Diffstat (limited to 'dev/tests/chunk_string/chunk_test.cc')
| -rw-r--r-- | dev/tests/chunk_string/chunk_test.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/dev/tests/chunk_string/chunk_test.cc b/dev/tests/chunk_string/chunk_test.cc deleted file mode 100644 index 3498fa8..0000000 --- a/dev/tests/chunk_string/chunk_test.cc +++ /dev/null @@ -1,31 +0,0 @@ -/* - * File: tests/chunk_test.cc - * Purpose: Chunk unit tests in C++ - * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. - */ - -#include <lib/io/print.hpp> -#include <lib/tests/gtest.hpp> -#include <lib/core/chunk_string.hpp> - -TEST(ChunkTest, BasicChunkUsage) -{ - const char* test_string = "HELLO, WORLD!\r\n"; - const auto iterations = 1024000; - const auto limit = 30; - - auto start = std::chrono::high_resolution_clock::now(); - - ocl::basic_chunk_string<char, iterations> optimized; - - for (unsigned i = 0; i < iterations; ++i) - { - optimized += test_string; - } - - auto end = std::chrono::high_resolution_clock::now(); - auto optimized_time = std::chrono::duration_cast<std::chrono::milliseconds>(end - start); - - EXPECT_TRUE(optimized_time.count() < 100U); -} |
