QRegularExpression: add optimizations autotest
authorGiuseppe D'Angelo <dangelog@gmail.com>
Wed, 22 Feb 2012 03:33:00 +0000 (03:33 +0000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Mar 2012 18:18:22 +0000 (19:18 +0100)
commiteb709333989a7e3d8eb662a0e167ac81ca19d882
treed1f72265b583b06c9b16e75f1dc6ab89eed2da25
parentaee8f7d81eaec36e7d406607644f8fce294f7e21
QRegularExpression: add optimizations autotest

Exporting the counter that controls the optimization of a compiled
pattern lets us to forcibly optimize all patterns. Therefore,
two tests are now run: one with default optimization values
and another one which always optimizes the pattern.

The counter itself was renamed with a qt_ prefix and put
inside the Qt compilation namespace
(thanks to rohanpm for pointing it out).

Change-Id: I56602433d37adc127772b2d0d2cdaf2e49d43c71
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/tools/qregularexpression.cpp
tests/auto/corelib/tools/qregularexpression/.gitignore
tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro [new file with mode: 0644]
tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp [new file with mode: 0644]
tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro [new file with mode: 0644]
tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp [new file with mode: 0644]
tests/auto/corelib/tools/qregularexpression/qregularexpression.pro
tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h [new file with mode: 0644]