| Index: appengine/findit/crash/loglinear/changelist_features/test/top_frame_index_test.py
|
| diff --git a/appengine/findit/crash/loglinear/changelist_features/test/top_frame_index_test.py b/appengine/findit/crash/loglinear/changelist_features/test/top_frame_index_test.py
|
| index a6ed9231ca208b21f51b52a1704bd2a1764688d7..fd165cecb1ae4621a946f407860b2a6bc8f3b1e6 100644
|
| --- a/appengine/findit/crash/loglinear/changelist_features/test/top_frame_index_test.py
|
| +++ b/appengine/findit/crash/loglinear/changelist_features/test/top_frame_index_test.py
|
| @@ -4,10 +4,13 @@
|
|
|
| import unittest
|
|
|
| +from crash.crash_match import CrashMatch
|
| +from crash.crash_match import FrameInfo
|
| from crash.loglinear.changelist_features import top_frame_index
|
| +from crash.loglinear.changelist_features.touch_crashed_file_meta import (
|
| + CrashedFile)
|
| from crash.suspect import Suspect
|
| from crash.stacktrace import StackFrame
|
| -from crash.stacktrace import StackInfo
|
| from libs.gitiles.change_log import ChangeLog
|
| from libs.gitiles.change_log import FileChangeInfo
|
| from libs.gitiles.diff import ChangeType
|
| @@ -71,16 +74,16 @@ class TopFrameIndexFeatureTest(unittest.TestCase):
|
| """Test that the feature returns log(1) when the top frame index is 0."""
|
| report = self._GetDummyReport()
|
| suspect = self._GetMockSuspect()
|
| - touched_file_to_stack_infos = {
|
| - FileChangeInfo(ChangeType.MODIFY, 'a.cc', 'a.cc'):
|
| - [StackInfo(frame=StackFrame(index=0,
|
| - dep_path=suspect.dep_path,
|
| - function='func',
|
| - file_path='a.cc',
|
| - raw_file_path='a.cc',
|
| - crashed_line_numbers=[7]),
|
| - priority = 0)]
|
| + frame = StackFrame(index=0, dep_path=suspect.dep_path,
|
| + function='func', file_path='a.cc',
|
| + raw_file_path='a.cc', crashed_line_numbers=[7])
|
| + crashed = CrashedFile(frame)
|
| + matches = {
|
| + crashed:
|
| + CrashMatch(crashed,
|
| + [FileChangeInfo(ChangeType.MODIFY, 'a.cc', 'a.cc')],
|
| + [FrameInfo(frame=frame, priority = 0)])
|
| }
|
| self.assertEqual(lmath.LOG_ONE,
|
| top_frame_index.TopFrameIndexFeature(_MAXIMUM)(report)(
|
| - suspect, touched_file_to_stack_infos).value)
|
| + suspect, matches).value)
|
|
|