Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestNamedEnum (0.29 sec)

  1. src/cmd/cgo/internal/test/cgo_test.go

    func TestConst(t *testing.T)                 { testConst(t) }
    func TestCthread(t *testing.T)               { testCthread(t) }
    func TestEnum(t *testing.T)                  { testEnum(t) }
    func TestNamedEnum(t *testing.T)             { testNamedEnum(t) }
    func TestCastToEnum(t *testing.T)            { testCastToEnum(t) }
    func TestErrno(t *testing.T)                 { testErrno(t) }
    func TestFpVar(t *testing.T)                 { testFpVar(t) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/test.go

    func testConst(t *testing.T) {
    	C.myConstFunc(nil, 0, nil)
    }
    
    func testEnum(t *testing.T) {
    	if C.Enum1 != 1 || C.Enum2 != 2 {
    		t.Error("bad enum", C.Enum1, C.Enum2)
    	}
    }
    
    func testNamedEnum(t *testing.T) {
    	e := new(C.enum_E)
    
    	*e = C.Enum1
    	if *e != 1 {
    		t.Error("bad enum", C.Enum1)
    	}
    
    	*e = C.Enum2
    	if *e != 2 {
    		t.Error("bad enum", C.Enum2)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
Back to top