Bemanitools v5.26 release
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
testexes += iidxhook-config-iidxhook1-test
|
||||
|
||||
srcdir_iidxhook-config-iidxhook1-test := src/test/iidxhook
|
||||
|
||||
libs_iidxhook-config-iidxhook1-test := \
|
||||
cconfig \
|
||||
iidxhook1 \
|
||||
test \
|
||||
util \
|
||||
|
||||
src_iidxhook-config-iidxhook1-test := \
|
||||
iidxhook-config-iidxhook1-test.c \
|
||||
|
||||
################################################################################
|
||||
|
||||
testexes += iidxhook-config-iidxhook2-test
|
||||
|
||||
srcdir_iidxhook-config-iidxhook2-test := src/test/iidxhook
|
||||
|
||||
libs_iidxhook-config-iidxhook2-test := \
|
||||
iidxhook2 \
|
||||
cconfig \
|
||||
test \
|
||||
util \
|
||||
|
||||
src_iidxhook-config-iidxhook2-test := \
|
||||
iidxhook-config-iidxhook2-test.c \
|
||||
|
||||
################################################################################
|
||||
@@ -0,0 +1,68 @@
|
||||
#include "iidxhook1/config-iidxhook1.h"
|
||||
|
||||
#include "test/check.h"
|
||||
#include "test/test.h"
|
||||
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the tests */
|
||||
|
||||
static void test_config_iidxhook1_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook1 config_iidxhook1;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook1_init(config);
|
||||
iidxhook_config_iidxhook1_get(&config_iidxhook1, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_false(config_iidxhook1.happy_sky_ms_bg_fix);
|
||||
check_bool_false(config_iidxhook1.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
static void test_config_iidxhook1()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook1 config_iidxhook1;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook1_init(config);
|
||||
|
||||
cconfig_set2(config, "misc.happy_sky_ms_bg_fix", "true");
|
||||
cconfig_set2(config, "misc.use_d3d9_hooks", "true");
|
||||
|
||||
iidxhook_config_iidxhook1_get(&config_iidxhook1, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_true(config_iidxhook1.happy_sky_ms_bg_fix);
|
||||
check_bool_true(config_iidxhook1.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
static void test_config_iidxhook1_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook1 config_iidxhook1;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook1_init(config);
|
||||
|
||||
cconfig_set2(config, "misc.happy_sky_ms_bg_fix", "123");
|
||||
cconfig_set2(config, "misc.use_d3d9_hooks", "sss");
|
||||
|
||||
iidxhook_config_iidxhook1_get(&config_iidxhook1, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_false(config_iidxhook1.happy_sky_ms_bg_fix);
|
||||
check_bool_false(config_iidxhook1.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
TEST_MODULE_BEGIN("iidxhook-config-iidxhook1")
|
||||
TEST_MODULE_TEST(test_config_iidxhook1_defaults)
|
||||
TEST_MODULE_TEST(test_config_iidxhook1)
|
||||
TEST_MODULE_TEST(test_config_iidxhook1_invalid_values)
|
||||
TEST_MODULE_END()
|
||||
@@ -0,0 +1,68 @@
|
||||
#include "iidxhook2/config-iidxhook2.h"
|
||||
|
||||
#include "test/check.h"
|
||||
#include "test/test.h"
|
||||
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the tests */
|
||||
|
||||
static void test_config_iidxhook2_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook2 config_iidxhook2;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook2_init(config);
|
||||
iidxhook_config_iidxhook2_get(&config_iidxhook2, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_false(config_iidxhook2.distorted_ms_bg_fix);
|
||||
check_bool_false(config_iidxhook2.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
static void test_config_iidxhook2()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook2 config_iidxhook2;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook2_init(config);
|
||||
|
||||
cconfig_set2(config, "misc.distorted_ms_bg_fix", "true");
|
||||
cconfig_set2(config, "misc.use_d3d9_hooks", "true");
|
||||
|
||||
iidxhook_config_iidxhook2_get(&config_iidxhook2, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_true(config_iidxhook2.distorted_ms_bg_fix);
|
||||
check_bool_true(config_iidxhook2.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
static void test_config_iidxhook2_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct iidxhook_config_iidxhook2 config_iidxhook2;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
iidxhook_config_iidxhook2_init(config);
|
||||
|
||||
cconfig_set2(config, "misc.distorted_ms_bg_fix", "123");
|
||||
cconfig_set2(config, "misc.use_d3d9_hooks", "sss");
|
||||
|
||||
iidxhook_config_iidxhook2_get(&config_iidxhook2, config);
|
||||
|
||||
cconfig_finit(config);
|
||||
|
||||
check_bool_false(config_iidxhook2.distorted_ms_bg_fix);
|
||||
check_bool_false(config_iidxhook2.use_d3d9_hooks);
|
||||
}
|
||||
|
||||
TEST_MODULE_BEGIN("iidxhook-config-iidxhook2")
|
||||
TEST_MODULE_TEST(test_config_iidxhook2_defaults)
|
||||
TEST_MODULE_TEST(test_config_iidxhook2)
|
||||
TEST_MODULE_TEST(test_config_iidxhook2_invalid_values)
|
||||
TEST_MODULE_END()
|
||||
Reference in New Issue
Block a user