From 1970552e727855fd45b7b2fe3b56c14cdbf6eb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 29 Nov 2012 14:07:19 +0100 Subject: Fix missing code snippet in QTest doc. Change-Id: I6fb1167634b0acddfa61b92d104d98ba8a1a15cb Reviewed-by: Paul Olav Tvete --- src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/testlib/doc/snippets/code') diff --git a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp index 5c22b7c235..b2816d6576 100644 --- a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp +++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp @@ -246,5 +246,19 @@ void tst_MyXmlParser::parse() } //! [26] +//! [27] +void TestBenchmark::simple() +{ + QString str1 = QLatin1String("This is a test string"); + QString str2 = QLatin1String("This is a test string"); + + QCOMPARE(str1.localeAwareCompare(str2), 0); + + QBENCHMARK { + str1.localeAwareCompare(str2); + } +} +//! [27] + } -- cgit v1.2.3