summaryrefslogtreecommitdiff
path: root/php/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-07-25 19:24:18 +0200
committerJose <jose@zeroc.com>2013-07-25 19:24:18 +0200
commitf07348f395a6eeecae963953f19fdb4b746e536a (patch)
tree76f05767ec82d257a6584a5dcfab34488929cdee /php/test
parentMinor build rules fix (diff)
downloadice-f07348f395a6eeecae963953f19fdb4b746e536a.tar.bz2
ice-f07348f395a6eeecae963953f19fdb4b746e536a.tar.xz
ice-f07348f395a6eeecae963953f19fdb4b746e536a.zip
Fixes for optionals and enums with explicit values in checksum calculations.
Diffstat (limited to 'php/test')
-rw-r--r--php/test/Ice/checksum/CTypes.ice122
1 files changed, 122 insertions, 0 deletions
diff --git a/php/test/Ice/checksum/CTypes.ice b/php/test/Ice/checksum/CTypes.ice
index 9fd0245f152..e8f3a7798ec 100644
--- a/php/test/Ice/checksum/CTypes.ice
+++ b/php/test/Ice/checksum/CTypes.ice
@@ -48,6 +48,26 @@ enum Enum3 { Enum31, Enum32, Enum33 };
enum Enum4 { Enum41, Enum42, Enum43 };
//
+// TEST: Enum with explicit values.
+//
+enum EnumExplicit0 { EnumExplicit01 = 1, EnumExplicit02 = 2, EnumExplicit03 = 3 };
+
+//
+// TEST: Enum with same explicit values different order.
+//
+enum EnumExplicit1 { EnumExplicit11 = 1, EnumExplicit12 = 2, EnumExplicit13 = 3 };
+
+//
+// TEST: Enum with different explicit values.
+//
+enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 2, EnumExplicit23 = 3};
+
+//
+// TEST: Enum with explicit values removed enumerator.
+//
+enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2, EnumExplicit33 = 3};
+
+//
// TEST: Same
//
sequence<int> Sequence1;
@@ -437,6 +457,108 @@ class Derived2 extends Compact2
};
//
+// TEST: Class with optional members.
+//
+class Optional0
+{
+ string firstName;
+ optional(1) string secondName;
+ optional(2) string emailAddress;
+};
+
+//
+// TEST: Class with optional members different order same tags.
+//
+class Optional1
+{
+ string firstName;
+ optional(1) string secondName;
+ optional(2) string emailAddress;
+};
+
+//
+// TEST: Class with different optional members.
+//
+class Optional2
+{
+ string firstName;
+ string secondName;
+ optional(1) string emailAddress;
+};
+
+//
+// TEST: Class with different optional members.
+//
+class Optional3
+{
+ string firstName;
+ optional(1) string secondName;
+ optional(2) string emailAddress;
+};
+
+//
+// TEST: Class with optional members using different tags.
+//
+class Optional4
+{
+ string firstName;
+ optional(1) string secondName;
+ optional(2) string emailAddress;
+};
+
+//
+// TEST: Class with operation optional parameters.
+//
+class OptionalParameters0
+{
+ void op1(string firstName, optional(1) string secondName,
+ optional(2) string emailAddress);
+};
+
+//
+// TEST: Class with operation optional parameters different order.
+//
+class OptionalParameters1
+{
+ void op1(string firstName, optional(1) string secondName,
+ optional(2) string emailAddress);
+};
+
+//
+// TEST: Class with operation optional parameters different tags.
+//
+class OptionalParameters2
+{
+ void op1(string firstName, optional(1) string emailAddress,
+ optional(2) string secondName);
+};
+
+//
+// TEST: Class with operation different optional parameters.
+//
+class OptionalParameters3
+{
+ void op1(string firstName, optional(1) string emailAddress,
+ string secondName);
+};
+
+//
+// TEST: Class with operation optional return type.
+//
+class OptionalReturn0
+{
+ optional(1) int op();
+};
+
+//
+// TEST: Class that change operation optional return type.
+//
+class OptionalReturn2
+{
+ optional(1) int op();
+};
+
+//
// TEST: Local
//
local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 };