Adjust assertion

This commit is contained in:
Aoran Zeng 2024-12-14 09:31:34 +08:00
parent ddfa5639d0
commit 2746fe03c0
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 9 additions and 9 deletions

View File

@ -82,9 +82,9 @@ void br () { puts ("");}
#define assert_str(a, b) assert (xy_streql ((a), (b)))
#define xy_unsupport assert(!"Unsuppoted")
#define xy_unimplement assert(!"Unimplemented temporarily")
#define xy_unreach assert(!"This code shouldn't be reached")
#define xy_unsupported() assert(!"Unsuppoted")
#define xy_unimplemented() assert(!"Unimplemented temporarily")
#define xy_unreached() assert(!"This code shouldn't be reached")
#define xy_arylen(x) (sizeof (x) / sizeof (x[0]))

View File

@ -371,7 +371,7 @@ cli_print_target_features (Feature_t f, const char *input_target_name)
printf (" %s%s\n\n %s\n", bdgreen(HalfYesMark), purple(locally_msg), f.cap_locally_explain);br();
break;
default:
xy_unreach;
xy_unreached();
}
}

View File

@ -1011,7 +1011,7 @@ chsrc_conclude (Source_t *source)
else
{
fprintf (stderr, "chsrc: Wrong change type: %d\n", ProgMode_ChgType);
xy_unreach;
xy_unreached();
}
}
@ -1217,7 +1217,7 @@ chsrc_prepend_to_file (const char *str, const char *filename)
char *cmd = NULL;
if (xy_on_windows)
{
xy_unimplement;
xy_unimplemented();
}
else
{

View File

@ -103,8 +103,8 @@ main (int argc, char const *argv[])
xy_succ ("测试完成", "测试全部通过");
// xy_unimplement;
// xy_unsupport;
// xy_unreach;
// xy_unimplemented();
// xy_unsupported();
// xy_unreached();
return 0;
}