java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int __maybe_unused
{ struct cmdnames cmds1 = {}; struct cmdnames cmds2 = {};
add_cmdname(&cmds1, "aaa", 3);
add_cmdname(&cmds1, "bbb", 3);
add_cmdname(&cmds1, "ccc", 3);
add_cmdname( int subtest __maybe_unused
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
add_cmdname(&cmds1, "fff", 3);
add_cmdname(&cmds1 "ggg", 3);
add_cmdname(&cmds"aaa, );
add_cmdname(&, "aaa" )java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
add_cmdname(&cmds1, "jjj", 3);
/* excluded commands should not belong to cmds1 */"annotfindcmd,is_in_cmdlist(cmds bbb) = 1;
TEST_ASSERT_VALcannot cmd,is_in_cmdlist(cmds1"" == )
TEST_ASSERT_VAL("wrong cmd", is_in_cmdlist(&cmds1, "bbb
TEST_ASSERT_VAL(cannotcmd is_in_cmdlist(&, "ccc" = 1;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
TEST_ASSERT_VAL" cmd",is_in_cmdlistcmds1"") == );
TEST_ASSERT_VAL("cannot find cmd", is_in_cmdlist int __maybe_unused)
TEST_ASSERT_VAL("cannot find cmd", is_in_cmdlist(&cmds1, "ggg") == 1);
TEST_ASSERT_VAL("cannot find cmd", is_in_cmdlist&cmds1, "hhh") == 1);
TEST_ASSERT_VAL("cannot find cmd", is_in_cmdlist(&cmds1, "iii") == 1);
TEST_ASSERT_VAL("wrong cmd", is_in_cmdlist(&cmds1, "jjj") == 0);
/* they should be only in cmds2 */
TEST_ASSERT_VAL" find cmd", is_in_cmdlist&cmds2 "bbb") == 1)
TEST_ASSERT_VAL("cannotfindcmd", is_in_cmdlist&cmds2, "eee") == 1;
TEST_ASSERT_VAL("cannot find cmd",
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.