Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/mime/type_test.go

    			continue
    		}
    		if !reflect.DeepEqual(got, tt.want) {
    			t.Errorf("ExtensionsByType(%q) = %q; want %q", tt.typ, got, tt.want)
    		}
    	}
    }
    
    func TestLookupMallocs(t *testing.T) {
    	n := testing.AllocsPerRun(10000, func() {
    		TypeByExtension(".html")
    		TypeByExtension(".HtML")
    	})
    	if n > 0 {
    		t.Errorf("allocs = %v; want 0", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 08 21:09:03 UTC 2022
    - 4.9K bytes
    - Viewed (0)
Back to top