PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/rlglue/tests/test_sanity_experiment.go

https://code.google.com/p/go-glue/
Go | 34 lines | 32 code | 2 blank | 0 comment | 11 complexity | db908f5a25a8ae496f244cf402bd50ce MD5 | raw file
 1package main
 2
 3import (
 4	"os"
 5	"fmt"
 6	"go-glue.googlecode.com/hg/rlglue"
 7)
 8
 9func main() {
10	var err os.Error
11	defer func() {
12		if err != nil {
13			panic(err)
14		}
15	}()
16	gt := &GlueTester{"test_sanity", 0, 0}
17	ex := new(rlglue.Experiment)
18	if err = ex.AutoConnect(); err != nil {
19		return
20	}
21	var taskString string
22	if taskString, err = ex.Init(); err != nil {
23		return
24	}
25	gt.check(taskString != "sample task spec")
26	if err = ex.Cleanup(); err != nil {
27		return
28	}
29	if err = ex.Close(); err != nil {
30		return
31	}
32	fmt.Printf("%v\n", gt)
33	os.Exit(gt.failCount)
34}