Skip to content

Commit

Permalink
Refs #20421: Added cases for unions
Browse files Browse the repository at this point in the history
Signed-off-by: adriancampo <[email protected]>
  • Loading branch information
adriancampo committed Mar 25, 2024
1 parent eb5b513 commit a4503b3
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 12 deletions.
24 changes: 12 additions & 12 deletions IDL/structures.idl
Original file line number Diff line number Diff line change
Expand Up @@ -170,51 +170,51 @@ struct StructShortBis
short var_short;
};

struct ContentSeqStruct {
struct ContentStructSeqStruct {
sequence<StructShort> var_seq;
};

struct ContentSeqStructBis {
struct ContentStructSeqStructBis {
sequence<StructShortBis> var_seq;
};

struct ContentBigSeqStruct {
struct ContentStructBigSeqStruct {
sequence<StructShort, 1000> var_seq;
};

struct ContentBigSeqStructBis {
struct ContentStructBigSeqStructBis {
sequence<StructShortBis, 1000> var_seq;
};

struct ContentMapStruct {
struct ContentStructMapStruct {
map<short, StructShort> var_map;
};

struct ContentMapStructBis {
struct ContentStructMapStructBis {
map<short, StructShortBis> var_map;
};

struct ContentBigMapStruct {
struct ContentStructBigMapStruct {
map<short, StructShort, 1000> var_map;
};

struct ContentBigMapStructBis {
struct ContentStructBigMapStructBis {
map<short, StructShortBis, 1000> var_map;
};

struct ContentArrayStruct {
struct ContentStructArrayStruct {
StructShort var_array[10];
};

struct ContentArrayStructBis {
struct ContentStructArrayStructBis {
StructShortBis var_array[10];
};

struct ContentBigArrayStruct {
struct ContentStructBigArrayStruct {
StructShort var_array[1000];
};

struct ContentBigArrayStructBis {
struct ContentStructBigArrayStructBis {
StructShortBis var_array[1000];
};

Expand Down
54 changes: 54 additions & 0 deletions IDL/unions.idl
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,57 @@ struct UnionSeveralFieldsWithDefault
{
Union_Several_Fields_With_Default var_union_several_fields_with_default;
};

union Union_ShortBis switch (long)
{
case 0:
short a;
};

struct ContentUnionSeqStruct {
sequence<Union_Short> var_seq;
};

struct ContentUnionSeqStructBis {
sequence<Union_ShortBis> var_seq;
};

struct ContentUnionBigSeqStruct {
sequence<Union_Short, 1000> var_seq;
};

struct ContentUnionBigSeqStructBis {
sequence<Union_ShortBis, 1000> var_seq;
};

struct ContentUnionMapStruct {
map<short, Union_Short> var_map;
};

struct ContentUnionMapStructBis {
map<short, Union_ShortBis> var_map;
};

struct ContentUnionBigMapStruct {
map<short, Union_Short, 1000> var_map;
};

struct ContentUnionBigMapStructBis {
map<short, Union_ShortBis, 1000> var_map;
};

struct ContentUnionArrayStruct {
Union_Short var_array[10];
};

struct ContentUnionArrayStructBis {
Union_ShortBis var_array[10];
};

struct ContentUnionBigArrayStruct {
Union_Short var_array[1000];
};

struct ContentUnionBigArrayStructBis {
Union_ShortBis var_array[1000];
};

0 comments on commit a4503b3

Please sign in to comment.