From a8e99f3a783069cf85b626c6cfb2fbe83ae4fd44 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 29 Nov 2025 14:53:01 -0500 Subject: chore: new version of OCL and codebase cleanup. Signed-off-by: Amlal El Mahrouss --- tests/chunk_string/chunk_test.cc | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'tests/chunk_string') diff --git a/tests/chunk_string/chunk_test.cc b/tests/chunk_string/chunk_test.cc index 6b2d290..37f5cb1 100644 --- a/tests/chunk_string/chunk_test.cc +++ b/tests/chunk_string/chunk_test.cc @@ -6,26 +6,17 @@ */ #include -#include +#include #include +const char* test_string = "HELLO, WORLD!\r\n"; +const auto iterations = 1024000; +const auto limit = 30; + 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 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(end - start); - - EXPECT_TRUE(optimized_time.count() < 100U); + optimized += test_string; + + EXPECT_TRUE(optimized.str() == test_string); } -- cgit v1.2.3