-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtests.sc
47 lines (47 loc) · 998 Bytes
/
tests.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!./build/StarCore*
# Test File
cout("----------------------\n[TEST]Hello World!\n----------------------\n");
if(true);
cout("[TEST]True PASS\n----------------------\n");
end;
if(false);
else;
cout("[TEST]Else PASS\n----------------------\n");
end;
a="[TEST]";
if(a.equals("[TEST]"));
cout("[TEST]Var PASS\n----------------------\n");
else;
cout("[TEST]Var Failed\n----------------------\n");
end;
n=0;
count=10;
while(n<count);
cout("[TEST]While Loop:",n,"\r");
n=n+1;
end;
if(n==count);
cout("[TEST]While PASS \n----------------------\n");
else;
cout("[TEST]While Failed:",n,"\n----------------------\n");
end;
cout("[TEST]Operator test\n");
cout("1 + 1 = ",1+1,"\n");
cout("1 - 1 = ",1-1,"\n");
cout("5 * 5 = ",5*5,"\n");
cout("20 / 4 = ",20/4,"\n----------------------\n");
cout("[TEST]Nine-nine multiplication table test\n");
x=1;
y=1;
while(x<10);
while(y<10);
if(y<=x);
cout(" ",y," * ",x," = ",x*y," ");
end;
y+=1;
end;
x+=1;
y=1;
cout("\n");
end;
cout("\n----------------------");