| OLD | NEW |
| 1 package data | 1 package data |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "path/filepath" | 4 "path/filepath" |
| 5 "reflect" | 5 "reflect" |
| 6 "strings" | 6 "strings" |
| 7 "testing" | 7 "testing" |
| 8 | 8 |
| 9 "go.skia.org/infra/fuzzer/go/common" | 9 "go.skia.org/infra/fuzzer/go/common" |
| 10 "go.skia.org/infra/go/testutils" | 10 "go.skia.org/infra/go/testutils" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 func TestParseASANSingle(t *testing.T) { | 89 func TestParseASANSingle(t *testing.T) { |
| 90 testInput := testutils.MustReadFile("parse-asan-single.asan") | 90 testInput := testutils.MustReadFile("parse-asan-single.asan") |
| 91 | 91 |
| 92 trace := parseASANStackTrace(testInput) | 92 trace := parseASANStackTrace(testInput) |
| 93 | 93 |
| 94 expected := StackTrace{ | 94 expected := StackTrace{ |
| 95 Frames: []StackTraceFrame{ | 95 Frames: []StackTraceFrame{ |
| 96 FullStackFrame("src/codec/", "SkMasks.cpp", "convert_to_
8", 54), | 96 FullStackFrame("src/codec/", "SkMasks.cpp", "convert_to_
8", 54), |
| 97 FullStackFrame("src/codec/", "SkMaskSwizzler.cpp", "swiz
zle_mask24_to_n32_opaque", 93), | 97 FullStackFrame("src/codec/", "SkMaskSwizzler.cpp", "swiz
zle_mask24_to_n32_opaque", 93), |
| 98 FullStackFrame("src/codec/", "SkBmpMaskCodec.cpp", "SkBm
pMaskCodec::decodeRows", 103), | 98 FullStackFrame("src/codec/", "SkBmpMaskCodec.cpp", "SkBm
pMaskCodec::decodeRows", 103), |
| 99 » » » FullStackFrame("src/codec/", "SkBmpMaskCodec.cpp", "SkBm
pMaskCodec::onGetPixels", 53), | 99 » » » FullStackFrame("third_party/externals/piex/src/", "piex.
cc", "piex::GetPreviewData", 59), |
| 100 » » » FullStackFrame("src/codec/", "SkCodec.cpp", "SkCodec::ge
tPixels", 204), | 100 » » » FullStackFrame("third_party/externals/piex/src/", "piex.
cc", "piex::GetPreviewData", 68), |
| 101 FullStackFrame("fuzz/", "fuzz.cpp", "fuzz_img", 119), | 101 FullStackFrame("fuzz/", "fuzz.cpp", "fuzz_img", 119), |
| 102 FullStackFrame("fuzz/", "fuzz.cpp", "main", 53), | 102 FullStackFrame("fuzz/", "fuzz.cpp", "main", 53), |
| 103 }, | 103 }, |
| 104 } | 104 } |
| 105 | 105 |
| 106 if !reflect.DeepEqual(expected, trace) { | 106 if !reflect.DeepEqual(expected, trace) { |
| 107 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | 107 t.Errorf("Expected %#v\nbut was %#v", expected, trace) |
| 108 t.Errorf("Expected %s \n but was %s", expected.String(), trace.S
tring()) | 108 t.Errorf("Expected %s \n but was %s", expected.String(), trace.S
tring()) |
| 109 } | 109 } |
| 110 } | 110 } |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) | 427 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) |
| 428 } | 428 } |
| 429 | 429 |
| 430 if len(result.Release.StackTrace.Frames) != 1 { | 430 if len(result.Release.StackTrace.Frames) != 1 { |
| 431 t.Errorf("Should not have had empty release stacktrace") | 431 t.Errorf("Should not have had empty release stacktrace") |
| 432 } | 432 } |
| 433 if frame := result.Release.StackTrace.Frames[0]; frame.LineNumber != exp
ected.LineNumber || frame.FunctionName != expected.FunctionName || frame.FileNam
e != expected.FileName || frame.PackageName != expected.PackageName { | 433 if frame := result.Release.StackTrace.Frames[0]; frame.LineNumber != exp
ected.LineNumber || frame.FunctionName != expected.FunctionName || frame.FileNam
e != expected.FileName || frame.PackageName != expected.PackageName { |
| 434 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) | 434 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) |
| 435 } | 435 } |
| 436 } | 436 } |
| OLD | NEW |