aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-08-28 17:28:55 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2019-08-28 17:28:55 -0400
commit06087b10ec7a897ad48db83f7f33a8fc11fa9341 (patch)
tree4e6c539bf89d08deec84ffec35797fc7306022b1 /t
parent192115300aa8349a4c85535466386cbf99259fdd (diff)
downloadlibctemplates-06087b10ec7a897ad48db83f7f33a8fc11fa9341.tar.gz
libctemplates-06087b10ec7a897ad48db83f7f33a8fc11fa9341.tar.bz2
libctemplates-06087b10ec7a897ad48db83f7f33a8fc11fa9341.zip
Added break statement to templates
Added a break statement that can break out of loops, also added some tests to test the functionality of the same.
Diffstat (limited to 't')
-rw-r--r--t/test_2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test_2.c b/t/test_2.c
index e11fcdc..f099460 100644
--- a/t/test_2.c
+++ b/t/test_2.c
@@ -21,7 +21,7 @@ char c_3_3[] = "Check variable scope after breaking loop one four five eight nin
char c_3_4[] = "Check variable scope after breaking loop one four five eight and a half nine.";//loop1 does not have test1, loop1 has loop2, after is "and a half "
#define log(x) printf(x)
-#define check(n,n2,a,b) if(strcmp(a,b) != 0){fprintf(stderr, "Error in test 2.%d.%d\n",n,n2);printf("Result should have been '%s'\n was '%s'\n", b, a); if(t->error) printf(TMPL_err(t, NULL)); return -1;}
+#define check(n,n2,a,b) if(strcmp(a,b) != 0){fprintf(stderr, "Error in test 2.%d.%d\n",n,n2);printf("Result should have been '%s'\n was '%s'\n", b, a); if(t->error) printf(TMPL_err(t, NULL)); return -1;}else{printf("\n\n##########\n##Test %d.%d passed\n##########\n\n\n",n,n2);}
int main(){
log("Running tests2\n");