Skip to content

Latest commit

 

History

History
107 lines (90 loc) · 2.03 KB

test-ob-go.org

File metadata and controls

107 lines (90 loc) · 2.03 KB

Simple tests

fmt.Printf("%d", 42)
fmt.Print(q)
fmt.Print(q+p)
fmt.Print(q+p)
fmt.Print(q)
package main 

import "fmt"

func main() {
    fmt.Println("hello,ob-go")
}

Array

for i := 1; i < 3; i++ {
	fmt.Printf("%d\n", i)
}

Matrix

12
34
fmt.Printf("%s\n", a[0] + a[1] + string(len(a)))

Imports

fmt.Printf("%v", math.Pi)
package main 

import "fmt"

func main() {
    fmt.Printf("%v", math.Pi)
}

Package

func main() {
        fmt.Printf("works")
}

Regression tests

s := "'h' and 'i'"
fmt.Printf("%s\n", s)