summaryrefslogtreecommitdiff
path: root/xsd/tests/cxx/tree/binary/cdr/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/tests/cxx/tree/binary/cdr/driver.cxx')
-rw-r--r--xsd/tests/cxx/tree/binary/cdr/driver.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/xsd/tests/cxx/tree/binary/cdr/driver.cxx b/xsd/tests/cxx/tree/binary/cdr/driver.cxx
index 42ca181..a2d7195 100644
--- a/xsd/tests/cxx/tree/binary/cdr/driver.cxx
+++ b/xsd/tests/cxx/tree/binary/cdr/driver.cxx
@@ -1,12 +1,11 @@
// file : tests/cxx/tree/binary/cdr/driver.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC
+// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
// Test non-polymorphic binary serialization to ACE CDR.
//
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cassert>
#include <iostream>
@@ -26,7 +25,7 @@ main (int argc, char* argv[])
try
{
- auto_ptr<type> r (root (argv[1]));
+ XSD_AUTO_PTR<type> r (root (argv[1]));
// Save to a CDR stream.
//
@@ -38,7 +37,7 @@ main (int argc, char* argv[])
//
ACE_InputCDR ace_icdr (ace_ocdr);
xml_schema::istream<ACE_InputCDR> icdr (ace_icdr);
- auto_ptr<type> c (new type (icdr));
+ XSD_AUTO_PTR<type> c (new type (icdr));
// Compare the two.
//
@@ -128,6 +127,14 @@ main (int argc, char* argv[])
assert (r->time () == c->time ());
assert (r->date_time () == c->date_time ());
assert (r->duration () == c->duration ());
+
+ // anySimpleType
+ //
+ assert (!r->any_simple_type_attr ().text_content ().empty ());
+ assert (r->any_simple_type_attr () == c->any_simple_type_attr ());
+
+ assert (!r->any_simple_type ().text_content ().empty ());
+ assert (r->any_simple_type () == c->any_simple_type ());
}
catch (xml_schema::exception const& e)
{