Add comprehensive test system for Go-to-Zig compiler

- Implement end-to-end test runner for compilation and behavior tests
- Add test cases for basic print functionality
- Refactor translator to use proper AST generation
- Remove redundant programs directory in favor of tests
This commit is contained in:
2025-06-05 22:35:18 -05:00
parent d5f346cf8b
commit bea04d6810
10 changed files with 370 additions and 37 deletions

View File

@@ -0,0 +1 @@
Hello, world!

5
tests/basic/hello.go Normal file
View File

@@ -0,0 +1,5 @@
package main
func main() {
print("Hello, world!\n")
}

View File

@@ -0,0 +1 @@
First Second

View File

@@ -0,0 +1,8 @@
package main
func main() {
print("First")
print(" ")
print("Second")
print("\n")
}

View File

@@ -0,0 +1,5 @@
Hello World!
Line 1
Line 2
Quote: "test"
Backslash: \

View File

@@ -0,0 +1,8 @@
package main
func main() {
print("Hello\tWorld!\n")
print("Line 1\nLine 2\n")
print("Quote: \"test\"\n")
print("Backslash: \\\n")
}