Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 3,295 for GOT (0.03 sec)

  1. src/cmd/compile/internal/test/testdata/divbyzero_test.go

    }
    
    func TestDivByZero(t *testing.T) {
    	if got := checkDivByZero(func() { div_b(7, 0) }); !got {
    		t.Errorf("expected div by zero for b(7, 0), got no error\n")
    	}
    	if got := checkDivByZero(func() { div_b(7, 7) }); got {
    		t.Errorf("expected no error for b(7, 7), got div by zero\n")
    	}
    	if got := checkDivByZero(func() { div_a(4, nil) }); !got {
    		t.Errorf("expected div by zero for a(4, nil), got no error\n")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 1K bytes
    - Viewed (0)
  2. tests/query_test.go

    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Age":
    						if _, ok := first[dbName].(uint); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Birthday":
    						if _, ok := first[dbName].(*time.Time); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/magic_test.go

    				if X.Cmp(Min) < 0 || X.Cmp(Max) > 0 {
    					continue
    				}
    				Want := new(big.Int).Quo(X, C)
    				Got := new(big.Int).Mul(X, M)
    				Got.Rsh(Got, n+uint(s))
    				if x < 0 {
    					Got.Add(Got, One)
    				}
    				if Want.Cmp(Got) != 0 {
    					t.Errorf("smagic for %d/%d n=%d doesn't work, got=%s, want %s\n", x, c, n, Got, Want)
    				}
    			}
    		}
    	}
    }
    
    func testDivisibleExhaustiveU(t *testing.T, n uint) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 22:02:07 UTC 2019
    - 9.1K bytes
    - Viewed (0)
  4. test/typeparam/absdiff2.go

    }
    
    func main() {
    	if got, want := OrderedAbsDifference(1.0, -2.0), 3.0; got != want {
    		panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	}
    	if got, want := OrderedAbsDifference(-1.0, 2.0), 3.0; got != want {
    		panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	}
    	if got, want := 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: Wed Mar 09 21:26:42 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  5. src/go/types/typeterm_test.go

    		args := split(test, 3)
    		x := testTerm(args[0])
    		y := testTerm(args[1])
    		want := args[2] == "T"
    		if got := x.equal(y); got != want {
    			t.Errorf("%v.equal(%v) = %v; want %v", x, y, got, want)
    		}
    		// equal is symmetric
    		x, y = y, x
    		if got := x.equal(y); got != want {
    			t.Errorf("%v.equal(%v) = %v; want %v", x, y, got, want)
    		}
    	}
    }
    
    func TestTermUnion(t *testing.T) {
    	for _, test := range []string{
    		"∅ ∅ ∅ ∅",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. tests/count_test.go

    		t.Errorf(fmt.Sprintf("Count should work, but got err %v", err))
    	}
    	if count1 != 1 {
    		t.Errorf("Count with group should be 1, but got count: %v", count1)
    	}
    
    	var count2 int64
    	if err := DB.Model(&Company{}).Where("name in ?", []string{"company_count_group_b", "company_count_group_c"}).Group("name").Count(&count2).Error; err != nil {
    		t.Errorf(fmt.Sprintf("Count should work, but got err %v", err))
    	}
    	if count2 != 2 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  7. test/typeparam/smallest.go

    }
    
    func main() {
    	vec1 := []float64{5.3, 1.2, 32.8}
    	vec2 := []string{"abc", "def", "aaa"}
    
    	want1 := 1.2
    	if got := Smallest(vec1); got != want1 {
    		panic(fmt.Sprintf("got %d, want %d", got, want1))
    	}
    	want2 := "aaa"
    	if got := Smallest(vec2); got != want2 {
    		panic(fmt.Sprintf("got %d, want %d", got, want2))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 825 bytes
    - Viewed (0)
  8. pkg/log/uds_test.go

    		Sync()
    		// There should only be one message in the buffer
    		if got, want := len(srv.messages), 1; got != want {
    			t.Fatalf("number received log messages got %v want %v", got, want)
    		}
    
    		type testMessage struct {
    			Msg  string    `json:"msg"`
    			Time time.Time `json:"time"`
    		}
    		var got testMessage
    		json.Unmarshal([]byte(srv.messages[0]), &got)
    		if got.Time.UnixNano() != yesterday.UnixNano() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 29 01:05:12 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  9. src/sync/oncefunc_test.go

    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			if want, got := 42, doOnceValue(); want != got {
    				b.Fatalf("want %d, got %d", want, got)
    			}
    		}
    	})
    	b.Run("v=Global", func(b *testing.B) {
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			if want, got := 42, onceValue(); want != got {
    				b.Fatalf("want %d, got %d", want, got)
    			}
    		}
    	})
    	b.Run("v=Local", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  10. src/runtime/pprof/runtime_test.go

    		t.Errorf("Expected parent goroutine's profile labels to be empty before test, got %v", gotLabels)
    	}
    	go func() {
    		if gotLabels := getProfLabel(); !reflect.DeepEqual(gotLabels, wantLabels) {
    			t.Errorf("Expected child goroutine's profile labels to be empty before test, got %v", gotLabels)
    		}
    		sync <- struct{}{}
    	}()
    	<-sync
    
    	wantLabels = map[string]string{"key": "value"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 20:29:37 UTC 2017
    - 3K bytes
    - Viewed (0)
Back to top