Add a trivial benchmark for wxDateTime::ParseDate().

Add a test to check the performance of this method.

See #13242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-05-23 11:06:48 +00:00
parent 979fa8c2ad
commit bf0f3b269f
11 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tests/benchmarks/datetime.cpp
// Purpose: wxDateTime benchmarks
// Author: Vadim Zeitlin
// Created: 2011-05-23
// RCS-ID: $Id$
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/datetime.h"
#include "bench.h"
BENCHMARK_FUNC(ParseDate)
{
wxDateTime dt;
return dt.ParseDate("May 23, 2011") && dt.GetMonth() == wxDateTime::May;
}