hdhsfdh
This commit is contained in:
parent
004aa87a56
commit
984ef7ba67
5
Makefile
5
Makefile
@ -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
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())
|
||||
}
|
9
tests/golang/hello_world_test.go
Normal file
9
tests/golang/hello_world_test.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHelloWorld(t *testing.T) {
|
||||
if helloworld() != "Hello World!!" {
|
||||
t.Fatal("Test fail")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user