Commit 5216852e authored by Sven Meier's avatar Sven Meier Committed by Adam Wujek

utc_leap_test: changed exit values to positive values for shell handling

parent ed7f98c4
......@@ -221,21 +221,21 @@ int main(int argc, char **argv)
printf("pre leap61 handling correct\n");
} else {
printf("pre leap61 handling failed\n");
return -1;
exit(1);
}
} else if (j == 1) {
if ((hours == 23) && (minutes == 59) && (seconds == 50) && (offset == 37) && (leap59 == 1) && (leap61 == 0)) {
printf("pre leap59 handling correct\n");
} else {
printf("pre leap59 handling failed\n");
return -2;
exit(2);
}
} else {
if ((hours == 23) && (minutes == 59) && (seconds == 50) && (offset == 37) && (leap59 == 0) && (leap61 == 0)) {
printf("pre no-leap handling correct\n");
} else {
printf("pre no-leap handling failed\n");
return -3;
exit(3);
}
}
......@@ -255,25 +255,25 @@ int main(int argc, char **argv)
printf("post leap61 handling correct\n\n");
} else {
printf("post leap61 handling failed\n\n");
return -1;
exit(1);
}
} else if (j == 1) {
if ((hours == 0) && (minutes == 0) && (seconds == 11) && (offset == 36) && (leap59 == 0) && (leap61 == 0)) {
printf("post leap59 handling correct\n\n");
} else {
printf("post leap59 handling failed\n\n");
return -2;
exit(2);
}
} else {
if ((hours == 0) && (minutes == 0) && (seconds == 10) && (offset == 37) && (leap59 == 0) && (leap61 == 0)) {
printf("post no-leap handling correct\n\n");
} else {
printf("post no-leap handling failed\n\n");
return -3;
exit(3);
}
}
}
printf("all leap handling tests passed\n\n");
return 0;
exit(0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment