summaryrefslogtreecommitdiff
path: root/tests/cxx/tree/enumeration/ctor/driver.cxx
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/enumeration/ctor/driver.cxx
Start tracking XSD with git
Diffstat (limited to 'tests/cxx/tree/enumeration/ctor/driver.cxx')
-rw-r--r--tests/cxx/tree/enumeration/ctor/driver.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/cxx/tree/enumeration/ctor/driver.cxx b/tests/cxx/tree/enumeration/ctor/driver.cxx
new file mode 100644
index 0000000..238d446
--- /dev/null
+++ b/tests/cxx/tree/enumeration/ctor/driver.cxx
@@ -0,0 +1,32 @@
+// file : tests/cxx/tree/enumeration/ctor/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 enumeration constructors.
+//
+#include <string>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Test ctor(const char*).
+ //
+ {
+ string_enum se ("a");
+ type t ("a", 1);
+ }
+
+ // Test ctor(const std::string&)
+ //
+ {
+ string const s ("c");
+ string_enum se (s);
+ type t (s, 3);
+ }
+}