| OLD | NEW |
| 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 testing_utils import testing | 5 from testing_utils import testing |
| 6 | 6 |
| 7 | 7 |
| 8 class StacktraceTestSuite(testing.AppengineTestCase): #pragma: no cover. | 8 class StacktraceTestSuite(testing.AppengineTestCase): #pragma: no cover. |
| 9 | 9 |
| 10 def _VerifyTwoStackFramesEqual(self, frame1, frame2): | 10 def _VerifyTwoStackFramesEqual(self, frame1, frame2): |
| 11 self.assertEqual(str(frame1), str(frame2)) | 11 self.assertEqual(str(frame1), str(frame2)) |
| 12 self.assertEqual(frame1.dep_path, frame2.dep_path) | 12 self.assertEqual(frame1.dep_path, frame2.dep_path) |
| 13 self.assertEqual(frame1.component, frame2.component) | |
| 14 | 13 |
| 15 def _VerifyTwoCallStacksEqual(self, stack1, stack2): | 14 def _VerifyTwoCallStacksEqual(self, stack1, stack2): |
| 16 self.assertEqual(len(stack1), len(stack2)) | 15 self.assertEqual(len(stack1), len(stack2)) |
| 17 self.assertEqual(stack1.priority, stack2.priority) | 16 self.assertEqual(stack1.priority, stack2.priority) |
| 18 self.assertEqual(stack1.format_type, stack2.format_type) | 17 self.assertEqual(stack1.format_type, stack2.format_type) |
| 19 map(self._VerifyTwoStackFramesEqual, stack1, stack2) | 18 map(self._VerifyTwoStackFramesEqual, stack1, stack2) |
| 20 | 19 |
| 21 def _VerifyTwoStacktracesEqual(self, stacktrace1, stacktrace2): | 20 def _VerifyTwoStacktracesEqual(self, stacktrace1, stacktrace2): |
| 22 self.assertEqual(len(stacktrace1), len(stacktrace2)) | 21 self.assertEqual(len(stacktrace1), len(stacktrace2)) |
| 23 map(self._VerifyTwoCallStacksEqual, stacktrace1, stacktrace2) | 22 map(self._VerifyTwoCallStacksEqual, stacktrace1, stacktrace2) |
| OLD | NEW |