outfname="/dev/stdout";
# Tokens
- pp_ws = "[ \t\f\v\r\n]+";
- pp_ws_op = "[ \t\f\v\r\n]*";
- pp_prefix = pp_ws_op "#" pp_ws_op;
- pp_tag = "([Ss][Uu][Ii][Tt][Ee]|[Tt][Cc][Aa][Ss][Ee])";
- pp_test_tag = "[Tt][Ee][Ss][Tt]";
- pp_main_pre_tag = "[Mm][Aa][Ii][Nn]-[Pp][Rr][Ee]";
+ pp_ws = "[ \t\f\v\r\n]+";
+ pp_ws_op = "[ \t\f\v\r\n]*";
+ pp_prefix = pp_ws_op "#" pp_ws_op;
+ pp_sep = "[ \t\f\v\r\n]+";
+ pp_name = ".+";
+ pp_hex_quad = "[A-F0-9a-f][A-F0-9a-f][A-F0-9a-f][A-F0-9a-f]"
+ pp_ucn = "\\\\(u" pp_hex_quad "|U" pp_hex_quad pp_hex_quad ")";
+ pp_test_name = "([A-Za-z_]|" pp_ucn ")([A-Za-z0-9_]|" pp_ucn ")*";
+ pp_tag = "([Ss][Uu][Ii][Tt][Ee]|[Tt][Cc][Aa][Ss][Ee])";
+ pp_test_tag = "[Tt][Ee][Ss][Tt]";
+ pp_main_pre_tag = "[Mm][Aa][Ii][Nn]-[Pp][Rr][Ee]";
pp_main_post_tag = "[Mm][Aa][Ii][Nn]-[Pp][Oo][Ss][Tt]";
- pp_sep = "[ \t\f\v\r\n]+";
- pp_name = ".+";
- pp_hex_quad = "[A-F0-9a-f][A-F0-9a-f][A-F0-9a-f][A-F0-9a-f]"
- pp_ucn = "\\\\(u" pp_hex_quad "|U" pp_hex_quad pp_hex_quad ")";
- pp_test_name = "([A-Za-z_]|" pp_ucn ")([A-Za-z0-9_]|" pp_ucn ")*";
+
+ # Tests with arguments
+ pp_test_exit_tag = "[Tt][Ee][Ss][Tt]-[Ee][Xx][Ii][Tt][[:blank:]]*[(]" \
+ "[[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[)]";
+ pp_test_signal_tag = "[Tt][Ee][Ss][Tt]-[Ss][Ii][Gg][Nn][Aa][Ll]" \
+ "[[:blank:]]*[(][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[)]";
+ pp_test_loop_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp][[:blank:]]*[(]" \
+ "[[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[,][[:blank:]]*" \
+ "[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[)]";
+ pp_test_loop_exit_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp]-[Ee][Xx][Ii][Tt]" \
+ "[[:blank:]]*[(][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*" \
+ "[,][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[,]" \
+ "[[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[)]";
+ pp_test_loop_signal_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp]-[Ss][Ii][Gg]" \
+ "[Nn][Aa][Ll][[:blank:]]*[(][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+" \
+ "[[:blank:]]*[,][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*" \
+ "[,][[:blank:]]*[+-]?[[:blank:]]*[[:digit:]]+[[:blank:]]*[)]";
pp_suite_or_tcase_line = "^" pp_prefix pp_tag pp_ws pp_name "$";
pp_test_line_prefix = "^" pp_prefix pp_test_tag pp_ws;
+ pp_test_exit_line_prefix = "^" pp_prefix pp_test_exit_tag pp_ws;
+ pp_test_signal_line_prefix = "^" pp_prefix pp_test_signal_tag pp_ws;
+ pp_test_loop_line_prefix = "^" pp_prefix pp_test_loop_tag pp_ws;
+ pp_test_loop_exit_line_prefix = "^" pp_prefix pp_test_loop_exit_tag pp_ws;
+ pp_test_loop_signal_line_prefix = "^" pp_prefix pp_test_loop_signal_tag pp_ws;
pp_test_line = pp_test_line_prefix pp_name pp_ws_op "$";
+ pp_test_exit_line = pp_test_exit_line_prefix pp_name pp_ws_op "$";
+ pp_test_signal_line = pp_test_signal_line_prefix pp_name pp_ws_op "$";
+ pp_test_loop_line = pp_test_loop_line_prefix pp_name pp_ws_op "$";
+ pp_test_loop_exit_line = pp_test_loop_exit_line_prefix pp_name pp_ws_op "$";
+ pp_test_loop_signal_line = pp_test_loop_signal_line_prefix pp_name pp_ws_op "$";
pp_main_pre_line = "^" pp_prefix pp_main_pre_tag pp_ws_op "$";
pp_main_post_line = "^" pp_prefix pp_main_post_tag pp_ws_op "$";
# Global vars
- num_tests = 0;
+ in_test = needs_line_decl = 0;
cur_suite = cur_tcase = "Core";
cur_test = "";
- in_test = 0;
- needs_line_decl = 0;
- exit_okay = 1;
-
- num_cur_tcases = 0;
- num_cur_tests = 0;
- start = 1;
+ exit_okay = start = 1;
+ num_cur_tcases = num_cur_tests = 0;
+ test_type = num_tests = 0;
+ arg1 = 0;
+ arg2 = 1;
+ arg3 = 2;
+ test_name = 0;
+ test_type_flag = 1;
}
# Run on the first line of the input file.
cur_suite = name;
num_cur_tcases = 0;
}
- else if ((name, 0) in tcase_test_map) {
+ else if ((name, 0, 0) in tcase_test_map) {
error_with_line("Test Case \"" name "\" already exists.");
}
cur_tcase = name;
}
$0 ~ pp_test_line {
- if (in_main())
- in_main_error();
- if (in_test) {
- finish_test();
- print "";
- }
- ++num_tests;
+ # Pre checks
+ test_pre();
# Get the test name
match($0, pp_test_line_prefix)
# Remove trailing ws.
sub(pp_ws_op "$", "", cur_test);
- # Confirm that the test name is a valid C identifier.
- if (!match(cur_test, "^" pp_test_name "$")) {
- error_with_line("Malformed test name \"" cur_test \
- "\" (must be a C identifier).");
- }
+ # Check for duplicate tests / cases and valid names
+ duplicate_check();
- # Verify that it has not already been used.
- if (cur_test in test_registry) {
- error_with_line("Test \"" cur_test "\" already exists.");
- }
+ # Boilerplate printing code
+ test_post();
- # Verify that any implied test case is not a repeat.
- if (num_cur_tests == 0 && (cur_tcase, 0) in tcase_test_map) {
- error_with_line("Test Case \"" name "\" already exists.");
- }
+ # Set type before calling register
+ test_type = 0;
+ register_test();
- # Print preamble
- print "START_TEST(" cur_test ")";
- print "{";
- if (!clean_mode)
- print "#line " FNR+1;
- needs_line_decl = 0;
+ print_line = 0;
+ in_test = 1;
+}
+
+$0 ~ pp_test_loop_line {
+
+ test_pre();
+
+ match($0, pp_test_loop_line_prefix)
+ cur_test = substr($0, RLENGTH+1);
+ sub(pp_ws_op "$", "", cur_test);
+
+ duplicate_check();
+
+ # Split the line into an array to extract the arguments
+ split($0, arr, /[[:blank:]]*[(),][[:blank:]]*/);
+
+ # Eliminate possible whitespace between sign and numbers
+ gsub(/[[:space:]]*/, "", arr[2]);
+ gsub(/[[:space:]]*/, "", arr[3]);
+
+ test_post();
+
+ test_type = 1;
+ register_test();
+
+ print_line = 0;
+ in_test = 1;
+}
+
+$0 ~ pp_test_exit_line {
+
+ test_pre();
+
+ match($0, pp_test_exit_line_prefix)
+ cur_test = substr($0, RLENGTH+1);
+ sub(pp_ws_op "$", "", cur_test);
+
+ duplicate_check();
+
+ split($0, arr, /[[:blank:]]*[(),][[:blank:]]*/);
+ gsub(/[[:space:]]*/, "", arr[2]);
+
+ test_post();
+
+ test_type = 2;
+ register_test();
+
+ print_line = 0;
+ in_test = 1;
+}
+
+$0 ~ pp_test_signal_line {
+
+ test_pre();
+
+ match($0, pp_test_signal_line_prefix)
+ cur_test = substr($0, RLENGTH+1);
+ sub(pp_ws_op "$", "", cur_test);
+
+ duplicate_check();
+
+ split($0, arr, /[[:blank:]]*[(),][[:blank:]]*/);
+ gsub(/[[:space:]]*/, "", arr[2]);
+ test_post();
+
+ test_type = 3;
+ register_test();
+
+ print_line = 0;
+ in_test = 1;
+}
+
+$0 ~ pp_test_loop_exit_line {
+
+ test_pre();
+
+ match($0, pp_test_loop_exit_line_prefix)
+ cur_test = substr($0, RLENGTH+1);
+ sub(pp_ws_op "$", "", cur_test);
+
+ duplicate_check();
+
+ split($0, arr, /[[:blank:]]*[(),][[:blank:]]*/);
+ gsub(/[[:space:]]*/, "", arr[2]);
+ gsub(/[[:space:]]*/, "", arr[3]);
+ gsub(/[[:space:]]*/, "", arr[4]);
+
+ test_post();
+
+ test_type = 4;
+ register_test();
+
+ print_line = 0;
+ in_test = 1;
+}
+
+$0 ~ pp_test_loop_signal_line {
+
+ test_pre();
+
+ match($0, pp_test_loop_signal_line_prefix)
+ cur_test = substr($0, RLENGTH+1);
+ sub(pp_ws_op "$", "", cur_test);
+
+ duplicate_check();
+
+ split($0, arr, /[[:blank:]]*[(),][[:blank:]]*/);
+ gsub(/[[:space:]]*/, "", arr[2]);
+ gsub(/[[:space:]]*/, "", arr[3]);
+ gsub(/[[:space:]]*/, "", arr[4]);
+
+ test_post();
+
+ test_type = 5;
register_test();
print_line = 0;
print "";
print " return nf == 0 ? 0 : 1;";
}
-
print "}";
}
else {
### Functions ###
+function test_pre()
+{
+ if (in_main())
+ in_main_error();
+
+ if (in_test) {
+ finish_test();
+ print "";
+ }
+ ++num_tests;
+}
+
+function duplicate_check()
+{
+ # Confirm that the test name is a valid C identifier.
+ if (!match(cur_test, "^" pp_test_name "$")) {
+ error_with_line("Malformed test name \"" cur_test \
+ "\" (must be a C identifier).");
+ }
+
+ # Verify that it has not already been used.
+ if (cur_test in test_registry) {
+ error_with_line("Test \"" cur_test "\" already exists.");
+ }
+
+ # Verify that any implied test case is not a repeat.
+ if (num_cur_tests == 0 && (cur_tcase, 0, 0) in tcase_test_map) {
+ error_with_line("Test Case \"" name "\" already exists.");
+ }
+}
+
+function test_post()
+{
+ print "START_TEST(" cur_test ")";
+ print "{";
+ if (!clean_mode)
+ print "#line " FNR+1;
+
+ needs_line_decl = 0;
+}
+
function main_post()
{
if (main_post_done)
tcvar = tcase_var_name(i, j);
print " suite_add_tcase(" svar ", " tcvar ");";
for (k=0; k != tcase_num_tests[tc]; ++k) {
- t = tcase_test_map[tc, k];
- print " tcase_add_test(" tcvar ", " t ");";
+ t = tcase_test_map[tc, k, test_name];
+ test_type = tcase_test_map[tc, k, test_type_flag];
+ if (test_type == 0) {
+ print " tcase_add_test(" tcvar ", " t ");";
+ }
+ else if (test_type == 1) {
+ print " tcase_add_loop_test(" tcvar ", " t ", " \
+ test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+ ");";
+ }
+ else if (test_type == 2) {
+ print " tcase_add_exit_test(" tcvar ", " t ", " \
+ test_parameters[t, arg1] ");";
+ }
+ else if (test_type == 3) {
+ print " tcase_add_test_raise_signal(" tcvar ", " t ", " \
+ test_parameters[t, arg1] ");";
+ }
+ else if (test_type == 4) {
+ print " tcase_add_loop_exit_test(" tcvar ", " t ", " \
+ test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+ ", " test_parameters[t, arg3] ");";
+ }
+ else if (test_type == 5) {
+ print " tcase_add_loop_test_raise_signal(" tcvar ", " t \
+ ", " test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+ ", " test_parameters[t, arg3] ");";
+ }
}
}
}
suite_tcase_map[cur_suite, num_cur_tcases++] = cur_tcase;
suite_num_tcases[cur_suite] = num_cur_tcases;
}
- tcase_test_map[cur_tcase, num_cur_tests++] = cur_test;
+ tcase_test_map[cur_tcase, num_cur_tests, test_name] = cur_test;
+ tcase_test_map[cur_tcase, num_cur_tests++, test_type_flag] = test_type;
tcase_num_tests[cur_tcase] = num_cur_tests;
test_registry[cur_test] = 1;
+
+ # Store arguments to array
+ test_parameters[cur_test, arg1] = arr[2];
+ test_parameters[cur_test, arg2] = arr[3];
+ test_parameters[cur_test, arg3] = arr[4];
}
function finish_test()
--- /dev/null
+#test-exit(0) test1
+ ck_assert(0 == 0);
+ #test-exit (1) test2
+ ck_assert(1 == 0);
+ #test-exit ( 0) test3
+ ck_assert(1 == 0);
+ #test-exit ( +0 ) test4
+ ck_assert(1 == 0);
+ #test-exit ( -1 ) test5
+ ck_assert(1 == 0);
+ #test-exit ( - 1 ) test6
+ ck_assert(1 == 0);
+ #test-exit (- 0 ) test7
+ ck_assert(1 == 0);
+ #test-exit ( + 1 ) test8
+ ck_assert(1 == 0);
+
+#test-signal(0) test9
+ ck_assert(0 == 0);
+ #test-signal (1) test10
+ ck_assert(1 == 0);
+ #test-signal ( 0) test11
+ ck_assert(1 == 0);
+ #test-signal ( +0 ) test12
+ ck_assert(1 == 2);
+ #test-signal ( -1 ) test13
+ ck_assert(1 == 0);
+ #test-signal ( - 1 ) test14
+ ck_assert(1 == 0);
+ #test-signal (- 0 ) test15
+ ck_assert(1 == 0);
+ #test-signal ( + 1 ) test16
+ ck_assert(1 == 0);
+
+#test-loop(0,2) test17
+ ck_assert(0 == 0);
+ #test-loop (1 ,0) test18
+ ck_assert(1 == 0);
+ #test-loop ( 0 , 1) test19
+ ck_assert(1 == 1);
+ #test-loop ( +0 , -2) test20
+ ck_assert(1 == 0);
+ #test-loop ( -1 ,+ 3) test21
+ ck_assert(1 == 0);
+ #test-loop ( - 1, + 2 ) test22
+ ck_assert(1 == 0);
+ #test-loop (- 0 , - 2) test23
+ ck_assert(1 == 0);
+ #test-loop ( + 1 , - 3 ) test24
+ ck_assert(1 == 1);
+
+#test-loop-exit(1,0,2) test25
+ ck_assert(0 == 1);
+ #test-loop-exit ( 2,1 ,0) test26
+ ck_assert(1 == 0);
+ #test-loop-exit ( 2 ,0 , 1) test27
+ ck_assert(1 == 0);
+ #test-loop-exit ( -1 , +0 , -2) test28
+ ck_assert(1 == 0);
+ #test-loop-exit ( - 3 , -1 ,+ 3) test29
+ ck_assert(1 == 1);
+ #test-loop-exit ( + 0, - 1, + 2 ) test30
+ ck_assert(1 == 0);
+ #test-loop-exit (- 4 ,- 0 , - 2) test31
+ ck_assert(1 == 0);
+ #test-loop-exit ( +2 , + 1 , - 3 ) test32
+ ck_assert(1 == 0);
+
+#test-loop-signal(1,0,2) test33
+ ck_assert(0 == 0);
+ #test-loop-signal ( 2,1 ,0) test34
+ ck_assert(1 == 0);
+ #test-loop-signal ( 2 ,0 , 1) test35
+ ck_assert(1 == 1);
+ #test-loop-signal ( -1 , +0 , -2) test36
+ ck_assert(1 == 0);
+ #test-loop-signal ( - 3 , -1 ,+ 3) test37
+ ck_assert(1 == 0);
+ #test-loop-signal ( + 0, - 1, + 2 ) test38
+ ck_assert(1 == 0);
+ #test-loop-signal (- 4 ,- 0 , - 2) test39
+ ck_assert(1 == 0);
+ #test-loop-signal ( +2 , + 1 , - 3 ) test40
+ ck_assert(1 == 1);
\ No newline at end of file
--- /dev/null
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+START_TEST(test1)
+{
+#line 2
+ ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test2)
+{
+#line 4
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test3)
+{
+#line 6
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test4)
+{
+#line 8
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test5)
+{
+#line 10
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test6)
+{
+#line 12
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test7)
+{
+#line 14
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test8)
+{
+#line 16
+ ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test9)
+{
+#line 19
+ ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test10)
+{
+#line 21
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test11)
+{
+#line 23
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test12)
+{
+#line 25
+ ck_assert(1 == 2);
+}
+END_TEST
+
+START_TEST(test13)
+{
+#line 27
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test14)
+{
+#line 29
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test15)
+{
+#line 31
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test16)
+{
+#line 33
+ ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test17)
+{
+#line 36
+ ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test18)
+{
+#line 38
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test19)
+{
+#line 40
+ ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test20)
+{
+#line 42
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test21)
+{
+#line 44
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test22)
+{
+#line 46
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test23)
+{
+#line 48
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test24)
+{
+#line 50
+ ck_assert(1 == 1);
+
+}
+END_TEST
+
+START_TEST(test25)
+{
+#line 53
+ ck_assert(0 == 1);
+}
+END_TEST
+
+START_TEST(test26)
+{
+#line 55
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test27)
+{
+#line 57
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test28)
+{
+#line 59
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test29)
+{
+#line 61
+ ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test30)
+{
+#line 63
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test31)
+{
+#line 65
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test32)
+{
+#line 67
+ ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test33)
+{
+#line 70
+ ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test34)
+{
+#line 72
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test35)
+{
+#line 74
+ ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test36)
+{
+#line 76
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test37)
+{
+#line 78
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test38)
+{
+#line 80
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test39)
+{
+#line 82
+ ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test40)
+{
+#line 84
+ ck_assert(1 == 1);
+}
+END_TEST
+
+int main(void)
+{
+ Suite *s1 = suite_create("Core");
+ TCase *tc1_1 = tcase_create("Core");
+ SRunner *sr = srunner_create(s1);
+ int nf;
+
+ suite_add_tcase(s1, tc1_1);
+ tcase_add_exit_test(tc1_1, test1, 0);
+ tcase_add_exit_test(tc1_1, test2, 1);
+ tcase_add_exit_test(tc1_1, test3, 0);
+ tcase_add_exit_test(tc1_1, test4, +0);
+ tcase_add_exit_test(tc1_1, test5, -1);
+ tcase_add_exit_test(tc1_1, test6, -1);
+ tcase_add_exit_test(tc1_1, test7, -0);
+ tcase_add_exit_test(tc1_1, test8, +1);
+ tcase_add_test_raise_signal(tc1_1, test9, 0);
+ tcase_add_test_raise_signal(tc1_1, test10, 1);
+ tcase_add_test_raise_signal(tc1_1, test11, 0);
+ tcase_add_test_raise_signal(tc1_1, test12, +0);
+ tcase_add_test_raise_signal(tc1_1, test13, -1);
+ tcase_add_test_raise_signal(tc1_1, test14, -1);
+ tcase_add_test_raise_signal(tc1_1, test15, -0);
+ tcase_add_test_raise_signal(tc1_1, test16, +1);
+ tcase_add_loop_test(tc1_1, test17, 0, 2);
+ tcase_add_loop_test(tc1_1, test18, 1, 0);
+ tcase_add_loop_test(tc1_1, test19, 0, 1);
+ tcase_add_loop_test(tc1_1, test20, +0, -2);
+ tcase_add_loop_test(tc1_1, test21, -1, +3);
+ tcase_add_loop_test(tc1_1, test22, -1, +2);
+ tcase_add_loop_test(tc1_1, test23, -0, -2);
+ tcase_add_loop_test(tc1_1, test24, +1, -3);
+ tcase_add_loop_exit_test(tc1_1, test25, 1, 0, 2);
+ tcase_add_loop_exit_test(tc1_1, test26, 2, 1, 0);
+ tcase_add_loop_exit_test(tc1_1, test27, 2, 0, 1);
+ tcase_add_loop_exit_test(tc1_1, test28, -1, +0, -2);
+ tcase_add_loop_exit_test(tc1_1, test29, -3, -1, +3);
+ tcase_add_loop_exit_test(tc1_1, test30, +0, -1, +2);
+ tcase_add_loop_exit_test(tc1_1, test31, -4, -0, -2);
+ tcase_add_loop_exit_test(tc1_1, test32, +2, +1, -3);
+ tcase_add_loop_test_raise_signal(tc1_1, test33, 1, 0, 2);
+ tcase_add_loop_test_raise_signal(tc1_1, test34, 2, 1, 0);
+ tcase_add_loop_test_raise_signal(tc1_1, test35, 2, 0, 1);
+ tcase_add_loop_test_raise_signal(tc1_1, test36, -1, +0, -2);
+ tcase_add_loop_test_raise_signal(tc1_1, test37, -3, -1, +3);
+ tcase_add_loop_test_raise_signal(tc1_1, test38, +0, -1, +2);
+ tcase_add_loop_test_raise_signal(tc1_1, test39, -4, -0, -2);
+ tcase_add_loop_test_raise_signal(tc1_1, test40, +2, +1, -3);
+
+ srunner_run_all(sr, CK_ENV);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+
+ return nf == 0 ? 0 : 1;
+}