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

Unified Diff: tools/memory_inspector/memory_inspector/core/stacktrace_unittest.py

Issue 167223002: Fix directory layout for tools/memory_inspector tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 10 months 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 side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698