summaryrefslogtreecommitdiff
path: root/tests/test_document.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-10 22:26:57 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-10 22:26:57 -0700
commite90d2ac8ba44fbcf4d5702643f708f2c86bde42e (patch)
treea52fe8e4efee8176da169998c203c1a93f6a6ff1 /tests/test_document.cpp
parent6457f0941204a79ec5ba359a12aa00bf06f0e621 (diff)
parent405fefc8777c55900a4e44561b545a9abb5276ba (diff)
Merge branch 'master' into compact
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r--tests/test_document.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 49428f2..09d89d7 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -1010,7 +1010,7 @@ TEST(document_progressive_truncation)
char* buffer = new char[original_size];
- for (size_t i = 1; i < original_size; ++i)
+ for (size_t i = 1; i <= original_size; ++i)
{
char* truncated_data = buffer + original_size - i;
@@ -1022,7 +1022,7 @@ TEST(document_progressive_truncation)
bool result = doc.load_buffer_inplace(truncated_data, i);
// only eof is parseable
- CHECK((i >= 3325) ? result : !result);
+ CHECK((i == original_size) ? result : !result);
}
// fragment mode
@@ -1033,7 +1033,7 @@ TEST(document_progressive_truncation)
bool result = doc.load_buffer_inplace(truncated_data, i, parse_default | parse_fragment);
// some truncate locations are parseable - those that come after declaration, declaration + doctype, declaration + doctype + comment and eof
- CHECK(((i - 21) < 3 || (i - 66) < 3 || (i - 95) < 3 || i >= 3325) ? result : !result);
+ CHECK(((i - 21) < 3 || (i - 66) < 3 || (i - 95) < 3 || i == original_size) ? result : !result);
}
}