OSDN Git Service

debugger: add manual test for QTCREATORBUG-4997
authorhjk <qtc-committer@nokia.com>
Fri, 27 May 2011 13:19:46 +0000 (15:19 +0200)
committerhjk <qthjk@ovi.com>
Mon, 30 May 2011 10:57:15 +0000 (12:57 +0200)
Change-Id: Ib8dddfecd5fa139193797541e23d115d83c943a5
Reviewed-on: http://codereview.qt.nokia.com/210
Reviewed-by: hjk <qthjk@ovi.com>
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp

index bcf166b..a81eeb5 100644 (file)
@@ -2331,7 +2331,7 @@ void testWCout()
         j++;
     }
     cout.flush();
-};
+}
 
 void testWCout0()
 {
@@ -2634,9 +2634,27 @@ void test4019()
 }
 
 
+void test4497()
+{
+    using namespace std;
+    //cin.get(); // if commented out, the debugger doesn't stop at the breakpoint in the next line.
+    cout << "Hello, world!" << endl; // breakpoint
+
+    int sum = 0;
+    for (int i = 1; i <= 10; i++)
+        sum += i;
+
+    cout << sum << endl;
+    cout << "Enter a number: ";
+    int n;
+    cin >> n;
+    cout << "You entered " << n << "!" << endl;
+}
+
 
 int main(int argc, char *argv[])
 {
+    //test4497();
     test4019();
     testEigen();
     testKR();