PouchContainer集成测试覆盖率统计

PouchContainer 集成测试覆盖率统计

 size
 )  {
   {
   a < :
     
   a == :
     
   a < :
     
  }
   
}

$ cat size_test.
 size

 (
    
    
)

 Test  {
    in  
    out 
}

 tests = []Test{
    {, },
    {, },
}

  {
    fmt.Println()
     i, test :=  tests {
        size := Size(test.in)
         size != test.out {
            t.Errorf(, i, test.in, size, test.out)
        }
    }
}


$ go  -x -cover -coverprofile=./size.out
WORK=/var/folders/d2/0gxc6wf16hb6t8ng0w00czpm0000gn/T/go-build982568783
mkdir -p //_test/
mkdir -p //_test/_obj_test/
 //_test/_obj_test/
/usr//go/pkg/tool/darwin_amd64/cover -mode  -var GoCover_0 -o .size.go /Users/letty/work/code/go/src//size.go
 /Users/letty/work/code/go/src/
/usr//go/pkg/tool/darwin_amd64/compile -o //_test/test.a -trimpath  -p  -complete -buildid 6033df309978241f19d83a0e6bad252ee3ba376e -D _/Users/letty/work/code/go/src/ -I  -pack //_test/_obj_test/size.go ./size_test.go
 //_test
/usr//go/pkg/tool/darwin_amd64/compile -o ./main.a -trimpath  -p main -complete -D  -I . -I  -pack ./_testmain.go
 .
/usr//go/pkg/tool/darwin_amd64/link -o //_test/test.test -L //_test -L  -w -extld=clang -buildmode=exe //_test/main.a
//_test/test.test -test.coverprofile=./size.out -test.outputdir /Users/letty/work/code/go/src/
a
PASS
coverage: 60.0% of statements
ok          0.006s

$ cat .size.
 size

 )  {
    GoCover_0.Count[] = 
     {
     a < :
        GoCover_0.Count[] = 
         
     a == :
        GoCover_0.Count[] = 
         
     a < :
        GoCover_0.Count[] = 
         
    }
    GoCover_0.Count[] = 
     
}

 GoCover_0 =  {
    Count     []
    Pos       [ * ]
    NumStmt   []
} {
    Pos: [ * ]{
        , , , 
        , , , 
        , , , 
        , , , 
        , , , 
    },
    NumStmt: []{
        , 

PouchContainer集成测试覆盖率统计