Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for testCaller (0.1 sec)

  1. test/inline_caller.go

    }
    
    // -1 means don't care
    var expected = []wantFrame{
    	0: {"main.h", 36},
    	1: {"main.g", 31},
    	2: {"main.f", 27},
    	3: {"main.testCaller", 42},
    	4: {"main.main", 68},
    	5: {"runtime.main", -1},
    	6: {"runtime.goexit", -1},
    }
    
    func main() {
    	for i := 0; i <= 6; i++ {
    		frame := testCaller(i) // line 68
    		fn := runtime.FuncForPC(frame.pc)
    		if expected[i].line >= 0 && frame.line != expected[i].line {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 08 21:54:04 UTC 2019
    - 1.4K bytes
    - Viewed (0)
  2. src/runtime/symtab_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime_test
    
    import (
    	"runtime"
    	"strings"
    	"testing"
    	"unsafe"
    )
    
    func TestCaller(t *testing.T) {
    	procs := runtime.GOMAXPROCS(-1)
    	c := make(chan bool, procs)
    	for p := 0; p < procs; p++ {
    		go func() {
    			for i := 0; i < 1000; i++ {
    				testCallerFoo(t)
    			}
    			c <- true
    		}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 21:46:33 UTC 2022
    - 7.5K bytes
    - Viewed (0)
  3. test/inline_callers.go

    }
    
    var expectedFrames [][]string = [][]string{
    	0: {"runtime.Callers", "main.h", "main.g", "main.f", "main.testCallers", "main.main"},
    	1: {"main.h", "main.g", "main.f", "main.testCallers", "main.main"},
    	2: {"main.g", "main.f", "main.testCallers", "main.main"},
    	3: {"main.f", "main.testCallers", "main.main"},
    	4: {"main.testCallers", "main.main"},
    	5: {"main.main"},
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 08 21:54:04 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  4. src/runtime/callers_test.go

    		if !more || len(got) >= len(want) {
    			break
    		}
    		got = append(got, frame.Function)
    	}
    	if !reflect.DeepEqual(want, got) {
    		t.Fatalf("wanted %v, got %v", want, got)
    	}
    }
    
    func TestCallers(t *testing.T) {
    	testCallers(t, f1(false), false)
    }
    
    func TestCallersPanic(t *testing.T) {
    	// Make sure we don't have any extra frames on the stack (due to
    	// open-coded defer processing)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 21:36:31 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go

    		if i < opts.Steps {
    			i++
    			return false, nil
    		}
    		return true, nil
    	})
    	if err != nil || i != opts.Steps {
    		t.Errorf("unexpected error: %v", err)
    	}
    }
    
    func TestPoller(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	w := poller(time.Millisecond, 2*time.Millisecond)
    	ch := w(ctx)
    	count := 0
    DRAIN:
    	for {
    		select {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top