-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_comprehensive.plan
More file actions
52 lines (40 loc) · 960 Bytes
/
Copy pathtest_comprehensive.plan
File metadata and controls
52 lines (40 loc) · 960 Bytes
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
48
49
50
51
52
# Plan Language v0.3.0 - Comprehensive Test Suite
# Testing all core features for stable commit
print "=== Plan Language Test Suite v0.3.0 ==="
# Test 1: Basic output
print "Test 1: Basic output"
writeln "Hello, Plan Language!"
# Test 2: Boolean literals
print "Test 2: Boolean literals"
writeln true
writeln false
# Test 3: Arithmetic operators
print "Test 3: Arithmetic"
writeln 5 + 3
writeln 10 - 4
writeln 3 * 7
writeln 15 / 3
# Test 4: Comparison operators
print "Test 4: Comparisons"
writeln 5 == 5
writeln 3 != 7
writeln 8 > 2
writeln 1 < 10
# Test 5: Function definitions and calls
print "Test 5: Functions"
def add#2
arg 1 + arg 2
writeln add 5 7
def greet#1
"Hello, " + arg 1
writeln greet "World"
# Test 6: When operator (basic)
print "Test 6: When operator"
writeln "yes" when true
writeln "no" when false
# Test 7: Times loop (simple)
print "Test 7: Times loop"
3 times {
writeln "Loop iteration"
}
print "=== All tests completed ==="