simplify tests

This commit is contained in:
Katayama Hirofumi MZ 2025-03-30 07:27:47 +09:00
parent fcfc736881
commit 39d2613c21

View file

@ -105,7 +105,7 @@ static void TEST_setjmp_3(void)
static void TEST_setjmp_4(void) static void TEST_setjmp_4(void)
{ {
volatile int x = 101, y = 102, z = 103; volatile int x = 0xFEEDF00D;
volatile int value; volatile int value;
memset(&g_jmp_buf, 0xCC, sizeof(g_jmp_buf)); memset(&g_jmp_buf, 0xCC, sizeof(g_jmp_buf));
@ -115,24 +115,17 @@ static void TEST_setjmp_4(void)
{ {
ok_int(TRUE, TRUE); ok_int(TRUE, TRUE);
z = 999;
TEST_longjmp(0); TEST_longjmp(0);
ok_int(TRUE, FALSE); ok_int(TRUE, FALSE);
ok_int(TRUE, FALSE);
ok_int(TRUE, FALSE);
} }
else if (value == 1) else if (value == 1)
{ {
ok_int(x, 101); ok_int(x, 0xFEEDF00D);
ok_int(y, 102);
ok_int(z, 999);
} }
else else
{ {
ok_int(TRUE, FALSE); ok_int(TRUE, FALSE);
ok_int(TRUE, FALSE);
ok_int(TRUE, FALSE);
} }
} }