Searched hist:"40 e350f0" (Results 1 – 2 of 2) sorted by relevance
/qemu/tests/qapi-schema/ |
H A D | qapi-schema-test.json | 40e350f0 Thu Mar 16 07:13:21 GMT 2023 Markus Armbruster <armbru@redhat.com> tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
generates
#if defined(TEST_IF_ENUM) typedef enum TestIfEnum { TEST_IF_ENUM_FOO, #if defined(TEST_IF_ENUM_BAR) TEST_IF_ENUM_BAR, #endif /* defined(TEST_IF_ENUM_BAR) */ TEST_IF_ENUM__MAX, } TestIfEnum;
Macro TEST_IF_ENUM_BAR clashes with the enumeration constant. Wouldn't compile with -DTEST_IF_BAR.
Rename the macro to TEST_IF_ENUM_MEMBER. For consistency, rename similar macros elsewhere as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> 40e350f0 Thu Mar 16 07:13:21 GMT 2023 Markus Armbruster <armbru@redhat.com> tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
generates
#if defined(TEST_IF_ENUM) typedef enum TestIfEnum { TEST_IF_ENUM_FOO, #if defined(TEST_IF_ENUM_BAR) TEST_IF_ENUM_BAR, #endif /* defined(TEST_IF_ENUM_BAR) */ TEST_IF_ENUM__MAX, } TestIfEnum;
Macro TEST_IF_ENUM_BAR clashes with the enumeration constant. Wouldn't compile with -DTEST_IF_BAR.
Rename the macro to TEST_IF_ENUM_MEMBER. For consistency, rename similar macros elsewhere as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
H A D | qapi-schema-test.out | 40e350f0 Thu Mar 16 07:13:21 GMT 2023 Markus Armbruster <armbru@redhat.com> tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
generates
#if defined(TEST_IF_ENUM) typedef enum TestIfEnum { TEST_IF_ENUM_FOO, #if defined(TEST_IF_ENUM_BAR) TEST_IF_ENUM_BAR, #endif /* defined(TEST_IF_ENUM_BAR) */ TEST_IF_ENUM__MAX, } TestIfEnum;
Macro TEST_IF_ENUM_BAR clashes with the enumeration constant. Wouldn't compile with -DTEST_IF_BAR.
Rename the macro to TEST_IF_ENUM_MEMBER. For consistency, rename similar macros elsewhere as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> 40e350f0 Thu Mar 16 07:13:21 GMT 2023 Markus Armbruster <armbru@redhat.com> tests/qapi-schema: Rename a few conditionals
Positive test case
{ 'enum': 'TestIfEnum', 'data': [ 'foo', { 'name' : 'bar', 'if': 'TEST_IF_ENUM_BAR' } ], 'if': 'TEST_IF_ENUM' }
generates
#if defined(TEST_IF_ENUM) typedef enum TestIfEnum { TEST_IF_ENUM_FOO, #if defined(TEST_IF_ENUM_BAR) TEST_IF_ENUM_BAR, #endif /* defined(TEST_IF_ENUM_BAR) */ TEST_IF_ENUM__MAX, } TestIfEnum;
Macro TEST_IF_ENUM_BAR clashes with the enumeration constant. Wouldn't compile with -DTEST_IF_BAR.
Rename the macro to TEST_IF_ENUM_MEMBER. For consistency, rename similar macros elsewhere as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230316071325.492471-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|