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

Side by Side Diff: appengine/findit/crash/test/stacktrace_test.py

Issue 2414523002: [Findit] Reorganizing findit_for_*.py (Closed)
Patch Set: Finally fixed the mock tests! Created 4 years, 1 month 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from common.dependency import Dependency 5 from common.dependency import Dependency
6 from crash.stacktrace import StackFrame 6 from crash.stacktrace import StackFrame
7 from crash.stacktrace import CallStack 7 from crash.stacktrace import CallStack
8 from crash.stacktrace import Stacktrace 8 from crash.stacktrace import Stacktrace
9 from crash.test.stacktrace_test_suite import StacktraceTestSuite
10 from crash.type_enums import CallStackFormatType 9 from crash.type_enums import CallStackFormatType
11 from crash.type_enums import CallStackLanguageType 10 from crash.type_enums import CallStackLanguageType
11 from crash.test.stacktrace_test_suite import StacktraceTestSuite
12 12
13 13
14 class CallStackTest(StacktraceTestSuite): 14 class CallStackTest(StacktraceTestSuite):
15 15
16 def testStackFrameToString(self): 16 def testStackFrameToString(self):
17 self.assertEqual( 17 self.assertEqual(
18 StackFrame(0, 'src/', 'func', 'f.cc', 'src/f.cc', []).ToString(), 18 StackFrame(0, 'src/', 'func', 'f.cc', 'src/f.cc', []).ToString(),
19 '#0 in func @ f.cc') 19 '#0 in func @ f.cc')
20 self.assertEqual( 20 self.assertEqual(
21 StackFrame(0, 'src/', 'func', 'f.cc', 'src/f.cc', [1]).ToString(), 21 StackFrame(0, 'src/', 'func', 'f.cc', 'src/f.cc', [1]).ToString(),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 stacktrace.extend(callstack_list) 164 stacktrace.extend(callstack_list)
165 165
166 self._VerifyTwoCallStacksEqual(stacktrace.crash_stack, 166 self._VerifyTwoCallStacksEqual(stacktrace.crash_stack,
167 callstack_list[0]) 167 callstack_list[0])
168 168
169 def testInitStacktaceByCopyAnother(self): 169 def testInitStacktaceByCopyAnother(self):
170 stack_trace = Stacktrace() 170 stack_trace = Stacktrace()
171 stack_trace.extend([CallStack(0), CallStack(1)]) 171 stack_trace.extend([CallStack(0), CallStack(1)])
172 172
173 self._VerifyTwoStacktracesEqual(Stacktrace(stack_trace), stack_trace) 173 self._VerifyTwoStacktracesEqual(Stacktrace(stack_trace), stack_trace)
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/results_test.py ('k') | appengine/findit/handlers/crash/crash_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698