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 2defa4b
Show file tree
Hide file tree
Showing 2 changed files with 94 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
82 changes: 82 additions & 0 deletions IDL/unions.idl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,88 @@ union Union_Several_Fields_With_Default switch (long)
sequence<short, 30> f;
};

struct StructForUnionTest
{
short var_short;
};

struct StructForUnionTestBis
{
short var_short;
};

union ContentUnionSeq switch (long)
{
case 0:
sequence<StructForUnionTest> a;
};

union ContentUnionSeqBis switch (long)
{
case 0:
sequence<StructForUnionTestBis> a;
};

union ContentUnionBigSeq switch (long)
{
case 0:
sequence<StructForUnionTest, 1000> a;
};

union ContentUnionBigSeqBis switch (long)
{
case 0:
sequence<StructForUnionTestBis, 1000> a;
};

union ContentUnionMap switch (long)
{
case 0:
map<short, StructForUnionTest> a;
};

union ContentUnionMapBis switch (long)
{
case 0:
map<short, StructForUnionTestBis> a;
};

union ContentUnionBigMap switch (long)
{
case 0:
map<short, StructForUnionTest, 1000> a;
};

union ContentUnionBigMapBis switch (long)
{
case 0:
map<short, StructForUnionTestBis, 1000> a;
};

union ContentUnionArray switch (long)
{
case 0:
StructForUnionTest a[10];
};

union ContentUnionArrayBis switch (long)
{
case 0:
StructForUnionTestBis a[10];
};

union ContentUnionBigArray switch (long)
{
case 0:
StructForUnionTest a[1000];
};

union ContentUnionBigArrayBis switch (long)
{
case 0:
StructForUnionTestBis a[1000];
};

struct UnionShort
{
Union_Short var_union_short;
Expand Down

0 comments on commit 2defa4b

Please sign in to comment.