aboutsummaryrefslogtreecommitdiff
path: root/res/test_if_ok.tpc
diff options
context:
space:
mode:
authorpacien2018-06-06 14:14:55 +0200
committerpacien2018-06-06 14:14:55 +0200
commit01406ad25ff49d5c5f722f34187d2063cefea5ed (patch)
tree4d96a701aa1986abe79f2469ffd641c4123749bb /res/test_if_ok.tpc
parent64d73526bf9d39ad9d3f04509f6656abde2240fd (diff)
downloadtpc-compiler-01406ad25ff49d5c5f722f34187d2063cefea5ed.tar.gz
require main func and rename tests
Diffstat (limited to 'res/test_if_ok.tpc')
-rw-r--r--res/test_if_ok.tpc22
1 files changed, 22 insertions, 0 deletions
diff --git a/res/test_if_ok.tpc b/res/test_if_ok.tpc
new file mode 100644
index 0000000..054811b
--- /dev/null
+++ b/res/test_if_ok.tpc
@@ -0,0 +1,22 @@
1/* test-table-symboles.tpc */
2
3/* Test file for simplified translator of a declaration of variables in C */
4
5entier main(void) {
6 entier bool1, bool2;
7 bool1 = 0;
8 bool2 = 0;
9 if(bool1 == bool2){
10 if(bool1 != bool2){
11 print('n');
12 }
13 else{
14 if(bool1 <= bool2){
15 print('o');
16 return 0;
17 }
18 print('n');
19 }
20 }
21 return 0;
22}