Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestBitStringAt (0.14 sec)

  1. src/encoding/asn1/asn1_test.go

    		if err == nil {
    			if test.bitLength != ret.BitLength || !bytes.Equal(ret.Bytes, test.out) {
    				t.Errorf("#%d: Bad result: %v (expected %v %v)", i, ret, test.out, test.bitLength)
    			}
    		}
    	}
    }
    
    func TestBitStringAt(t *testing.T) {
    	bs := BitString{[]byte{0x82, 0x40}, 16}
    	if bs.At(0) != 1 {
    		t.Error("#1: Failed")
    	}
    	if bs.At(1) != 0 {
    		t.Error("#2: Failed")
    	}
    	if bs.At(6) != 1 {
    		t.Error("#3: Failed")
    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