Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for testCallback (0.18 sec)

  1. src/cmd/cgo/internal/swig/testdata/callback/main.go

    )
    
    func main() {
    	if len(os.Args) != 2 {
    		fatal("usage: callback testname")
    	}
    	switch os.Args[1] {
    	default:
    		fatal("unknown test %q", os.Args[1])
    	case "Call":
    		testCall()
    	case "Callback":
    		testCallback()
    	}
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    }
    
    type GoCallback struct{}
    
    func (p *GoCallback) Run() string {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 1K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/cgo_test.go

    func TestBlocking(t *testing.T)              { testBlocking(t) }
    func TestBoolAlign(t *testing.T)             { testBoolAlign(t) }
    func TestCallGoWithString(t *testing.T)      { testCallGoWithString(t) }
    func TestCallback(t *testing.T)              { testCallback(t) }
    func TestCallbackCallers(t *testing.T)       { testCallbackCallers(t) }
    func TestCallbackGC(t *testing.T)            { testCallbackGC(t) }
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  3. schema/callbacks_test.go

    )
    
    type UserWithCallback struct{}
    
    func (UserWithCallback) BeforeSave(*gorm.DB) error {
    	return nil
    }
    
    func (UserWithCallback) AfterCreate(*gorm.DB) error {
    	return nil
    }
    
    func TestCallback(t *testing.T) {
    	user, err := schema.Parse(&UserWithCallback{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    		t.Fatalf("failed to parse user with callback, got error %v", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 939 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/swig/swig_test.go

    	testenv.MustHaveCGO(t)
    	mustHaveSwig(t)
    	mustHaveCxx(t)
    	run(t, "testdata/callback", false, "Call")
    	t.Run("lto", func(t *testing.T) { run(t, "testdata/callback", true, "Call") })
    }
    
    func TestCallback(t *testing.T) {
    	testenv.MustHaveCGO(t)
    	mustHaveSwig(t)
    	mustHaveCxx(t)
    	run(t, "testdata/callback", false, "Callback")
    	t.Run("lto", func(t *testing.T) { run(t, "testdata/callback", true, "Callback") })
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/test/callback.go

    func goCallback(p unsafe.Pointer) {
    	i := *(*int)(p)
    
    	callbackMutex.Lock()
    	f := callbackFuncs[i]
    	callbackMutex.Unlock()
    
    	if f == nil {
    		panic("missing callback function")
    	}
    	f()
    }
    
    func testCallback(t *testing.T) {
    	var x = false
    	nestedCall(func() { x = true })
    	if !x {
    		t.Fatal("nestedCall did not call func")
    	}
    }
    
    func testCallbackGC(t *testing.T) {
    	nestedCall(runtime.GC)
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 111.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/tests/KerberosTest.java

                f.exists();
            }
            catch ( SmbUnsupportedOperationException e ) {
                Assume.assumeTrue("Using short names", false);
            }
        }
    
    
        @Test
        public void testFallback () throws Exception {
            Subject s = getInitiatorSubject(getTestUser(), getTestUserPassword(), getTestUserDomainRequired(), null);
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Mar 01 09:46:04 GMT 2020
    - 11.5K bytes
    - Viewed (0)
  7. tests/callbacks_test.go

    	return fnames[len(fnames)-1]
    }
    
    func c1(*gorm.DB) {}
    func c2(*gorm.DB) {}
    func c3(*gorm.DB) {}
    func c4(*gorm.DB) {}
    func c5(*gorm.DB) {}
    func c6(*gorm.DB) {}
    
    func TestCallbacks(t *testing.T) {
    	type callback struct {
    		name    string
    		before  string
    		after   string
    		remove  bool
    		replace bool
    		err     string
    		match   func(*gorm.DB) bool
    		h       func(*gorm.DB)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top