This commit is contained in:
Kreyren 2020-02-07 17:38:34 +00:00
parent 004aa87a56
commit 984ef7ba67
3 changed files with 25 additions and 0 deletions

@ -73,6 +73,11 @@ build-vlang:
@ [ ! -d build/build-vlang ] && mkdir build/build-vlang
@ v -o build/build-vlang/zernit-vlang src/bin/main.v
build-golang:
@ [ ! -d build ] && mkdir build
@ [ ! -d build/build-golang ] && mkdir build/build-golang
@ go build -o build/build-golang/zernit-golang src/bin/main.go
## CHECK/TESTS ##
check:

11
src/bin/main.go Normal file

@ -0,0 +1,11 @@
package main
import "fmt"
func helloworld() string {
return "Hello World!!"
}
func main() {
fmt.Println(helloworld())
}

@ -0,0 +1,9 @@
package main
import "testing"
func TestHelloWorld(t *testing.T) {
if helloworld() != "Hello World!!" {
t.Fatal("Test fail")
}
}