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:
1
tests/basic/hello.expected
Normal file
1
tests/basic/hello.expected
Normal file
@@ -0,0 +1 @@
|
||||
Hello, world!
|
5
tests/basic/hello.go
Normal file
5
tests/basic/hello.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
print("Hello, world!\n")
|
||||
}
|
1
tests/basic/multiple_prints.expected
Normal file
1
tests/basic/multiple_prints.expected
Normal file
@@ -0,0 +1 @@
|
||||
First Second
|
8
tests/basic/multiple_prints.go
Normal file
8
tests/basic/multiple_prints.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
print("First")
|
||||
print(" ")
|
||||
print("Second")
|
||||
print("\n")
|
||||
}
|
5
tests/basic/print_escape.expected
Normal file
5
tests/basic/print_escape.expected
Normal file
@@ -0,0 +1,5 @@
|
||||
Hello World!
|
||||
Line 1
|
||||
Line 2
|
||||
Quote: "test"
|
||||
Backslash: \
|
8
tests/basic/print_escape.go
Normal file
8
tests/basic/print_escape.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user