From bb7b1c8def6ac0b81b72d31c8fe4a21a82c1bfe8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 26 Feb 2007 09:46:39 +0000 Subject: [PATCH] Change asserts to tests. [SVN r37080] --- test/Jamfile.v2 | 1 + test/c_compiler_checks/posix_api_check.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e46fafbf..e948858e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -135,3 +135,4 @@ test-suite regex + diff --git a/test/c_compiler_checks/posix_api_check.cpp b/test/c_compiler_checks/posix_api_check.cpp index 1611283b..46d8aed9 100644 --- a/test/c_compiler_checks/posix_api_check.cpp +++ b/test/c_compiler_checks/posix_api_check.cpp @@ -21,6 +21,7 @@ #include #include #include +#include const char* expression = "^"; const char* text = "\n "; @@ -42,7 +43,7 @@ int main() printf(buf); return result; } - BOOST_ASSERT(re.re_nsub == 0); + BOOST_TEST(re.re_nsub == 0); matches[0].rm_so = 0; matches[0].rm_eo = strlen(text); result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND); @@ -54,10 +55,10 @@ int main() regfree(&re); return result; } - BOOST_ASSERT(matches[0].rm_so == matches[0].rm_eo == 1); + BOOST_TEST(matches[0].rm_so == matches[0].rm_eo == 1); regfree(&re); printf("no errors found\n"); - return 0; + return boost::report_errors(); }