- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 2,831 for watt (0.31 sec)
-
src/os/exec_unix_test.go
// Solaris/Illumos have a lower limit, above which wait returns // EINVAL (see waitid in usr/src/uts/common/os/exit.c in // illumos). This is configurable via sysconf(_SC_MAXPID), but // we'll just take the default. pid = 30000-1 } p, err := FindProcess(pid) if err != nil { t.Fatalf("FindProcess(math.MaxInt32) got err %v, want nil", err) } if ps, err := p.Wait(); !errors.Is(err, syscall.ECHILD) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 18:08:44 UTC 2024 - 2K bytes - Viewed (0) -
src/internal/singleflight/singleflight_test.go
"testing" "time" ) func TestDo(t *testing.T) { var g Group v, err, _ := g.Do("key", func() (any, error) { return "bar", nil }) if got, want := fmt.Sprintf("%v (%T)", v, v), "bar (string)"; got != want { t.Errorf("Do = %v; want %v", got, want) } if err != nil { t.Errorf("Do error = %v", err) } } func TestDoErr(t *testing.T) { var g Group someErr := errors.New("some error")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 29 22:21:50 UTC 2023 - 3.9K bytes - Viewed (0) -
cni/pkg/log/uds_test.go
delete(parsedLog, "time") want := map[string]any{ "level": cases[i].level, "msg": cases[i].msg, } if k := cases[i].key; k != nil { want["key"] = *k } assert.Equal(t, want, parsedLog) i++ } } func TestParseCniLog(t *testing.T) { wantT := &time.Time{} assert.NoError(t, wantT.UnmarshalText([]byte("2020-01-01T00:00:00.356374Z")))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 16:26:28 UTC 2024 - 4.1K bytes - Viewed (0) -
pkg/scheduler/framework/interface_test.go
t.Errorf("unexpected diff (-want, +got):\n%s", diff) } }) } } func TestIsStatusEqual(t *testing.T) { tests := []struct { name string x, y *Status want bool }{ { name: "two nil should be equal", x: nil, y: nil, want: true, }, { name: "nil should be equal to success status", x: nil,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Oct 22 04:41:59 UTC 2023 - 7.3K bytes - Viewed (0) -
src/runtime/crash_unix_test.go
if fd != -1 { t.Errorf("open(%q)=%d, want -1", nonfile, fd) } var buf [32]byte r := runtime.Read(-1, unsafe.Pointer(&buf[0]), int32(len(buf))) if got, want := r, -int32(syscall.EBADF); got != want { t.Errorf("read()=%d, want %d", got, want) } w := runtime.Write(^uintptr(0), unsafe.Pointer(&buf[0]), int32(len(buf))) if got, want := w, -int32(syscall.EBADF); got != want { t.Errorf("write()=%d, want %d", got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 20:11:47 UTC 2023 - 9.2K bytes - Viewed (0) -
src/runtime/runtime-gdb_unix_test.go
t.Fatalf("Wait succeeded, want SIGABRT") } ee, ok := err.(*exec.ExitError) if !ok { t.Fatalf("Wait err got %T %v, want exec.ExitError", ee, ee) } ws, ok := ee.Sys().(syscall.WaitStatus) if !ok { t.Fatalf("Sys got %T %v, want syscall.WaitStatus", ee.Sys(), ee.Sys()) } if ws.Signal() != syscall.SIGABRT { t.Fatalf("Signal got %d want SIGABRT", ws.Signal()) } if !ws.CoreDump() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 17 19:05:30 UTC 2024 - 9.4K bytes - Viewed (0) -
test/typeparam/chansimp.dir/main.go
) func TestReadAll() { c := make(chan int) go func() { c <- 4 c <- 2 c <- 5 close(c) }() got := a.ReadAll(context.Background(), c) want := []int{4, 2, 5} if !a.SliceEqual(got, want) { panic(fmt.Sprintf("ReadAll returned %v, want %v", got, want)) } } func TestMerge() { c1 := make(chan int) c2 := make(chan int) go func() { c1 <- 1 c1 <- 3 c1 <- 5 close(c1) }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 3.1K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/lockedfile_test.go
} t.Logf("WriteString(%q) = <nil>", part1) wait := mustBlock(t, "Read", func() { b, err := lockedfile.Read(path) if err != nil { t.Errorf("Read: %v", err) return } const want = part1 + part2 got := string(b) if got == want { t.Logf("Read(_) = %q", got) } else { t.Errorf("Read(_) = %q, _; want %q", got, want) } }) _, err = f.WriteString(part2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:29 UTC 2023 - 5.7K bytes - Viewed (0) -
src/sync/cond_test.go
n := 2 running := make(chan bool, n) awake := make(chan bool, n) for i := 0; i < n; i++ { go func() { m.Lock() running <- true c.Wait() awake <- true m.Unlock() }() } for i := 0; i < n; i++ { <-running // Wait for everyone to run. } for n > 0 { select { case <-awake: t.Fatal("goroutine not asleep") default: } m.Lock() c.Signal() m.Unlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 22 18:52:42 UTC 2023 - 5K bytes - Viewed (0) -
src/sync/example_test.go
sum += i } fmt.Println("Computed once:", sum) return sum }) done := make(chan bool) for i := 0; i < 10; i++ { go func() { const want = 499500 got := once() if got != want { fmt.Println("want", want, "got", got) } done <- true }() } for i := 0; i < 10; i++ { <-done } // Output: // Computed once: 499500 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 23 17:45:47 UTC 2024 - 2.2K bytes - Viewed (0)