From 8553c19974a5ab5f815b9e64f7bfe9899924726b Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 13 Jan 2016 20:06:56 +0000 Subject: Vendor import of lldb trunk r257626: https://llvm.org/svn/llvm-project/lldb/trunk@257626 --- .../postmortem/minidump/TestMiniDump.py | 6 +-- .../postmortem/minidump/fizzbuzz.cpp | 62 +++++++++++----------- 2 files changed, 34 insertions(+), 34 deletions(-) (limited to 'packages/Python/lldbsuite/test/functionalities/postmortem') diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index 5388850..1dda59a 100644 --- a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -3,7 +3,7 @@ Test basics of mini dump debugging. """ from __future__ import print_function - +from six import iteritems import lldb @@ -83,8 +83,8 @@ class MiniDumpTestCase(TestBase): thread = process.GetThreadAtIndex(0) expected_stack = { 0: 'bar', 1: 'foo', 2: 'main' } - self.assertEqual(thread.GetNumFrames(), len(expected_stack)) - for index, name in expected_stack.iteritems(): + self.assertGreaterEqual(thread.GetNumFrames(), len(expected_stack)) + for index, name in iteritems(expected_stack): frame = thread.GetFrameAtIndex(index) self.assertTrue(frame.IsValid()) function_name = frame.GetFunctionName() diff --git a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp index eb6476b..295d4a1 100644 --- a/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp +++ b/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp @@ -1,31 +1,31 @@ -// A sample program for getting minidumps on Windows. - -#include - -bool -fizz(int x) -{ - return x % 3 == 0; -} - -bool -buzz(int x) -{ - return x % 5 == 0; -} - -int -main() -{ - int *buggy = 0; - - for (int i = 1; i <= 100; ++i) - { - if (fizz(i)) std::cout << "fizz"; - if (buzz(i)) std::cout << "buzz"; - if (!fizz(i) && !buzz(i)) std::cout << i; - std::cout << '\n'; - } - - return *buggy; -} +// A sample program for getting minidumps on Windows. + +#include + +bool +fizz(int x) +{ + return x % 3 == 0; +} + +bool +buzz(int x) +{ + return x % 5 == 0; +} + +int +main() +{ + int *buggy = 0; + + for (int i = 1; i <= 100; ++i) + { + if (fizz(i)) std::cout << "fizz"; + if (buzz(i)) std::cout << "buzz"; + if (!fizz(i) && !buzz(i)) std::cout << i; + std::cout << '\n'; + } + + return *buggy; +} -- cgit v1.1