aboutsummaryrefslogtreecommitdiff
path: root/test/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/config.c')
-rw-r--r--test/config.c16
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");
+}