Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDNSName (0.16 sec)

  1. src/net/dnsname_test.go

    	// A terminal dot doesn't contribute to length:
    	ch <- dnsNameTest{longDomain[len(longDomain)-253:] + ".", true}
    	// 254 is bad:
    	ch <- dnsNameTest{longDomain[len(longDomain)-254:], false}
    }
    
    func TestDNSName(t *testing.T) {
    	ch := make(chan dnsNameTest)
    	go emitDNSNameTest(ch)
    	for tc := range ch {
    		if isDomainName(tc.name) != tc.result {
    			t.Errorf("isDomainName(%q) = %v; want %v", tc.name, !tc.result, tc.result)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top