Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for coverReport (0.1 sec)

  1. src/testing/cover.go

    func mustBeNil(err error) {
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "testing: %s\n", err)
    		os.Exit(2)
    	}
    }
    
    // coverReport reports the coverage percentage and writes a coverage profile if requested.
    func coverReport() {
    	if goexperiment.CoverageRedesign {
    		coverReport2()
    		return
    	}
    	var f *os.File
    	var err error
    	if *coverProfile != "" {
    		f, err = os.Create(toOutputDir(*coverProfile))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 11:37:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  2. src/testing/testing.go

    		if err = m.deps.WriteProfileTo("mutex", f, 0); err != nil {
    			fmt.Fprintf(os.Stderr, "testing: can't write %s: %s\n", *mutexProfile, err)
    			os.Exit(2)
    		}
    		f.Close()
    	}
    	if CoverMode() != "" {
    		coverReport()
    	}
    }
    
    // toOutputDir returns the file name relocated, if required, to outputDir.
    // Simple implementation to avoid pulling in path/filepath.
    func toOutputDir(path string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  3. src/testing/newcover.go

    	if mode == "" {
    		return
    	}
    	cover2.mode = mode
    	cover2.tearDown = tearDown
    	cover2.snapshotcov = snapcov
    }
    
    // coverReport2 invokes a callback in _testmain.go that will
    // emit coverage data at the point where test execution is complete,
    // for "go test -cover" runs.
    func coverReport2() {
    	if !goexperiment.CoverageRedesign {
    		panic("unexpected")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:58:07 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top