|
@@ -242,3 +242,42 @@
|
|
|
{ 'foo': 'TestIfStruct',
|
|
|
'bar': { 'type': ['TestIfEnum'], 'if': 'defined(TEST_IF_EVT_BAR)' } },
|
|
|
'if': 'defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)' }
|
|
|
+
|
|
|
+# test 'features' for structs
|
|
|
+
|
|
|
+{ 'struct': 'FeatureStruct0',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [] }
|
|
|
+{ 'struct': 'FeatureStruct1',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ 'feature1' ] }
|
|
|
+{ 'struct': 'FeatureStruct2',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ { 'name': 'feature1' } ] }
|
|
|
+{ 'struct': 'FeatureStruct3',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ 'feature1', 'feature2' ] }
|
|
|
+{ 'struct': 'FeatureStruct4',
|
|
|
+ 'data': { 'namespace-test': 'int' },
|
|
|
+ 'features': [ 'namespace-test', 'int', 'name', 'if' ] }
|
|
|
+
|
|
|
+{ 'struct': 'CondFeatureStruct1',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ { 'name': 'feature1', 'if': 'defined(TEST_IF_FEATURE_1)'} ] }
|
|
|
+{ 'struct': 'CondFeatureStruct2',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ { 'name': 'feature1', 'if': 'defined(TEST_IF_FEATURE_1)'},
|
|
|
+ { 'name': 'feature2', 'if': 'defined(TEST_IF_FEATURE_2)'} ] }
|
|
|
+{ 'struct': 'CondFeatureStruct3',
|
|
|
+ 'data': { 'foo': 'int' },
|
|
|
+ 'features': [ { 'name': 'feature1', 'if': [ 'defined(TEST_IF_COND_1)',
|
|
|
+ 'defined(TEST_IF_COND_2)'] } ] }
|
|
|
+{ 'command': 'test-features',
|
|
|
+ 'data': { 'fs0': 'FeatureStruct0',
|
|
|
+ 'fs1': 'FeatureStruct1',
|
|
|
+ 'fs2': 'FeatureStruct2',
|
|
|
+ 'fs3': 'FeatureStruct3',
|
|
|
+ 'fs4': 'FeatureStruct4',
|
|
|
+ 'cfs1': 'CondFeatureStruct1',
|
|
|
+ 'cfs2': 'CondFeatureStruct2',
|
|
|
+ 'cfs3': 'CondFeatureStruct3' } }
|