wxWidgets/tests/benchmarks/datetime.cpp
Vadim Zeitlin bf0f3b269f 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
2011-05-23 11:06:48 +00:00

21 lines
587 B
C++

/////////////////////////////////////////////////////////////////////////////
// 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;
}