Skip to content

Commit 5d92193

Browse files
Fix custom feature IDL files (#5903)
* Fix identifier in `extra_structures.idl` Signed-off-by: Miguel Company <[email protected]> * Update regeneration script Signed-off-by: Miguel Company <[email protected]> * Also fix extra_unions.idl Signed-off-by: Miguel Company <[email protected]> * Fix module name in unit test Signed-off-by: Carlosespicur <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]> Signed-off-by: Carlosespicur <[email protected]> Co-authored-by: Carlosespicur <[email protected]>
1 parent da0e9ed commit 5d92193

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

test/feature/idl_parser/IdlParserTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ TEST_F(IdlParserTests, structures)
471471

472472
DynamicTypeBuilder::_ref_type builder37 = factory->create_type_w_uri(
473473
"IDL/extra_structures.idl",
474-
"Module::ScopedNamesStruct",
474+
"MyModule::ScopedNamesStruct",
475475
include_paths);
476476
EXPECT_TRUE(builder37);
477477
DynamicType::_ref_type type37 = builder37->build();

test/feature/idl_parser/idl_extra_cases/extra_structures.idl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ module Outer
2626
};
2727

2828
// Check resolution of relative and absolute scoped names
29-
module Module
29+
module MyModule
3030
{
3131
typedef float FloatAlias;
3232

3333
struct ScopedNamesStruct
3434
{
35-
Module::FloatAlias absolute_scoped_float;
36-
::Module::FloatAlias absolute_scoped_w_root_float;
35+
MyModule::FloatAlias absolute_scoped_float;
36+
::MyModule::FloatAlias absolute_scoped_w_root_float;
3737
FloatAlias relative_scoped_float;
3838
};
3939
};

test/feature/idl_parser/idl_extra_cases/extra_unions.idl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Union with scoped discriminator
2-
module Module
2+
module MyModule
33
{
44
enum ScopedEnumHelper
55
{
@@ -9,11 +9,11 @@ module Module
99
};
1010
};
1111

12-
union UnionScopedDiscriminator switch (Module::ScopedEnumHelper)
12+
union UnionScopedDiscriminator switch (MyModule::ScopedEnumHelper)
1313
{
14-
case Module::ENUM_VALUE_1:
14+
case MyModule::ENUM_VALUE_1:
1515
long first;
16-
case Module::ENUM_VALUE_2:
16+
case MyModule::ENUM_VALUE_2:
1717
long long second;
1818
default:
1919
octet third;

utils/scripts/update_generated_code_from_idl.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
set -e
44

55
files_to_exclude=(
6-
'./thirdparty/dds-types-test/IDL/relative_path_include.idl' # Relative path not working in current location.
7-
'./test/feature/idl_parser/no_path_included.idl' # Relative path not working in current location.
6+
'./thirdparty/dds-types-test/IDL/relative_path_include.idl' # Relative path not working in current location.
7+
'./test/feature/idl_parser/no_path_included.idl' # Relative path not working in current location.
8+
'./test/feature/idl_parser/idl_extra_cases/extra_structures.idl' # Contains features not supported by IDL parser (scoped name beginning with double colon).
89
)
910

1011
files_not_needing_typeobject=(

0 commit comments

Comments
 (0)