Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUnexportedStructField (0.69 sec)

  1. src/encoding/asn1/asn1_test.go

    		}
    	}
    }
    
    type unexported struct {
    	X int
    	y int
    }
    
    type exported struct {
    	X int
    	Y int
    }
    
    func TestUnexportedStructField(t *testing.T) {
    	want := StructuralError{"struct contains unexported fields"}
    
    	_, err := Marshal(unexported{X: 5, y: 1})
    	if err != want {
    		t.Errorf("got %v, want %v", err, want)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 29 18:24:36 UTC 2023
    - 43.6K bytes
    - Viewed (0)
Back to top