From 2615896faa646e5830abf2c269150e1165c66515 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- tests/cxx/tree/dom-association/driver.cxx | 71 ------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 tests/cxx/tree/dom-association/driver.cxx (limited to 'tests/cxx/tree/dom-association/driver.cxx') diff --git a/tests/cxx/tree/dom-association/driver.cxx b/tests/cxx/tree/dom-association/driver.cxx deleted file mode 100644 index 44343a3..0000000 --- a/tests/cxx/tree/dom-association/driver.cxx +++ /dev/null @@ -1,71 +0,0 @@ -// file : tests/cxx/tree/dom-association/driver.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -// Test DOM association/ownership. -// - -#include // std::auto_ptr/unique_ptr -#include -#include - -#include - -#include "dom-parse.hxx" -#include "test.hxx" - -using namespace std; -using namespace test; -using namespace xercesc; - -int -main (int argc, char* argv[]) -{ - if (argc != 2) - { - cerr << "usage: " << argv[0] << " test.xml" << endl; - return 1; - } - - int r (0); - - XMLPlatformUtils::Initialize (); - - try - { - ifstream ifs; - ifs.exceptions (ifstream::badbit | ifstream::failbit); - ifs.open (argv[1]); - - DOMDocument* ptr; - -#ifdef XSD_CXX11 - xml_schema::dom::unique_ptr doc (parse (ifs, argv[1], true)); - ptr = doc.get (); - unique_ptr r ( - root (std::move (doc), - xml_schema::flags::keep_dom | xml_schema::flags::own_dom)); -#else - xml_schema::dom::auto_ptr doc (parse (ifs, argv[1], true)); - ptr = doc.get (); - auto_ptr r ( - root (doc, - xml_schema::flags::keep_dom | xml_schema::flags::own_dom)); -#endif - - assert (doc.get () == 0); - assert (r->_node ()->getOwnerDocument () == ptr); - } - catch (xml_schema::exception const& e) - { - cerr << e << endl; - r = 1; - } - catch (const std::ios_base::failure&) - { - cerr << argv[1] << ": unable to open or read failure" << endl; - r = 1; - } - - XMLPlatformUtils::Terminate (); - return r; -} -- cgit v1.1