diff -r -c -N ../Ice-3.5.0/cpp/src/Slice/Checksum.cpp ./cpp/src/Slice/Checksum.cpp *** ../Ice-3.5.0/cpp/src/Slice/Checksum.cpp 2013-06-05 11:13:29.000000000 +0200 --- ./cpp/src/Slice/Checksum.cpp 2013-07-26 13:58:57.000000000 +0200 *************** *** 9,14 **** --- 9,15 ---- #include #include + #include using namespace std; using namespace Slice; *************** *** 65,72 **** --- 66,79 ---- { ostr << "class "; } + ostr << p->name(); + if(p->compactId() >= 0) + { + ostr << '(' << p->compactId() << ')'; + } + if(!bases.empty()) { if(!bases.front()->isInterface()) *************** *** 99,107 **** if(p->hasDataMembers()) { DataMemberList members = p->dataMembers(); for(DataMemberList::iterator q = members.begin(); q != members.end(); ++q) { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->name() << endl; } } --- 106,143 ---- if(p->hasDataMembers()) { DataMemberList members = p->dataMembers(); + DataMemberList optionals; for(DataMemberList::iterator q = members.begin(); q != members.end(); ++q) { ! if((*q)->optional()) ! { ! optionals.push_back(*q); ! } ! else ! { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->name() << endl; ! } ! } ! ! if(!optionals.empty()) ! { ! // ! // Sort optional parameters by tag. ! // ! class SortFn ! { ! public: ! static bool compare(const DataMemberPtr& lhs, const DataMemberPtr& rhs) ! { ! return lhs->tag() < rhs->tag(); ! } ! }; ! optionals.sort(SortFn::compare); ! ! for(DataMemberList::iterator q = optionals.begin(); q != optionals.end(); ++q) ! { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->tag() << ' ' << (*q)->name(); ! } } } *************** *** 110,129 **** OperationList ops = p->operations(); for(OperationList::iterator q = ops.begin(); q != ops.end(); ++q) { ! ostr << typeToString((*q)->returnType()) << ' ' << (*q)->name() << '('; ParamDeclList params = (*q)->parameters(); for(ParamDeclList::iterator r = params.begin(); r != params.end(); ++r) { ! if(r != params.begin()) { ! ostr << ", "; } ! if((*r)->isOutParam()) { ! ostr << "out "; } - ostr << typeToString((*r)->type()) << ' ' << (*r)->name(); } ostr << ')'; ExceptionList ex = (*q)->throws(); if(!ex.empty()) --- 146,208 ---- OperationList ops = p->operations(); for(OperationList::iterator q = ops.begin(); q != ops.end(); ++q) { ! ostr << typeToString((*q)->returnType()) << ' '; ! if((*q)->returnIsOptional()) ! { ! ostr << (*q)->returnTag() << ' '; ! } ! ostr << (*q)->name() << '('; ParamDeclList params = (*q)->parameters(); + ParamDeclList optionals; for(ParamDeclList::iterator r = params.begin(); r != params.end(); ++r) { ! if((*r)->optional()) { ! optionals.push_back(*r); } ! else { ! if(r != params.begin()) ! { ! ostr << ", "; ! } ! if((*r)->isOutParam()) ! { ! ostr << "out "; ! } ! ostr << typeToString((*r)->type()) << ' ' << (*r)->name(); } } + + if(!optionals.empty()) + { + // + // Sort optional parameters by tag. + // + class SortFn + { + public: + static bool compare(const ParamDeclPtr& lhs, const ParamDeclPtr& rhs) + { + return lhs->tag() < rhs->tag(); + } + }; + optionals.sort(SortFn::compare); + + for(ParamDeclList::iterator r = optionals.begin(); r != optionals.end(); ++r) + { + if(r != optionals.begin() || params.size() > optionals.size()) + { + ostr << ", "; + } + if((*r)->isOutParam()) + { + ostr << "out "; + } + ostr << typeToString((*r)->type()) << ' ' << (*r)->tag() << ' ' << (*r)->name(); + } + } + ostr << ')'; ExceptionList ex = (*q)->throws(); if(!ex.empty()) *************** *** 167,175 **** ostr << endl; DataMemberList members = p->dataMembers(); for(DataMemberList::iterator q = members.begin(); q != members.end(); ++q) { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->name() << endl; } updateMap(p->scoped(), ostr.str()); --- 246,283 ---- ostr << endl; DataMemberList members = p->dataMembers(); + DataMemberList optionals; for(DataMemberList::iterator q = members.begin(); q != members.end(); ++q) { ! if((*q)->optional()) ! { ! optionals.push_back(*q); ! } ! else ! { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->name() << endl; ! } ! } ! ! if(!optionals.empty()) ! { ! // ! // Sort optional parameters by tag. ! // ! class SortFn ! { ! public: ! static bool compare(const DataMemberPtr& lhs, const DataMemberPtr& rhs) ! { ! return lhs->tag() < rhs->tag(); ! } ! }; ! optionals.sort(SortFn::compare); ! ! for(DataMemberList::iterator q = optionals.begin(); q != optionals.end(); ++q) ! { ! ostr << typeToString((*q)->type()) << ' ' << (*q)->tag() << ' ' << (*q)->name(); ! } } updateMap(p->scoped(), ostr.str()); *************** *** 239,250 **** ostr << "enum " << p->name() << endl; EnumeratorList enums = p->getEnumerators(); ! for(EnumeratorList::iterator q = enums.begin(); q != enums.end(); ++q) { ! ostr << (*q)->name() << endl; } - updateMap(p->scoped(), ostr.str()); } --- 347,384 ---- ostr << "enum " << p->name() << endl; + // + // Check if any of the enumerators were assigned an explicit value. + // + const bool explicitValue = p->explicitValue(); + EnumeratorList enums = p->getEnumerators(); ! if(explicitValue) { ! // ! // Sort enumerators by value. ! // ! class SortFn ! { ! public: ! static bool compare(const EnumeratorPtr& lhs, const EnumeratorPtr& rhs) ! { ! return lhs->value() < rhs->value(); ! } ! }; ! enums.sort(SortFn::compare); ! for(EnumeratorList::iterator q = enums.begin(); q != enums.end(); ++q) ! { ! ostr << (*q)->name() << ' ' << IceUtilInternal::int64ToString((*q)->value()) << endl; ! } ! } ! else ! { ! for(EnumeratorList::iterator q = enums.begin(); q != enums.end(); ++q) ! { ! ostr << (*q)->name() << endl; ! } } updateMap(p->scoped(), ostr.str()); } diff -r -c -N ../Ice-3.5.0/cpp/test/Ice/checksum/server/Types.ice ./cpp/test/Ice/checksum/server/Types.ice *** ../Ice-3.5.0/cpp/test/Ice/checksum/server/Types.ice 2013-06-05 11:13:29.000000000 +0200 --- ./cpp/test/Ice/checksum/server/Types.ice 2013-07-26 13:58:57.000000000 +0200 *************** *** 43,48 **** --- 43,68 ---- enum Enum3 { Enum32, Enum33 }; // + // 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, EnumExplicit13 = 3, EnumExplicit12 = 2 }; + + // + // TEST: Enum with different explicit values. + // + enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 3, EnumExplicit23 }; + + // + // TEST: Enum with explicit values, removed enumerator. + // + enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2}; + + // // TEST: Change to a different type // class Enum4 {}; *************** *** 302,307 **** --- 322,378 ---- class Exception6 {}; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 400,405 **** --- 471,604 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(3) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Class with different optional members. + // + class Optional2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Class with different optional members. + // + class Optional3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Class with optional members using different tags. + // + class Optional4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Class with optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/cpp/test/Ice/checksum/Types.ice ./cpp/test/Ice/checksum/Types.ice *** ../Ice-3.5.0/cpp/test/Ice/checksum/Types.ice 2013-06-05 11:13:29.000000000 +0200 --- ./cpp/test/Ice/checksum/Types.ice 2013-07-26 13:58:57.000000000 +0200 *************** *** 48,53 **** --- 48,73 ---- 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 Sequence1; *************** *** 306,311 **** --- 326,381 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 405,410 **** --- 475,607 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; *************** *** 435,438 **** }; }; - --- 632,634 ---- diff -r -c -N ../Ice-3.5.0/cs/test/Ice/checksum/server/Types.ice ./cs/test/Ice/checksum/server/Types.ice *** ../Ice-3.5.0/cs/test/Ice/checksum/server/Types.ice 2013-06-05 11:13:30.000000000 +0200 --- ./cs/test/Ice/checksum/server/Types.ice 2013-07-26 13:58:57.000000000 +0200 *************** *** 43,48 **** --- 43,68 ---- enum Enum3 { Enum32, Enum33 }; // + // 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, EnumExplicit13 = 3, EnumExplicit12 = 2 }; + + // + // TEST: Enum with different explicit values. + // + enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 3, EnumExplicit23 }; + + // + // TEST: Enum with explicit values, removed enumerator. + // + enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2}; + + // // TEST: Change to a different type // class Enum4 {}; *************** *** 302,307 **** --- 322,378 ---- class Exception6 {}; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 400,405 **** --- 471,604 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(3) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Class with different optional members. + // + class Optional2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Class with different optional members. + // + class Optional3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Class with optional members using different tags. + // + class Optional4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Class with optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/cs/test/Ice/checksum/Types.ice ./cs/test/Ice/checksum/Types.ice *** ../Ice-3.5.0/cs/test/Ice/checksum/Types.ice 2013-06-05 11:13:30.000000000 +0200 --- ./cs/test/Ice/checksum/Types.ice 2013-07-26 13:58:57.000000000 +0200 *************** *** 48,53 **** --- 48,73 ---- 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 Sequence1; *************** *** 306,311 **** --- 326,381 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 405,410 **** --- 475,607 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/java/test/Ice/checksum/Types.ice ./java/test/Ice/checksum/Types.ice *** ../Ice-3.5.0/java/test/Ice/checksum/Types.ice 2013-06-05 11:13:30.000000000 +0200 --- ./java/test/Ice/checksum/Types.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 49,54 **** --- 49,74 ---- 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 Sequence1; *************** *** 307,312 **** --- 327,382 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 406,411 **** --- 476,608 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/java/test/Ice/checksum/TypesServer.ice ./java/test/Ice/checksum/TypesServer.ice *** ../Ice-3.5.0/java/test/Ice/checksum/TypesServer.ice 2013-06-05 11:13:30.000000000 +0200 --- ./java/test/Ice/checksum/TypesServer.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 44,49 **** --- 44,69 ---- enum Enum3 { Enum32, Enum33 }; // + // 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, EnumExplicit13 = 3, EnumExplicit12 = 2 }; + + // + // TEST: Enum with different explicit values. + // + enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 3, EnumExplicit23 }; + + // + // TEST: Enum with explicit values, removed enumerator. + // + enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2}; + + // // TEST: Change to a different type // class Enum4 {}; *************** *** 303,308 **** --- 323,379 ---- class Exception6 {}; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 401,406 **** --- 472,605 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(3) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Class with different optional members. + // + class Optional2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Class with different optional members. + // + class Optional3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Class with optional members using different tags. + // + class Optional4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Class with optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/php/test/Ice/checksum/CTypes.ice ./php/test/Ice/checksum/CTypes.ice *** ../Ice-3.5.0/php/test/Ice/checksum/CTypes.ice 2013-06-05 11:13:30.000000000 +0200 --- ./php/test/Ice/checksum/CTypes.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 48,53 **** --- 48,73 ---- 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 Sequence1; *************** *** 306,311 **** --- 326,381 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 405,410 **** --- 475,607 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/py/test/Ice/checksum/CTypes.ice ./py/test/Ice/checksum/CTypes.ice *** ../Ice-3.5.0/py/test/Ice/checksum/CTypes.ice 2013-06-05 11:13:30.000000000 +0200 --- ./py/test/Ice/checksum/CTypes.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 48,53 **** --- 48,73 ---- 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 Sequence1; *************** *** 306,311 **** --- 326,381 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 405,410 **** --- 475,607 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/py/test/Ice/checksum/STypes.ice ./py/test/Ice/checksum/STypes.ice *** ../Ice-3.5.0/py/test/Ice/checksum/STypes.ice 2013-06-05 11:13:30.000000000 +0200 --- ./py/test/Ice/checksum/STypes.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 43,48 **** --- 43,68 ---- enum Enum3 { Enum32, Enum33 }; // + // 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, EnumExplicit13 = 3, EnumExplicit12 = 2 }; + + // + // TEST: Enum with different explicit values. + // + enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 3, EnumExplicit23 }; + + // + // TEST: Enum with explicit values, removed enumerator. + // + enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2}; + + // // TEST: Change to a different type // class Enum4 {}; *************** *** 302,307 **** --- 322,378 ---- class Exception6 {}; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 400,405 **** --- 471,604 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(3) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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(2) string emailAddress; + optional(1) string secondName; + }; + + // + // TEST: Class with different optional members. + // + class Optional2 + { + string firstName; + optional(1) string secondName; + string emailAddress; + }; + + // + // TEST: Class with different optional members. + // + class Optional3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + optional(3) string phoneNumber; + }; + + // + // TEST: Class with optional members using different tags. + // + class Optional4 + { + string firstName; + optional(2) string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Class with optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(2) string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, string emailAddress, + optional(1) string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }; diff -r -c -N ../Ice-3.5.0/rb/test/Ice/checksum/CTypes.ice ./rb/test/Ice/checksum/CTypes.ice *** ../Ice-3.5.0/rb/test/Ice/checksum/CTypes.ice 2013-06-05 11:13:30.000000000 +0200 --- ./rb/test/Ice/checksum/CTypes.ice 2013-07-26 13:58:58.000000000 +0200 *************** *** 48,53 **** --- 48,73 ---- 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 Sequence1; *************** *** 306,311 **** --- 326,381 ---- }; // + // TEST: Exception with optional members. + // + exception OptionalEx0 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members, different order, same tags. + // + exception OptionalEx1 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx2 + { + string firstName; + string secondName; + optional(1) string emailAddress; + }; + + // + // TEST: Exception with different optional members. + // + exception OptionalEx3 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // + // TEST: Exception with optional members using different tags. + // + exception OptionalEx4 + { + string firstName; + optional(1) string secondName; + optional(2) string emailAddress; + }; + + // // TEST: Same // class BaseClass1 *************** *** 405,410 **** --- 475,607 ---- }; // + // TEST: Class with compact id + // + class Compact1(1) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // TEST: Derived from class with compact id + // + class Derived1 extends Compact1 + { + }; + + // + // TEST: Same class names but different compact id + // + class Compact2(2) + { + void baseOp(); + void baseOp2(int i, out string s) throws Exception1; + }; + + // + // 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 optional parameters. + // + class OptionalParameters0 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different order. + // + class OptionalParameters1 + { + void op1(string firstName, optional(1) string secondName, + optional(2) string emailAddress); + }; + + // + // TEST: Class with optional parameters, different tags. + // + class OptionalParameters2 + { + void op1(string firstName, optional(1) string emailAddress, + optional(2) string secondName); + }; + + // + // TEST: Class with different optional parameters. + // + class OptionalParameters3 + { + void op1(string firstName, optional(1) string emailAddress, + string secondName); + }; + + // + // TEST: Class with optional return type. + // + class OptionalReturn0 + { + optional(1) int op(); + }; + + // + // TEST: Class that changes optional return type. + // + class OptionalReturn2 + { + optional(1) int op(); + }; + + // // TEST: Local // local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 };