diff options
Diffstat (limited to 'test/config.c')
| -rw-r--r-- | test/config.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/config.c b/test/config.c index 8a1dc64..a8fd1ad 100644 --- a/test/config.c +++ b/test/config.c @@ -19,3 +19,23 @@ KPL_TEST(config_change_module_extension) { KPL_ASSERT(code == KPL_EXIT_CODE_SUCCESS, "Invalid exit code"); KPL_ASSERT(strcmp(config.module_extension, ".l") == 0, "Invalid new module extension"); } + +KPL_TEST(config_io_queue_pow) { + kpl_config config; + const int32_t argc = 3; + const char *argv[] = { "./kpl", "--io-queue-pow=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_TEST(config_thread_count) { + kpl_config config; + const int32_t argc = 3; + const char *argv[] = { "./kpl", "--thread-count=1", "./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.count == 1, "Invalid thread count"); +} |
