summaryrefslogtreecommitdiffstats
path: root/output/layout_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'output/layout_test.go')
-rw-r--r--output/layout_test.go20
1 files changed, 16 insertions, 4 deletions
diff --git a/output/layout_test.go b/output/layout_test.go
index 5651a09b9..38b9d5faf 100644
--- a/output/layout_test.go
+++ b/output/layout_test.go
@@ -663,13 +663,25 @@ func TestLayout(t *testing.T) {
}
func BenchmarkLayout(b *testing.B) {
- c := qt.New(b)
descriptor := LayoutDescriptor{Kind: "taxonomy", Section: "categories"}
l := NewLayoutHandler()
for i := 0; i < b.N; i++ {
- layouts, err := l.For(descriptor, HTMLFormat)
- c.Assert(err, qt.IsNil)
- c.Assert(layouts, qt.Not(qt.HasLen), 0)
+ _, err := l.For(descriptor, HTMLFormat)
+ if err != nil {
+ panic(err)
+ }
+ }
+}
+
+func BenchmarkLayoutUncached(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ descriptor := LayoutDescriptor{Kind: "taxonomy", Section: "categories"}
+ l := NewLayoutHandler()
+
+ _, err := l.For(descriptor, HTMLFormat)
+ if err != nil {
+ panic(err)
+ }
}
}