tests: Various compilation fixes for BCC and MSVC6
git-svn-id: http://pugixml.googlecode.com/svn/trunk@702 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
589947da0b
commit
954de8f89a
3 changed files with 7 additions and 5 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <exception>
|
||||
#include <stdio.h>
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
|
||||
test_runner* test_runner::_tests = 0;
|
||||
|
|
|
@ -164,7 +164,7 @@ TEST(memory_string_allocate_decreasing)
|
|||
|
||||
for (int i = 0; i < 17; ++i) s += s;
|
||||
|
||||
for (int i = 0; i < 17; ++i)
|
||||
for (int j = 0; j < 17; ++j)
|
||||
{
|
||||
s.resize(s.size() / 2);
|
||||
|
||||
|
@ -178,9 +178,9 @@ TEST(memory_string_allocate_decreasing)
|
|||
CHECK(result.size() == 262143);
|
||||
CHECK(result[result.size() - 1] == 'x');
|
||||
|
||||
for (size_t j = 0; j + 1 < result.size(); ++j)
|
||||
for (size_t k = 0; k + 1 < result.size(); ++k)
|
||||
{
|
||||
CHECK(result[j] == (j % 2 ? 'b' : 'a'));
|
||||
CHECK(result[k] == (k % 2 ? 'b' : 'a'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ TEST(memory_string_allocate_decreasing_inplace)
|
|||
|
||||
for (int i = 0; i < 17; ++i) s += s;
|
||||
|
||||
for (int i = 0; i < 17; ++i)
|
||||
for (int j = 0; j < 17; ++j)
|
||||
{
|
||||
s.resize(s.size() / 2);
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef PUGIXML_NO_XPATH
|
||||
|
||||
#include <string.h> // because Borland's STL is braindead, we have to include <string.h> _before_ <string> in order to get memcmp
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
#include "helpers.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
TEST_XML(xpath_api_select_nodes, "<node><head/><foo/><foo/><tail/></node>")
|
||||
|
|
Loading…
Add table
Reference in a new issue