From 5e527213a2430bb3018e5eebd909aef294edf9b5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- .../parser/validation/built-in/qname/driver.cxx | 105 --------------------- 1 file changed, 105 deletions(-) delete mode 100644 tests/cxx/parser/validation/built-in/qname/driver.cxx (limited to 'tests/cxx/parser/validation/built-in/qname/driver.cxx') diff --git a/tests/cxx/parser/validation/built-in/qname/driver.cxx b/tests/cxx/parser/validation/built-in/qname/driver.cxx deleted file mode 100644 index 6da6f2f..0000000 --- a/tests/cxx/parser/validation/built-in/qname/driver.cxx +++ /dev/null @@ -1,105 +0,0 @@ -// file : tests/cxx/parser/validation/built-in/qname/driver.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -// Test the built-in QName type validation. -// -#include - -#include -#include - -using namespace xsd::cxx::parser::validating; - -bool -test_post_fail (qname_pimpl& p) -{ - try - { - p._post (); - } - catch (invalid_value const&) - { - return true; - } - - return false; -} - -int -main () -{ - typedef xsd::cxx::parser::qname qname; - - // Good. - // - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters (" xsi"); - p._characters (":"); - p._characters ("schemaLocation"); - p._post (); - assert (p.post_qname () == qname ("xsi", "schemaLocation")); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters ("schemaLocation"); - p._post (); - assert (p.post_qname () == qname ("schemaLocation")); - } - - - // Bad - // - { - qname_pimpl p; - p.pre (); - p._pre (); - //p._characters (""); - assert (test_post_fail (p)); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters (":"); - assert (test_post_fail (p)); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters ("xsi:"); - assert (test_post_fail (p)); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters (":schemaLocation"); - assert (test_post_fail (p)); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters ("x?i:schemaLocation"); - assert (test_post_fail (p)); - } - - { - qname_pimpl p; - p.pre (); - p._pre (); - p._characters ("xsi:schema Location"); - assert (test_post_fail (p)); - } -} -- cgit v1.1