github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/test/execution/init.go (about) 1 // RUN: llgo -o %t %s %p/Inputs/init2.go 2 // RUN: %t 2>&1 | FileCheck %s 3 4 package main 5 6 // CHECK-DAG: do some other stuff before main 7 //func init() 8 9 // CHECK-DAG: do some stuff before main 10 func init() { 11 println("do some stuff before main") 12 } 13 14 // CHECK: main has been called 15 func main() { 16 println("main has been called") 17 }