Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 29 of 29 for testclock (0.16 sec)

  1. src/text/template/parse/parse_test.go

    				t.Fatalf("expected error %q, got nil", test.result)
    			}
    			if !strings.Contains(err.Error(), test.result) {
    				t.Fatalf("error %q does not contain %q", err, test.result)
    			}
    		})
    	}
    }
    
    func TestBlock(t *testing.T) {
    	const (
    		input = `a{{block "inner" .}}bar{{.}}baz{{end}}b`
    		outer = `a{{template "inner" .}}b`
    		inner = `bar{{.}}baz`
    	)
    	treeSet := make(map[string]*Tree)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 24K bytes
    - Viewed (0)
  2. src/slices/slices_test.go

    		t.Errorf("DeleteFunc: want nil discarded elements, got %v, %v", mem[3], mem[4])
    	}
    	if mem[5] == nil {
    		t.Errorf("DeleteFunc: want unchanged elements beyond original len, got nil")
    	}
    }
    
    func TestClone(t *testing.T) {
    	s1 := []int{1, 2, 3}
    	s2 := Clone(s1)
    	if !Equal(s1, s2) {
    		t.Errorf("Clone(%v) = %v, want %v", s1, s2, s1)
    	}
    	s1[0] = 4
    	want := []int{1, 2, 3}
    	if !Equal(s2, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  3. src/crypto/tls/handshake_server_test.go

    	s.Close()
    	var opErr *net.OpError
    	if !errors.As(err, &opErr) || opErr.Err != error(alertUnknownCA) {
    		t.Errorf("Got error: %s; expected: %s", err, error(alertUnknownCA))
    	}
    }
    
    func TestClose(t *testing.T) {
    	c, s := localPipe(t)
    	go c.Close()
    
    	err := Server(s, testConfig).Handshake()
    	s.Close()
    	if err != io.EOF {
    		t.Errorf("Got error: %s; expected: %s", err, io.EOF)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  4. src/html/template/exec_test.go

    			name: funcNameTestFunc,
    		},
    	)
    	// If we get here, the name did not cause a panic, which is how Funcs
    	// reports an error.
    	t.Errorf("%q succeeded incorrectly as function name", name)
    }
    
    func TestBlock(t *testing.T) {
    	const (
    		input   = `a({{block "inner" .}}bar({{.}})baz{{end}})b`
    		want    = `a(bar(hello)baz)b`
    		overlay = `{{define "inner"}}foo({{.}})bar{{end}}`
    		want2   = `a(foo(goodbye)bar)b`
    	)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  5. tests/query_test.go

    type Int64 int64
    
    func (v Int64) Value() (driver.Value, error) {
    	return v - 1, nil
    }
    
    func (f *Int64) Scan(v interface{}) error {
    	y := v.(int64)
    	*f = Int64(y + 1)
    	return nil
    }
    
    func TestPluck(t *testing.T) {
    	users := []*User{
    		GetUser("pluck-user1", Config{}),
    		GetUser("pluck-user2", Config{}),
    		GetUser("pluck-user3", Config{}),
    	}
    
    	DB.Create(&users)
    
    	var names []string
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  6. src/encoding/xml/marshal_test.go

    		EndElement{Name{"", "foo"}},
    	},
    	want: `<foo></foo>`,
    }, {
    	desc: "directive",
    	toks: []Token{
    		Directive("foo"),
    	},
    	want: `<!foo>`,
    }}
    
    func TestClose(t *testing.T) {
    	for _, tt := range closeTests {
    		tt := tt
    		t.Run(tt.desc, func(t *testing.T) {
    			var out strings.Builder
    			enc := NewEncoder(&out)
    			for j, tok := range tt.toks {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  7. src/text/template/exec_test.go

    			name: funcNameTestFunc,
    		},
    	)
    	// If we get here, the name did not cause a panic, which is how Funcs
    	// reports an error.
    	t.Errorf("%q succeeded incorrectly as function name", name)
    }
    
    func TestBlock(t *testing.T) {
    	const (
    		input   = `a({{block "inner" .}}bar({{.}})baz{{end}})b`
    		want    = `a(bar(hello)baz)b`
    		overlay = `{{define "inner"}}foo({{.}})bar{{end}}`
    		want2   = `a(foo(goodbye)bar)b`
    	)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 60.1K bytes
    - Viewed (0)
  8. src/bytes/bytes_test.go

    			buf := make([]byte, 1<<16)
    			for i := 0; i < len(buf); i += skip {
    				buf[i] = 1
    			}
    			for i := 0; i < b.N; i++ {
    				Index(buf, key)
    			}
    		})
    	}
    }
    
    func TestClone(t *testing.T) {
    	var cloneTests = [][]byte{
    		[]byte(nil),
    		[]byte{},
    		Clone([]byte{}),
    		[]byte(strings.Repeat("a", 42))[:0],
    		[]byte(strings.Repeat("a", 42))[:0:0],
    		[]byte("short"),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/runtime/framework_test.go

    			}
    			got := f.ListPlugins()
    			if diff := cmp.Diff(tt.want, got); diff != "" {
    				t.Errorf("unexpected plugins (-want,+got):\n%s", diff)
    			}
    		})
    	}
    }
    
    func TestClose(t *testing.T) {
    	tests := []struct {
    		name    string
    		plugins *config.Plugins
    		wantErr error
    	}{
    		{
    			name: "close doesn't return error",
    			plugins: &config.Plugins{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 103K bytes
    - Viewed (0)
Back to top