From f725ff1170e905a914e93daf6254640896a8c517 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 3 Oct 2010 14:28:18 +0000 Subject: tests: Fixed XPath OOM tests, added parsing exception test git-svn-id: http://pugixml.googlecode.com/svn/trunk@760 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_document.cpp | 21 +++++++++++++++++++++ tests/test_xpath_parse.cpp | 25 ++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/tests/test_document.cpp b/tests/test_document.cpp index d67f646..d6163e2 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -845,3 +845,24 @@ TEST(document_load_buffer_inplace_short) delete[] data; } + +#ifndef PUGIXML_NO_EXCEPTIONS +TEST(document_load_exceptions) +{ + bool thrown = false; + + try + { + pugi::xml_document doc; + if (!doc.load("