summaryrefslogtreecommitdiff
path: root/tests/cxx/tree/naming
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
commitf0510d2f90467de8e8f260b47d79a9baaf9bef17 (patch)
tree0b9929946f06a9cbe9b9e8f2a7600dae4e048f79 /tests/cxx/tree/naming
Start tracking XSD with git
Diffstat (limited to 'tests/cxx/tree/naming')
-rw-r--r--tests/cxx/tree/naming/camel/driver.cxx145
-rw-r--r--tests/cxx/tree/naming/camel/makefile87
-rw-r--r--tests/cxx/tree/naming/camel/test.xsd31
-rw-r--r--tests/cxx/tree/naming/java/driver.cxx145
-rw-r--r--tests/cxx/tree/naming/java/makefile87
-rw-r--r--tests/cxx/tree/naming/java/test.xsd31
-rw-r--r--tests/cxx/tree/naming/knr/driver.cxx145
-rw-r--r--tests/cxx/tree/naming/knr/makefile87
-rw-r--r--tests/cxx/tree/naming/knr/test.xsd31
-rw-r--r--tests/cxx/tree/naming/makefile20
10 files changed, 809 insertions, 0 deletions
diff --git a/tests/cxx/tree/naming/camel/driver.cxx b/tests/cxx/tree/naming/camel/driver.cxx
new file mode 100644
index 0000000..4958e32
--- /dev/null
+++ b/tests/cxx/tree/naming/camel/driver.cxx
@@ -0,0 +1,145 @@
+// file : tests/cxx/tree/naming/camel/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test camel case (upper for types, lower for functions) naming style.
+//
+
+#include <memory> // std::auto_ptr
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ Gender::Value v;
+ v = Gender::female;
+ }
+
+ // Anonymous type.
+ //
+ {
+ Foo f ("a", "b");
+
+ if (f.a () != "a" || f.b () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ Type t ("bar");
+
+ // foo
+ //
+ {
+ Type::FooType* p = 0;
+ Type::FooOptional o;
+
+ if (t.foo ().present ())
+ return 1;
+
+ t.foo (o);
+ }
+
+ // bar
+ //
+ {
+ Type::BarType* p = 0;
+
+ if (t.bar () != "bar")
+ return 1;
+
+ t.bar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ Type::BazType* p = 0;
+ Type::BazSequence s;
+ Type::BazIterator i (s.begin ());
+ Type::BazConstIterator ci (s.begin ());
+
+ if (t.baz () != s)
+ return 1;
+
+ t.baz (s);
+ }
+
+ // any
+ //
+ {
+ Type::AnySequence s (t.domDocument ());
+ Type::AnyIterator i (s.begin ());
+ Type::AnyConstIterator ci (s.begin ());
+
+ if (t.any () != s)
+ return 1;
+
+ t.any (s);
+ }
+
+ // foo
+ //
+ {
+ Type::FoxType x = Type::foxDefaultValue ();
+
+ if (t.fox () != x)
+ return 1;
+
+ t.fox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ Type::AnyAttributeSet s (t.domDocument ());
+ Type::AnyAttributeIterator i (s.begin ());
+ Type::AnyAttributeConstIterator ci (s.begin ());
+
+ if (t.anyAttribute () != s)
+ return 1;
+
+ t.anyAttribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:Root xmlns:t='test'>foo</t:Root>");
+ root (is, xml_schema::Flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::NamespaceInfomap m;
+ m["t"].name = "test";
+
+ root (os, "foo", m);
+ }
+ }
+ catch (xml_schema::Exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/camel/makefile b/tests/cxx/tree/naming/camel/makefile
new file mode 100644
index 0000000..c308a41
--- /dev/null
+++ b/tests/cxx/tree/naming/camel/makefile
@@ -0,0 +1,87 @@
+# file : tests/cxx/tree/naming/camel/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
+
+xsd := test.xsd
+cxx := driver.cxx
+
+obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
+dep := $(obj:.o=.o.d)
+
+driver := $(out_base)/driver
+test := $(out_base)/.test
+clean := $(out_base)/.clean
+
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/libxerces-c/stub.make,\
+ l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
+
+
+# Build.
+#
+$(driver): $(obj) $(xerces_c.l)
+
+$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
+$(obj) $(dep): $(xerces_c.l.cpp-options)
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+--type-naming ucc \
+--function-naming lcc \
+--generate-ostream \
+--generate-serialization \
+--generate-comparison \
+--generate-wildcard
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+
+$(call include-dep,$(dep))
+
+# Convenience alias for default target.
+#
+.PHONY: $(out_base)/
+$(out_base)/: $(driver)
+
+
+# Test.
+#
+.PHONY: $(test)
+
+$(test): driver := $(driver)
+$(test): $(driver)
+ $(call message,test $$1,$$1,$(driver))
+
+# Clean.
+#
+.PHONY: $(clean)
+
+$(clean): $(driver).o.clean \
+ $(addsuffix .cxx.clean,$(obj)) \
+ $(addsuffix .cxx.clean,$(dep)) \
+ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+
+
+# How to.
+#
+$(call include,$(bld_root)/cxx/o-e.make)
+$(call include,$(bld_root)/cxx/cxx-o.make)
+$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
+
+
+# Dependencies.
+#
+$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/camel/test.xsd b/tests/cxx/tree/naming/camel/test.xsd
new file mode 100644
index 0000000..7d0a745
--- /dev/null
+++ b/tests/cxx/tree/naming/camel/test.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <simpleType name="gender">
+ <restriction base="string">
+ <enumeration value="male"/>
+ <enumeration value="female"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="type">
+ <sequence>
+ <element name="foo" minOccurs="0">
+ <complexType>
+ <sequence>
+ <element name="a" type="string"/>
+ <element name="b" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="Bar" type="string"/>
+ <element name="Baz" type="string" maxOccurs="unbounded"/>
+ <any namespace="other" processContents="skip" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Fox" type="string" default="hello"/>
+ <anyAttribute namespace="##other" processContents="skip"/>
+ </complexType>
+
+ <element name="Root" type="string"/>
+
+</schema>
diff --git a/tests/cxx/tree/naming/java/driver.cxx b/tests/cxx/tree/naming/java/driver.cxx
new file mode 100644
index 0000000..413ef70
--- /dev/null
+++ b/tests/cxx/tree/naming/java/driver.cxx
@@ -0,0 +1,145 @@
+// file : tests/cxx/tree/naming/java/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test Java naming style.
+//
+
+#include <memory> // std::auto_ptr
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ Gender::Value v;
+ v = Gender::female;
+ }
+
+ // Anonymous type.
+ //
+ {
+ Foo f ("a", "b");
+
+ if (f.getA () != "a" || f.getB () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ Type t ("bar");
+
+ // foo
+ //
+ {
+ Type::FooType* p = 0;
+ Type::FooOptional o;
+
+ if (t.getFoo ().present ())
+ return 1;
+
+ t.setFoo (o);
+ }
+
+ // bar
+ //
+ {
+ Type::BarType* p = 0;
+
+ if (t.getBar () != "bar")
+ return 1;
+
+ t.setBar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ Type::BazType* p = 0;
+ Type::BazSequence s;
+ Type::BazIterator i (s.begin ());
+ Type::BazConstIterator ci (s.begin ());
+
+ if (t.getBaz () != s)
+ return 1;
+
+ t.setBaz (s);
+ }
+
+ // any
+ //
+ {
+ Type::AnySequence s (t.getDomDocument ());
+ Type::AnyIterator i (s.begin ());
+ Type::AnyConstIterator ci (s.begin ());
+
+ if (t.getAny () != s)
+ return 1;
+
+ t.setAny (s);
+ }
+
+ // foo
+ //
+ {
+ Type::FoxType x = Type::getFoxDefaultValue ();
+
+ if (t.getFox () != x)
+ return 1;
+
+ t.setFox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ Type::AnyAttributeSet s (t.getDomDocument ());
+ Type::AnyAttributeIterator i (s.begin ());
+ Type::AnyAttributeConstIterator ci (s.begin ());
+
+ if (t.getAnyAttribute () != s)
+ return 1;
+
+ t.setAnyAttribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
+ parseRoot (is, xml_schema::Flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::NamespaceInfomap m;
+ m["t"].name = "test";
+
+ serializeRoot (os, "foo", m);
+ }
+ }
+ catch (xml_schema::Exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/java/makefile b/tests/cxx/tree/naming/java/makefile
new file mode 100644
index 0000000..d9258c7
--- /dev/null
+++ b/tests/cxx/tree/naming/java/makefile
@@ -0,0 +1,87 @@
+# file : tests/cxx/tree/naming/java/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
+
+xsd := test.xsd
+cxx := driver.cxx
+
+obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
+dep := $(obj:.o=.o.d)
+
+driver := $(out_base)/driver
+test := $(out_base)/.test
+clean := $(out_base)/.clean
+
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/libxerces-c/stub.make,\
+ l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
+
+
+# Build.
+#
+$(driver): $(obj) $(xerces_c.l)
+
+$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
+$(obj) $(dep): $(xerces_c.l.cpp-options)
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+--type-naming java \
+--function-naming java \
+--generate-ostream \
+--generate-serialization \
+--generate-comparison \
+--generate-wildcard
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+
+$(call include-dep,$(dep))
+
+# Convenience alias for default target.
+#
+.PHONY: $(out_base)/
+$(out_base)/: $(driver)
+
+
+# Test.
+#
+.PHONY: $(test)
+
+$(test): driver := $(driver)
+$(test): $(driver)
+ $(call message,test $$1,$$1,$(driver))
+
+# Clean.
+#
+.PHONY: $(clean)
+
+$(clean): $(driver).o.clean \
+ $(addsuffix .cxx.clean,$(obj)) \
+ $(addsuffix .cxx.clean,$(dep)) \
+ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+
+
+# How to.
+#
+$(call include,$(bld_root)/cxx/o-e.make)
+$(call include,$(bld_root)/cxx/cxx-o.make)
+$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
+
+
+# Dependencies.
+#
+$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/java/test.xsd b/tests/cxx/tree/naming/java/test.xsd
new file mode 100644
index 0000000..f525534
--- /dev/null
+++ b/tests/cxx/tree/naming/java/test.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <simpleType name="gender">
+ <restriction base="string">
+ <enumeration value="male"/>
+ <enumeration value="female"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="type">
+ <sequence>
+ <element name="foo" minOccurs="0">
+ <complexType>
+ <sequence>
+ <element name="a" type="string"/>
+ <element name="b" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="bar" type="string"/>
+ <element name="Baz" type="string" maxOccurs="unbounded"/>
+ <any namespace="other" processContents="skip" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Fox" type="string" default="hello"/>
+ <anyAttribute namespace="##other" processContents="skip"/>
+ </complexType>
+
+ <element name="root" type="string"/>
+
+</schema>
diff --git a/tests/cxx/tree/naming/knr/driver.cxx b/tests/cxx/tree/naming/knr/driver.cxx
new file mode 100644
index 0000000..5db744b
--- /dev/null
+++ b/tests/cxx/tree/naming/knr/driver.cxx
@@ -0,0 +1,145 @@
+// file : tests/cxx/tree/naming/knr/driver.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test K&R naming style.
+//
+
+#include <memory> // std::auto_ptr
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ gender::value v;
+ v = gender::female;
+ }
+
+ // Anonymous type.
+ //
+ {
+ foo f ("a", "b");
+
+ if (f.a () != "a" || f.b () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ type t ("bar");
+
+ // foo
+ //
+ {
+ type::foo_type* p = 0;
+ type::foo_optional o;
+
+ if (t.foo ().present ())
+ return 1;
+
+ t.foo (o);
+ }
+
+ // bar
+ //
+ {
+ type::bar_type* p = 0;
+
+ if (t.bar () != "bar")
+ return 1;
+
+ t.bar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ type::baz_type* p = 0;
+ type::baz_sequence s;
+ type::baz_iterator i (s.begin ());
+ type::baz_const_iterator ci (s.begin ());
+
+ if (t.baz () != s)
+ return 1;
+
+ t.baz (s);
+ }
+
+ // any
+ //
+ {
+ type::any_sequence s (t.dom_document ());
+ type::any_iterator i (s.begin ());
+ type::any_const_iterator ci (s.begin ());
+
+ if (t.any () != s)
+ return 1;
+
+ t.any (s);
+ }
+
+ // foo
+ //
+ {
+ type::fox_type x = type::fox_default_value ();
+
+ if (t.fox () != x)
+ return 1;
+
+ t.fox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ type::any_attribute_set s (t.dom_document ());
+ type::any_attribute_iterator i (s.begin ());
+ type::any_attribute_const_iterator ci (s.begin ());
+
+ if (t.any_attribute () != s)
+ return 1;
+
+ t.any_attribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
+ root (is, xml_schema::flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::namespace_infomap m;
+ m["t"].name = "test";
+
+ root (os, "foo", m);
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/knr/makefile b/tests/cxx/tree/naming/knr/makefile
new file mode 100644
index 0000000..3b92d37
--- /dev/null
+++ b/tests/cxx/tree/naming/knr/makefile
@@ -0,0 +1,87 @@
+# file : tests/cxx/tree/naming/knr/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
+
+xsd := test.xsd
+cxx := driver.cxx
+
+obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
+dep := $(obj:.o=.o.d)
+
+driver := $(out_base)/driver
+test := $(out_base)/.test
+clean := $(out_base)/.clean
+
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/libxerces-c/stub.make,\
+ l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
+
+
+# Build.
+#
+$(driver): $(obj) $(xerces_c.l)
+
+$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
+$(obj) $(dep): $(xerces_c.l.cpp-options)
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd := $(out_root)/xsd/xsd
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): xsd_options := \
+--type-naming knr \
+--function-naming knr \
+--generate-ostream \
+--generate-serialization \
+--generate-comparison \
+--generate-wildcard
+
+$(out_base)/$(xsd:.xsd=.hxx) \
+$(out_base)/$(xsd:.xsd=.ixx) \
+$(out_base)/$(xsd:.xsd=.cxx): $(out_root)/xsd/xsd
+
+$(call include-dep,$(dep))
+
+# Convenience alias for default target.
+#
+.PHONY: $(out_base)/
+$(out_base)/: $(driver)
+
+
+# Test.
+#
+.PHONY: $(test)
+
+$(test): driver := $(driver)
+$(test): $(driver)
+ $(call message,test $$1,$$1,$(driver))
+
+# Clean.
+#
+.PHONY: $(clean)
+
+$(clean): $(driver).o.clean \
+ $(addsuffix .cxx.clean,$(obj)) \
+ $(addsuffix .cxx.clean,$(dep)) \
+ $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
+
+
+# How to.
+#
+$(call include,$(bld_root)/cxx/o-e.make)
+$(call include,$(bld_root)/cxx/cxx-o.make)
+$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
+
+
+# Dependencies.
+#
+$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/knr/test.xsd b/tests/cxx/tree/naming/knr/test.xsd
new file mode 100644
index 0000000..4361544
--- /dev/null
+++ b/tests/cxx/tree/naming/knr/test.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test">
+
+ <simpleType name="gender">
+ <restriction base="string">
+ <enumeration value="male"/>
+ <enumeration value="female"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="type">
+ <sequence>
+ <element name="foo" minOccurs="0">
+ <complexType>
+ <sequence>
+ <element name="a" type="string"/>
+ <element name="b" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="bar" type="string"/>
+ <element name="baz" type="string" maxOccurs="unbounded"/>
+ <any namespace="other" processContents="skip" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="fox" type="string" default="hello"/>
+ <anyAttribute namespace="##other" processContents="skip"/>
+ </complexType>
+
+ <element name="root" type="string"/>
+
+</schema>
diff --git a/tests/cxx/tree/naming/makefile b/tests/cxx/tree/naming/makefile
new file mode 100644
index 0000000..8a70665
--- /dev/null
+++ b/tests/cxx/tree/naming/makefile
@@ -0,0 +1,20 @@
+# file : tests/cxx/tree/naming/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
+
+tests := camel java knr
+
+default := $(out_base)/
+test := $(out_base)/.test
+clean := $(out_base)/.clean
+
+.PHONY: $(default) $(test) $(clean)
+
+$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
+$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
+$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
+
+$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))