mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 21:04:25 +08:00
tests: Add a test for stackless write.
This test previously caused a stack overflow on x86/MSVC. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1015 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
4ed5972d4f
commit
3abba14e72
@ -408,3 +408,22 @@ TEST(write_print_stream_empty_wide)
|
||||
xml_node().print(oss);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(write_stackless)
|
||||
{
|
||||
unsigned int count = 20000;
|
||||
std::basic_string<pugi::char_t> data;
|
||||
|
||||
for (unsigned int i = 0; i < count; ++i)
|
||||
data += "<a>";
|
||||
|
||||
data += "text";
|
||||
|
||||
for (unsigned int i = 0; i < count; ++i)
|
||||
data += "</a>";
|
||||
|
||||
xml_document doc;
|
||||
CHECK(doc.load(data.c_str()));
|
||||
|
||||
CHECK_NODE(doc, data.c_str());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user