diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-09-23 12:32:31 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-09-23 12:32:31 -0400 |
| commit | 07af98f3a5a54a8736109ed031d3177508943299 (patch) | |
| tree | 032427fabed19c59349c51ce842517e6895a33b8 /test/config.c | |
| parent | d93466b950ff760a1dd7fd0c2d8ae72c8f1ee0b5 (diff) | |
add task queues
Diffstat (limited to 'test/config.c')
| -rw-r--r-- | test/config.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/config.c b/test/config.c index a8fd1ad..a871243 100644 --- a/test/config.c +++ b/test/config.c @@ -20,14 +20,14 @@ KPL_TEST(config_change_module_extension) { KPL_ASSERT(strcmp(config.module_extension, ".l") == 0, "Invalid new module extension"); } -KPL_TEST(config_io_queue_pow) { +KPL_TEST(config_io_queue_pow2) { kpl_config config; const int32_t argc = 3; - const char *argv[] = { "./kpl", "--io-queue-pow=14", "./file.kpl" }; + const char *argv[] = { "./kpl", "--io-queue-pow2=14", "./file.kpl" }; kpl_config_init(&config); int32_t code = kpl_config_parse_args(&config, argc, argv); KPL_ASSERT(code == KPL_EXIT_CODE_SUCCESS, "Invalid exit code"); - KPL_ASSERT(config.io.queue_pow == 14, "Invalid io queue power of two"); + KPL_ASSERT(config.io.queue_pow2 == 14, "Invalid io queue power of two"); } KPL_TEST(config_thread_count) { @@ -39,3 +39,13 @@ KPL_TEST(config_thread_count) { KPL_ASSERT(code == KPL_EXIT_CODE_SUCCESS, "Invalid exit code"); KPL_ASSERT(config.thread.count == 1, "Invalid thread count"); } + +KPL_TEST(config_memory_pool_pow2) { + kpl_config config; + const int32_t argc = 3; + const char *argv[] = { "./kpl", "--memory-pool-pow2=6,7", "./file.kpl" }; + kpl_config_init(&config); + int32_t code = kpl_config_parse_args(&config, argc, argv); + KPL_ASSERT(code == KPL_EXIT_CODE_SUCCESS, "Invalid exit code"); + KPL_ASSERT(config.thread.ring_pool_entries_pow2[6] == 7, "Invalid entries pow2"); +} |
