From 02c5b1adb00aaa497453deec6999dfdf415d702f Mon Sep 17 00:00:00 2001 From: Elliot Chance Date: Wed, 31 May 2017 00:02:09 +0200 Subject: [PATCH] do.c --- tests/do.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/do.c b/tests/do.c index d5750a180..417074359 100644 --- a/tests/do.c +++ b/tests/do.c @@ -1,19 +1,25 @@ #include +#include "tests.h" -int main() { +int main() +{ + plan(5); + int i = 0; + // There will be 4 checks in the first loop. do { - printf("do loop %d\n", i); + pass("%s", "first do statement"); i = i + 1; } while( i < 4 ); - // continue + // Only one check in the second loop. i = 0; do { i++; if(i < 3) continue; - printf("%d\n", i); + pass("%s", "second do statement"); } while(i < 3); + done_testing(); }