mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 18:12:13 +00:00
parent
beb601c7ff
commit
be96aacb11
1 changed files with 20 additions and 1 deletions
|
@ -79,7 +79,6 @@ var extra_tests_html = []test{{REPLACE_SCHEMALESS_HTML, REPLACE_SCHEMALESS_HTML_
|
|||
var abs_url_tests = append(abs_url_bench_tests, append(sanity_tests, extra_tests_html...)...)
|
||||
var extra_tests_xml = []test{{REPLACE_SCHEMALESS_XML, REPLACE_SCHEMALESS_XML_CORRECT}}
|
||||
var xml_abs_url_tests = append(xml_abs_url_bench_tests, append(sanity_tests, extra_tests_xml...)...)
|
||||
|
||||
var srcset_tests = []test{{SRCSET_BASIC, SRCSET_BASIC_CORRECT}, {SRCSET_SINGLE_QUOTE, SRCSET_SINGLE_QUOTE_CORRECT}, {SRCSET_VARIATIONS, SRCSET_VARIATIONS_CORRECT}}
|
||||
var srcset_xml_tests = []test{
|
||||
{SRCSET_XML_BASIC, SRCSET_XML_BASIC_CORRECT},
|
||||
|
@ -134,6 +133,26 @@ func BenchmarkAbsURL(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkAbsURLSrcset(b *testing.B) {
|
||||
absURL, _ := absURLFromURL("http://base")
|
||||
tr := NewChain(absURL...)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
apply(b.Errorf, tr, srcset_tests)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkXMLAbsURLSrcset(b *testing.B) {
|
||||
absXMLURL, _ := absURLInXMLFromURL("http://base")
|
||||
tr := NewChain(absXMLURL...)
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
apply(b.Errorf, tr, srcset_xml_tests)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAbsURL(t *testing.T) {
|
||||
absURL, _ := absURLFromURL("http://base")
|
||||
tr := NewChain(absURL...)
|
||||
|
|
Loading…
Reference in a new issue