From 906a05bc1757e0a3b28e916258979db185b7c9b7 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Fri, 16 Jan 2009 11:17:00 +0100 Subject: [PATCH] add a test case for std::deque --- tests/manual/gdbdebugger/simple/app.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index a20311822f8..b719915c479 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -54,6 +54,7 @@ #include <QtNetwork/QHostAddress> +#include <deque> #include <iostream> #include <map> #include <list> @@ -444,6 +445,29 @@ void stringRefTest(const QString &refstring) Q_UNUSED(refstring); } +void testStdDeque() +{ + std::deque<int *> plist1; + plist1.push_back(new int(1)); + plist1.push_back(0); + plist1.push_back(new int(2)); + plist1.pop_back(); + plist1.pop_front(); + plist1.pop_front(); + + std::deque<int> flist2; + flist2.push_back(1); + flist2.push_back(2); + + std::deque<Foo *> plist; + plist.push_back(new Foo(1)); + plist.push_back(new Foo(2)); + + std::deque<Foo> flist; + flist.push_back(1); + flist.push_front(2); +} + void testStdList() { std::list<int *> plist1; @@ -911,6 +935,7 @@ int main(int argc, char *argv[]) testHidden(); testArray(); + testStdDeque(); testStdList(); testStdMap(); testStdStack(); -- GitLab