Apply clang-format code style to all source files
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
static void test_config_eamuse_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_util_config_eamuse config_eamuse;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -20,15 +20,17 @@ static void test_config_eamuse_defaults()
|
||||
|
||||
check_str_eq(config_eamuse.card_type, "C02");
|
||||
check_str_eq(net_addr_to_str(&config_eamuse.server), "localhost:80");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.pcbid, false),
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.pcbid, false),
|
||||
"0101020304050607086F");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.eamid, false),
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.eamid, false),
|
||||
"0101020304050607086F");
|
||||
}
|
||||
|
||||
static void test_config_eamuse()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_util_config_eamuse config_eamuse;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -45,17 +47,19 @@ static void test_config_eamuse()
|
||||
cconfig_finit(config);
|
||||
|
||||
check_str_eq(config_eamuse.card_type, "D01");
|
||||
check_str_eq(net_addr_to_str(&config_eamuse.server),
|
||||
"http://myServer.com/legacy");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.pcbid, false),
|
||||
check_str_eq(
|
||||
net_addr_to_str(&config_eamuse.server), "http://myServer.com/legacy");
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.pcbid, false),
|
||||
"0101020304050607086F");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.eamid, false),
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.eamid, false),
|
||||
"0101020304050607086F");
|
||||
}
|
||||
|
||||
static void test_config_eamuse_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_util_config_eamuse config_eamuse;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -73,9 +77,11 @@ static void test_config_eamuse_invalid_values()
|
||||
|
||||
check_str_eq(config_eamuse.card_type, "C02");
|
||||
check_str_eq(net_addr_to_str(&config_eamuse.server), "asdf");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.pcbid, false),
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.pcbid, false),
|
||||
"00000000000000000000");
|
||||
check_str_eq(security_id_to_str(&config_eamuse.eamid, false),
|
||||
check_str_eq(
|
||||
security_id_to_str(&config_eamuse.eamid, false),
|
||||
"00000000000000000000");
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#include "test/check.h"
|
||||
#include "test/test.h"
|
||||
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering
|
||||
the tests */
|
||||
|
||||
static void test_config_gfx_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_gfx config_gfx;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -27,12 +27,14 @@ static void test_config_gfx_defaults()
|
||||
check_bool_false(config_gfx.windowed);
|
||||
check_int_eq(config_gfx.scale_back_buffer_width, 0);
|
||||
check_int_eq(config_gfx.scale_back_buffer_height, 0);
|
||||
check_int_eq(config_gfx.scale_back_buffer_width, IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_NONE);
|
||||
check_int_eq(
|
||||
config_gfx.scale_back_buffer_width,
|
||||
IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_NONE);
|
||||
}
|
||||
|
||||
static void test_config_gfx()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_gfx config_gfx;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -62,12 +64,14 @@ static void test_config_gfx()
|
||||
check_bool_true(config_gfx.windowed);
|
||||
check_int_eq(config_gfx.scale_back_buffer_width, 1920);
|
||||
check_int_eq(config_gfx.scale_back_buffer_height, 1080);
|
||||
check_int_eq(config_gfx.scale_back_buffer_filter, IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_LINEAR);
|
||||
check_int_eq(
|
||||
config_gfx.scale_back_buffer_filter,
|
||||
IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_LINEAR);
|
||||
}
|
||||
|
||||
static void test_config_gfx_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_gfx config_gfx;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -97,7 +101,9 @@ static void test_config_gfx_invalid_values()
|
||||
check_bool_false(config_gfx.windowed);
|
||||
check_int_eq(config_gfx.scale_back_buffer_width, 0);
|
||||
check_int_eq(config_gfx.scale_back_buffer_height, 0);
|
||||
check_int_eq(config_gfx.scale_back_buffer_width, IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_NONE);
|
||||
check_int_eq(
|
||||
config_gfx.scale_back_buffer_width,
|
||||
IIDXHOOK_UTIL_D3D9_BACK_BUFFER_SCALE_FILTER_NONE);
|
||||
}
|
||||
|
||||
TEST_MODULE_BEGIN("iidxhook-config-gfx")
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
#include "test/check.h"
|
||||
#include "test/test.h"
|
||||
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the tests */
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the
|
||||
* tests */
|
||||
|
||||
static void test_config_misc_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_misc config_misc;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -23,7 +24,7 @@ static void test_config_misc_defaults()
|
||||
|
||||
static void test_config_misc()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_misc config_misc;
|
||||
|
||||
config = cconfig_init();
|
||||
@@ -43,7 +44,7 @@ static void test_config_misc()
|
||||
|
||||
static void test_config_misc_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_misc config_misc;
|
||||
|
||||
config = cconfig_init();
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
#include "test/check.h"
|
||||
#include "test/test.h"
|
||||
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the tests */
|
||||
/* We don't care about cleaning up some of the memory to avoid cluttering the
|
||||
* tests */
|
||||
|
||||
static void test_config_sec_defaults()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_sec config_sec;
|
||||
const uint32_t boot_seeds[3] = {0, 0, 0};
|
||||
|
||||
@@ -19,15 +20,18 @@ static void test_config_sec_defaults()
|
||||
cconfig_finit(config);
|
||||
|
||||
check_str_eq(security_mcode_to_str(&config_sec.boot_version), "GEC02 ");
|
||||
check_data_eq(config_sec.boot_seeds, sizeof(config_sec.boot_seeds),
|
||||
(void*) boot_seeds, sizeof(boot_seeds));
|
||||
check_str_eq(security_mcode_to_str(&config_sec.black_plug_mcode),
|
||||
"GQC02JAA");
|
||||
check_data_eq(
|
||||
config_sec.boot_seeds,
|
||||
sizeof(config_sec.boot_seeds),
|
||||
(void *) boot_seeds,
|
||||
sizeof(boot_seeds));
|
||||
check_str_eq(
|
||||
security_mcode_to_str(&config_sec.black_plug_mcode), "GQC02JAA");
|
||||
}
|
||||
|
||||
static void test_config_sec()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_sec config_sec;
|
||||
const uint32_t boot_seeds[3] = {1, 1, 1};
|
||||
|
||||
@@ -44,15 +48,18 @@ static void test_config_sec()
|
||||
cconfig_finit(config);
|
||||
|
||||
check_str_eq(security_mcode_to_str(&config_sec.boot_version), "ASDFG ");
|
||||
check_data_eq(config_sec.boot_seeds, sizeof(config_sec.boot_seeds),
|
||||
(void*) boot_seeds, sizeof(boot_seeds));
|
||||
check_str_eq(security_mcode_to_str(&config_sec.black_plug_mcode),
|
||||
"GQD01JAB");
|
||||
check_data_eq(
|
||||
config_sec.boot_seeds,
|
||||
sizeof(config_sec.boot_seeds),
|
||||
(void *) boot_seeds,
|
||||
sizeof(boot_seeds));
|
||||
check_str_eq(
|
||||
security_mcode_to_str(&config_sec.black_plug_mcode), "GQD01JAB");
|
||||
}
|
||||
|
||||
static void test_config_sec_invalid_values()
|
||||
{
|
||||
struct cconfig* config;
|
||||
struct cconfig *config;
|
||||
struct iidxhook_config_sec config_sec;
|
||||
const uint32_t boot_seeds[3] = {0, 0, 0};
|
||||
|
||||
@@ -69,10 +76,13 @@ static void test_config_sec_invalid_values()
|
||||
cconfig_finit(config);
|
||||
|
||||
check_str_eq(security_mcode_to_str(&config_sec.boot_version), "GEC02 ");
|
||||
check_data_eq(config_sec.boot_seeds, sizeof(config_sec.boot_seeds),
|
||||
(void*) boot_seeds, sizeof(boot_seeds));
|
||||
check_str_eq(security_mcode_to_str(&config_sec.black_plug_mcode),
|
||||
"GQC02JAA");
|
||||
check_data_eq(
|
||||
config_sec.boot_seeds,
|
||||
sizeof(config_sec.boot_seeds),
|
||||
(void *) boot_seeds,
|
||||
sizeof(boot_seeds));
|
||||
check_str_eq(
|
||||
security_mcode_to_str(&config_sec.black_plug_mcode), "GQC02JAA");
|
||||
}
|
||||
|
||||
TEST_MODULE_BEGIN("iidxhook-config-sec")
|
||||
|
||||
Reference in New Issue
Block a user