Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for formatDesc (0.1 sec)

  1. src/runtime/metrics/description_test.go

    	doc := &comment.Doc{Content: []comment.Block{&comment.Paragraph{Text: []comment.Text{comment.Plain(text)}}}}
    	pr := &comment.Printer{TextPrefix: prefix, TextWidth: width}
    	return string(pr.Text(doc))
    }
    
    func formatDesc(t *testing.T) string {
    	var b strings.Builder
    	for i, d := range metrics.All() {
    		if i > 0 {
    			fmt.Fprintf(&b, "\n")
    		}
    		fmt.Fprintf(&b, "%s\n", d.Name)
    		fmt.Fprintf(&b, "%s", wrap("\t", d.Description, 80-2*8))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:54:22 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  2. src/io/fs/format_test.go

    }
    
    func (fs *formatTest) ModTime() time.Time {
    	return fs.modTime
    }
    
    func (fs *formatTest) IsDir() bool {
    	return fs.isDir
    }
    
    func (fs *formatTest) Sys() any {
    	return nil
    }
    
    func (fs *formatTest) Type() FileMode {
    	return fs.mode.Type()
    }
    
    func (fs *formatTest) Info() (FileInfo, error) {
    	return fs, nil
    }
    
    var formatTests = []struct {
    	input        formatTest
    	wantFileInfo string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 02 17:59:28 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  3. src/mime/mediatype_test.go

    			t.Errorf("ParseMediaType(%q): in case of invalid parameters: expected type %q, got %q", tt.in, tt.mt, mt)
    		}
    	}
    }
    
    type formatTest struct {
    	typ    string
    	params map[string]string
    	want   string
    }
    
    var formatTests = []formatTest{
    	{"noslash", map[string]string{"X": "Y"}, "noslash; x=Y"}, // e.g. Content-Disposition values (RFC 2183); issue 11289
    	{"foo bar/baz", nil, ""},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 26 17:58:37 UTC 2022
    - 18.1K bytes
    - Viewed (0)
  4. src/time/format_test.go

    		if string(got) != tt.want {
    			t.Errorf("appendInt(%d, %d) = %s, want %s", tt.in, tt.width, got, tt.want)
    		}
    	}
    }
    
    type FormatTest struct {
    	name   string
    	format string
    	result string
    }
    
    var formatTests = []FormatTest{
    	{"ANSIC", ANSIC, "Wed Feb  4 21:00:57 2009"},
    	{"UnixDate", UnixDate, "Wed Feb  4 21:00:57 PST 2009"},
    	{"RubyDate", RubyDate, "Wed Feb 04 21:00:57 -0800 2009"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:58:29 UTC 2024
    - 36.4K bytes
    - Viewed (0)
Back to top