basic tests

This commit is contained in:
bronku 2025-12-01 11:39:43 +01:00
parent 2a04b62f45
commit 4ae6c97904
25 changed files with 158 additions and 25 deletions

View file

@ -1 +1 @@
42
42

View file

@ -1 +1 @@
x
x

View file

@ -1 +1 @@
x = 5
x = 5

View file

@ -1 +1 @@
2 + 3
2 + 3

View file

@ -1 +1 @@
x = 2 + 3
x = 2 + 3

View file

@ -1,2 +1,2 @@
x = 5
y = 10
y = 10

View file

@ -1 +1 @@
foo()
foo()

View file

@ -1 +1 @@
print(x, y)
print(x, y)

View file

@ -1,3 +1,3 @@
if x
y = 5
end
end

View file

@ -2,4 +2,4 @@ if x
y = 5
else
y = 10
end
end

View file

@ -1,3 +1,3 @@
for i in items
print(i)
end
end

View file

@ -1,3 +1,3 @@
while x
x = x - 1
end
end

View file

@ -1,3 +1,3 @@
def add(a, b)
return a + b
end
end

View file

@ -2,4 +2,4 @@ if x
if y
z = 1
end
end
end

View file

@ -1 +1 @@
[1, 2, 3]
[1, 2, 3]

View file

@ -0,0 +1 @@
obj.method()

View file

@ -1 +1 @@
lst[0]
lst[0]

View file

@ -1 +1 @@
"hello"
"hello"

View file

@ -1 +1 @@
x and y
x and y

View file

@ -1 +1 @@
not x
not x

View file

@ -3,4 +3,4 @@ class Point
@x = x
@y = y
end
end
end

View file

@ -2,4 +2,4 @@ class Counter
def increment
@count = @count + 1
end
end
end