示例#1
0
文件: cf_test.go 项目: rendon/cf
func (t *TestSuite) TestGen() {
	testcli.Run("bin/cf", "gen", "arena/A/A.cpp")
	if !testcli.Success() {
		fmt.Printf(testcli.Stderr())
	}
	t.Assert(testcli.Success())
	body, err := ioutil.ReadFile("arena/A/A.cpp")
	t.AssertNil(err)
	t.Assert(len(body) > 0)

	body, err = ioutil.ReadFile("arena/A/.settings.yml")
	t.AssertNil(err)
	t.Assert(len(body) > 0)
}
示例#2
0
文件: cf_test.go 项目: rendon/cf
func (t *TestSuite) BeforeAll() {
	testcli.Run("make")
	t.Assert(testcli.Success())

	t.AssertNil(os.RemoveAll("arena/"))
	t.AssertNil(os.Mkdir("arena/", 0775))
}