MCPcopy Index your code
hub / github.com/codegangsta/gin / Test_Builder_Build_Success

Function Test_Builder_Build_Success

lib/builder_test.go:12–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func Test_Builder_Build_Success(t *testing.T) {
13 dir := filepath.Join("test_fixtures", "build_success")
14 bin := "build_success"
15 if runtime.GOOS == "windows" {
16 bin += ".exe"
17 }
18
19 wd, err := os.Getwd()
20 if err != nil {
21 t.Fatalf("Could not get working directory: %v", err)
22 }
23
24 builder := gin.NewBuilder(dir, bin, false, wd, []string{})
25 err = builder.Build()
26 expect(t, err, nil)
27
28 file, err := os.Open(filepath.Join(wd, bin))
29 if err != nil {
30 t.Fatalf("File has not been written: %v", err)
31 }
32
33 refute(t, file, nil)
34}

Callers

nothing calls this directly

Calls 3

BuildMethod · 0.95
expectFunction · 0.85
refuteFunction · 0.85

Tested by

no test coverage detected