another attempt to get tests to link on windows

This commit is contained in:
Arvid Norberg
2013-08-27 07:02:46 +00:00
parent 503ebc91bd
commit f2aca363ad
3 changed files with 24 additions and 24 deletions

View File

@@ -66,8 +66,8 @@ POSSIBILITY OF SUCH DAMAGE.
using namespace libtorrent;
int tests_failure = 0;
std::vector<std::string> failure_strings;
static int tests_failure = 0;
static std::vector<std::string> failure_strings;
void report_failure(char const* err, char const* file, int line)
{
@@ -78,6 +78,17 @@ void report_failure(char const* err, char const* file, int line)
++tests_failure;
}
int print_failures()
{
for (std::vector<std::string>::iterator i = failure_strings.begin()
, end(failure_strings.end()); i != end; ++i)
{
fputs(i->c_str(), stderr);
}
fprintf(stderr, "\n\n\x1b[41m == %d TEST(S) FAILED ==\x1b[0m\n\n\n", tests_failure);
return tests_failure;
}
std::auto_ptr<alert> wait_for_alert(session& ses, int type)
{
std::auto_ptr<alert> ret;