Change asserts to tests.

[SVN r37080]
This commit is contained in:
John Maddock
2007-02-26 09:46:39 +00:00
parent cce38359c9
commit bb7b1c8def
2 changed files with 5 additions and 3 deletions

View File

@ -21,6 +21,7 @@
#include <string.h>
#include <boost/assert.hpp>
#include <boost/regex.h>
#include <boost/detail/lightweight_test.hpp>
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();
}