Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIPBitLen (0.12 sec)

  1. src/net/netip/netip_pkg_test.go

    		}
    		if !tt.ip.Prev().isZero() && tt.ip.Prev().Next() != tt.ip {
    			t.Errorf("IP(%v).Prev.Next = %v; want %v", tt.ip, tt.ip.Prev().Next(), tt.ip)
    		}
    	}
    }
    
    func TestIPBitLen(t *testing.T) {
    	tests := []struct {
    		ip   Addr
    		want int
    	}{
    		{Addr{}, 0},
    		{mustIP("0.0.0.0"), 32},
    		{mustIP("10.0.0.1"), 32},
    		{mustIP("::"), 128},
    		{mustIP("fed0::1"), 128},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 15:37:19 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top