| Index: tools/memory_inspector/memory_inspector/core/stacktrace_unittest.py
|
| diff --git a/tools/memory_inspector/memory_inspector/core/stacktrace_unittest.py b/tools/memory_inspector/memory_inspector/core/stacktrace_unittest.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c09395841fbdc1319ba58319e5495ddc5e24fb87
|
| --- /dev/null
|
| +++ b/tools/memory_inspector/memory_inspector/core/stacktrace_unittest.py
|
| @@ -0,0 +1,21 @@
|
| +# Copyright 2014 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import unittest
|
| +
|
| +from memory_inspector.core import stacktrace
|
| +
|
| +
|
| +class StacktraceTest(unittest.TestCase):
|
| + def runTest(self):
|
| + st = stacktrace.Stacktrace()
|
| + frame_1 = stacktrace.Frame(20)
|
| + frame_2 = stacktrace.Frame(24)
|
| + frame_2.SetExecFileInfo('/foo/bar.so', 0)
|
| + self.assertEqual(frame_2.exec_file_name, 'bar.so')
|
| + st.Add(frame_1)
|
| + st.Add(frame_1)
|
| + st.Add(frame_2)
|
| + st.Add(frame_1)
|
| + self.assertEqual(st.depth, 4)
|
|
|