mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
a848d720db
This commit finally introduces unit tests for the compiler, to check whether input Go code is converted to the expected output IR. To make this necessary, a few refactors were needed. Hopefully these refactors (to compile a program package by package instead of all at once) will eventually become standard, so that packages can all be compiled separate from each other and be cached between compiles.
10 lines
119 B
Go
10 lines
119 B
Go
package main
|
|
|
|
func sliceLen(ints []int) int {
|
|
return len(ints)
|
|
}
|
|
|
|
func sliceCap(ints []int) int {
|
|
return cap(ints)
|
|
}
|