aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-04-02 16:58:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-04-02 16:58:01 +0200
commitb76292f8f22817401f61158a42afcfc210102657 (patch)
tree956bdc5cbedec35e0d75f4360c68274afd1786b0 /tests
parent8336dd4c16d4885989a6d8f0c83a4b401f5cb63b (diff)
Fix type alignment code to examine all members of a type
The alignment of a type is the alignment of its most strictly aligned member.
Diffstat (limited to 'tests')
-rw-r--r--tests/cxx/hybrid/choice/driver.cxx2
-rw-r--r--tests/cxx/hybrid/choice/test.xsd1
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/cxx/hybrid/choice/driver.cxx b/tests/cxx/hybrid/choice/driver.cxx
index 0ba13de..b781e24 100644
--- a/tests/cxx/hybrid/choice/driver.cxx
+++ b/tests/cxx/hybrid/choice/driver.cxx
@@ -35,6 +35,8 @@ main (int argc, char* argv[])
y.a (123);
z = y;
assert (z.a () == 123);
+ z.c (123456789);
+ assert (z.c () == 123456789);
}
#endif
diff --git a/tests/cxx/hybrid/choice/test.xsd b/tests/cxx/hybrid/choice/test.xsd
index 9fe5f5c..2b8dbf6 100644
--- a/tests/cxx/hybrid/choice/test.xsd
+++ b/tests/cxx/hybrid/choice/test.xsd
@@ -26,6 +26,7 @@
<choice>
<element name="a" type="int"/>
<element name="b" type="string"/>
+ <element name="c" type="long"/>
</choice>
</complexType>