Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: fuzzer/go/frontend/data/report_test.go

Issue 1676593002: Remove old count and overview fuzzer elements (Closed) Base URL: https://skia.googlesource.com/buildbot@filter-ui
Patch Set: merged in above Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fuzzer/go/frontend/data/report.go ('k') | fuzzer/go/fuzzer-fe/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package data 1 package data
2 2
3 import ( 3 import (
4 "reflect" 4 "reflect"
5 "testing" 5 "testing"
6 6
7 "go.skia.org/infra/fuzzer/go/common" 7 "go.skia.org/infra/fuzzer/go/common"
8 ) 8 )
9 9
10 func TestSortedFuzzReports(t *testing.T) { 10 func TestSortedFuzzReports(t *testing.T) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 for _, key := range addingOrder { 51 for _, key := range addingOrder {
52 builder.addFuzzReport("skpicture", mockPictureDetails[key]) 52 builder.addFuzzReport("skpicture", mockPictureDetails[key])
53 } 53 }
54 addingOrder = []string{"iiii", "hhhh"} 54 addingOrder = []string{"iiii", "hhhh"}
55 for _, key := range addingOrder { 55 for _, key := range addingOrder {
56 builder.addFuzzReport("api", mockAPIDetails[key]) 56 builder.addFuzzReport("api", mockAPIDetails[key])
57 } 57 }
58 return builder 58 return builder
59 } 59 }
60 60
61 func TestSummary(t *testing.T) {
62 builder := loadReports()
63
64 summary := builder.getSummarySortedByTotal("skpicture")
65 if !reflect.DeepEqual(expectedPictureSummary, summary) {
66 t.Errorf("Summary Report Expected: %#v\n, but was: %#v", expecte dPictureSummary, summary)
67 }
68
69 summary = builder.getSummarySortedByTotal("api")
70 if !reflect.DeepEqual(expectedAPISummary, summary) {
71 t.Errorf("Summary Report Expected: %#v\n, but was: %#v", expecte dAPISummary, summary)
72 }
73 }
74
75 func makeStacktrace(file, function string, line int) StackTrace { 61 func makeStacktrace(file, function string, line int) StackTrace {
76 return StackTrace{ 62 return StackTrace{
77 Frames: []StackTraceFrame{ 63 Frames: []StackTraceFrame{
78 { 64 {
79 PackageName: "mock/package/", 65 PackageName: "mock/package/",
80 FileName: file, 66 FileName: file,
81 LineNumber: line, 67 LineNumber: line,
82 FunctionName: function, 68 FunctionName: function,
83 }, 69 },
84 }, 70 },
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 FunctionFuzzReport{ 252 FunctionFuzzReport{
267 FunctionName: "beta", Count: 2, LineNumbers: []L ineFuzzReport{ 253 FunctionName: "beta", Count: 2, LineNumbers: []L ineFuzzReport{
268 LineFuzzReport{ 254 LineFuzzReport{
269 LineNumber: 16, Count: 2, Detail s: nil, 255 LineNumber: 16, Count: 2, Detail s: nil,
270 }, 256 },
271 }, 257 },
272 }, 258 },
273 }, 259 },
274 }, 260 },
275 } 261 }
OLDNEW
« no previous file with comments | « fuzzer/go/frontend/data/report.go ('k') | fuzzer/go/fuzzer-fe/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698