forked from boostorg/regex
Updated to get xpressive tests to run correctly, and to use regex_iterators for searching.
[SVN r31018]
This commit is contained in:
@ -54,12 +54,14 @@ double boost_total = 0;
|
||||
double locale_boost_total = 0;
|
||||
double posix_total = 0;
|
||||
double pcre_total = 0;
|
||||
double xpressive_total = 0;
|
||||
unsigned greta_test_count = 0;
|
||||
unsigned safe_greta_test_count = 0;
|
||||
unsigned boost_test_count = 0;
|
||||
unsigned locale_boost_test_count = 0;
|
||||
unsigned posix_test_count = 0;
|
||||
unsigned pcre_test_count = 0;
|
||||
unsigned xpressive_test_count = 0;
|
||||
|
||||
int handle_argument(const std::string& what)
|
||||
{
|
||||
@ -261,6 +263,10 @@ void output_html_results(bool show_description, const std::string& tagname)
|
||||
#ifdef BOOST_HAS_PCRE
|
||||
if(time_pcre == true)
|
||||
os << "<td><strong>PCRE</strong></td>";
|
||||
#endif
|
||||
#ifdef BOOST_HAS_XPRESSIVE
|
||||
if(time_xpressive == true)
|
||||
os << "<td><strong>Dynamic Xpressive</strong></td>";
|
||||
#endif
|
||||
os << "</tr>\n";
|
||||
|
||||
@ -305,6 +311,7 @@ void output_html_results(bool show_description, const std::string& tagname)
|
||||
++boost_test_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(time_localised_boost == true)
|
||||
{
|
||||
print_result(os, first->localised_boost_time, first->factor);
|
||||
@ -314,7 +321,6 @@ void output_html_results(bool show_description, const std::string& tagname)
|
||||
++locale_boost_test_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(time_posix == true)
|
||||
{
|
||||
print_result(os, first->posix_time, first->factor);
|
||||
@ -334,6 +340,17 @@ void output_html_results(bool show_description, const std::string& tagname)
|
||||
++pcre_test_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(BOOST_HAS_XPRESSIVE)
|
||||
if(time_xpressive == true)
|
||||
{
|
||||
print_result(os, first->xpressive_time, first->factor);
|
||||
if(first->xpressive_time > 0)
|
||||
{
|
||||
xpressive_total += first->xpressive_time / first->factor;
|
||||
++xpressive_test_count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
os << "</tr>\n";
|
||||
++first;
|
||||
@ -400,6 +417,12 @@ std::string get_averages_table()
|
||||
{
|
||||
os << "<td><strong>PCRE</strong></td>";
|
||||
}
|
||||
#endif
|
||||
#ifdef BOOST_HAS_XPRESSIVE
|
||||
if(time_xpressive == true)
|
||||
{
|
||||
os << "<td><strong>Dynamic Xpressive</strong></td>";
|
||||
}
|
||||
#endif
|
||||
os << "</tr>\n";
|
||||
|
||||
@ -416,14 +439,18 @@ std::string get_averages_table()
|
||||
#if defined(BOOST_HAS_POSIX)
|
||||
if(time_boost == true)
|
||||
os << "<td>" << (boost_total / boost_test_count) << "</td>\n";
|
||||
#endif
|
||||
if(time_localised_boost == true)
|
||||
os << "<td>" << (locale_boost_total / locale_boost_test_count) << "</td>\n";
|
||||
#endif
|
||||
if(time_posix == true)
|
||||
os << "<td>" << (posix_total / posix_test_count) << "</td>\n";
|
||||
#if defined(BOOST_HAS_PCRE)
|
||||
if(time_pcre == true)
|
||||
os << "<td>" << (pcre_total / pcre_test_count) << "</td>\n";
|
||||
#endif
|
||||
#if defined(BOOST_HAS_XPRESSIVE)
|
||||
if(time_xpressive == true)
|
||||
os << "<td>" << (xpressive_total / xpressive_test_count) << "</td>\n";
|
||||
#endif
|
||||
os << "</tr>\n";
|
||||
os << "</table>\n";
|
||||
|
Reference in New Issue
Block a user