Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 3,295 for GOT (0.03 sec)

  1. src/maps/iter_test.go

    			m[i] = i
    			want = append(want, i)
    		}
    
    		var got []int
    		for v := range Values(m) {
    			got = append(got, v)
    		}
    		slices.Sort(got)
    		if !slices.Equal(got, want) {
    			t.Errorf("Values(%v) = %v, want %v", m, got, want)
    		}
    	}
    }
    
    func TestInsert(t *testing.T) {
    	got := map[int]int{
    		1: 1,
    		2: 1,
    	}
    	Insert(got, func(yield func(int, int) bool) {
    		for i := 0; i < 10; i += 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:44:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. tests/preload_suits_test.go

    		t.Fatalf("Got error %v", err)
    	}
    
    	var got []Level1
    	if err := DB.Preload("Level2").Preload("Level2.Level3").Find(&got).Error; err != nil {
    		t.Error(err)
    	}
    
    	if len(got) != 2 {
    		t.Errorf("got %v items, expected 2", len(got))
    	}
    
    	if !reflect.DeepEqual(got[0], want) && !reflect.DeepEqual(got[1], want) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Mar 18 05:38:46 UTC 2022
    - 30.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/shift_test.go

    	if got := ofz64r32(5); got != 0 {
    		t.Errorf("0>>5 == %d, want 0", got)
    	}
    	if got := ofz64r16(5); got != 0 {
    		t.Errorf("0>>5 == %d, want 0", got)
    	}
    	if got := ofz64r8(5); got != 0 {
    		t.Errorf("0>>5 == %d, want 0", got)
    	}
    	if got := ofz64ur64(5); got != 0 {
    		t.Errorf("0>>>5 == %d, want 0", got)
    	}
    	if got := ofz64ur32(5); got != 0 {
    		t.Errorf("0>>>5 == %d, want 0", got)
    	}
    	if got := ofz64ur16(5); got != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 22:26:39 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  4. pkg/kubelet/kubelet_getters_test.go

    	root := kubelet.rootDirectory
    
    	var exp, got string
    
    	got = kubelet.getPodsDir()
    	exp = filepath.Join(root, "pods")
    	assert.Equal(t, exp, got)
    
    	got = kubelet.getPodLogsDir()
    	assert.Equal(t, kubelet.podLogsDirectory, got)
    
    	got = kubelet.getPluginsDir()
    	exp = filepath.Join(root, "plugins")
    	assert.Equal(t, exp, got)
    
    	got = kubelet.getPluginsRegistrationDir()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. pkg/env/var_test.go

    	if vars[0].Name != "TESTXYZ1" {
    		t.Errorf("Expecting TESTXYZ1, got %s", vars[0].Name)
    	}
    	if vars[0].Description != "A string" {
    		t.Errorf("Expected 'A string', got '%s'", vars[0].Description)
    	}
    
    	if vars[1].Name != "TESTXYZ2" {
    		t.Errorf("Expecting TESTXYZ2, got %s", vars[0].Name)
    	}
    	if vars[1].Description != "An int" {
    		t.Errorf("Expected 'An int', got '%s'", vars[0].Description)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  6. src/log/slog/record_test.go

    		}
    		r := NewRecord(time.Time{}, 0, "", pc)
    		got := r.source()
    		if i := strings.LastIndexByte(got.File, '/'); i >= 0 {
    			got.File = got.File[i+1:]
    		}
    		if got.Function != test.wantFunction || got.File != test.wantFile || (got.Line > 0) != test.wantLinePositive {
    			t.Errorf("depth %d: got (%q, %q, %d), want (%q, %q, %t)",
    				test.depth,
    				got.Function, got.File, got.Line,
    				test.wantFunction, test.wantFile, test.wantLinePositive)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 15:10:55 UTC 2023
    - 4K bytes
    - Viewed (0)
  7. tests/connpool_test.go

    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.QueryContext(ctx, query, args...)
    }
    
    func (c *wrapperTx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row {
    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.QueryRowContext(ctx, query, args...)
    }
    
    type wrapperConnPool struct {
    	db     *sql.DB
    	got    []string
    	expect []string
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Feb 06 02:54:40 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. src/math/big/sqrt_test.go

    	for i := 0; i < 1e5; i++ {
    		if i == 1e2 && testing.Short() {
    			break
    		}
    		r := rand.Float64()
    
    		got := new(Float).SetPrec(53)
    		got.Sqrt(NewFloat(r))
    		want := NewFloat(math.Sqrt(r))
    		if got.Cmp(want) != 0 {
    			t.Fatalf("Sqrt(%g) =\n got %g;\nwant %g", r, got, want)
    		}
    	}
    }
    
    func TestFloatSqrt(t *testing.T) {
    	for _, test := range []struct {
    		x    string
    		want string
    	}{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 4.8K bytes
    - Viewed (0)
  9. test/typeparam/absdiffimp.dir/main.go

    	// if got, want := a.OrderedAbsDifference(1.0, -2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := a.OrderedAbsDifference(-1.0, 2.0), 3.0; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	// if got, want := a.OrderedAbsDifference(-20, 15), 35; got != want {
    	// 	panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	// }
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 00:11:24 UTC 2021
    - 998 bytes
    - Viewed (0)
  10. operator/pkg/util/reflect_test.go

    		},
    	}
    
    	for _, tt := range tests {
    		var got []any
    		for _, v := range allTypes {
    			if tt.function(reflect.ValueOf(v).Kind()) {
    				got = append(got, v)
    			}
    		}
    		if !reflect.DeepEqual(got, tt.want) {
    			t.Errorf("%s: got %v, want %v", tt.desc, got, tt.want)
    		}
    	}
    }
    
    func TestToIntValue(t *testing.T) {
    	var got []int
    	for _, v := range allTypes {
    		if i, ok := ToIntValue(v); ok {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
Back to top