OSDN Git Service

debugger: add explanation to "Type format" manual test
authorhjk <qtc-committer@nokia.com>
Tue, 12 Oct 2010 09:52:11 +0000 (11:52 +0200)
committerhjk <qtc-committer@nokia.com>
Tue, 12 Oct 2010 09:55:59 +0000 (11:55 +0200)
Reviewed-by: Friedemann Kleint
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp

index fab3af9..3c42532 100644 (file)
@@ -1421,6 +1421,26 @@ Foo testStruct()
     return f1;
 }
 
+void testTypeFormats()
+{
+    // These tests should result in properly displayed umlauts in the
+    // Locals&Watchers view. It is only support on gdb with Python.
+
+    // Select UTF-8 in "Change Format for Type" in L&W context menu.
+    const char *s = "aöa";
+
+    // Windows: Select UTF-16 in "Change Format for Type" in L&W context menu.
+    // Other: Select UCS-6 in "Change Format for Type" in L&W context menu.
+    const wchar_t *w = L"aöa";
+
+    // Make sure to undo "Change Format".
+    int dummy = 1;
+    Q_UNUSED(s);
+    Q_UNUSED(w);
+    Q_UNUSED(dummy);
+}
+
+
 class Thread : public QThread
 {
 public:
@@ -2065,14 +2085,12 @@ int main(int argc, char *argv[])
     testStdStack();
     testStdString();
     testStdVector();
+    testTypeFormats();
 
     testPassByReference();
     testPlugin();
     testQList();
     testQLinkedList();
-    const char *s = "aöa";
-    // wchar_t * support only with Python.
-    const wchar_t *w = L"aöa";
     testNamespace();
     //return 0;
     testQHash();
@@ -2100,9 +2118,6 @@ int main(int argc, char *argv[])
 
     //QColor color(255,128,10);
     //QFont font;
-
-    Q_UNUSED(s);
-    Q_UNUSED(w);
     return 0;
 }