Browse Source

lib_test - PSIa technically valid, but nonsense (struct containing incomplete array)

master
heck 4 years ago
parent
commit
1f95059481
  1. 8
      examples/lib/lib_test/structs.h
  2. 10
      tests/test_pEpACIDgen.py

8
examples/lib/lib_test/structs.h

@ -76,14 +76,12 @@ extern "C" {
// Struct containing array fields // Struct containing array fields
// ------------------------------ // ------------------------------
// Caution: The array combinations are covered in a not entirely systematic way. // Caution: The array combinations are covered in a not entirely systematic way.
// There are designated primitive structs that contain complete/incomplete array fields. // There are designated primitive structs that contain complete array fields.
// BUT, the use of array fields has been scattered a bit randomly in an attempt to cover the most important // BUT, the use of array fields has been scattered a bit randomly in an attempt to cover the most important
// combinations of struct fields: // combinations of struct fields:
// - ia_P
// - a_P // - a_P
// - a_PSa // - a_PSa
// - aAPSa // - aAPSa
// - iaACS
// - aACS // - aACS
// //
// So, a few of the possible field types are missing. // So, a few of the possible field types are missing.
@ -147,14 +145,14 @@ typedef struct CS {
// _CCS = complex complex struct without an alias // _CCS = complex complex struct without an alias
struct _CCS { struct _CCS {
struct _CS field__CS_1; struct _CS field__CS_1;
ACS field_ACS_1[]; ACS field_ACS_1[3];
}; };
// CCS = complex complex struct // CCS = complex complex struct
// ACCS = alias of a complex complex struct // ACCS = alias of a complex complex struct
typedef struct CCS { typedef struct CCS {
struct _CS field__CS_1; struct _CS field__CS_1;
ACS field_ACS_1[]; ACS field_ACS_1[3];
} ACCS; } ACCS;
// Nested structs // Nested structs

10
tests/test_pEpACIDgen.py

@ -49,16 +49,6 @@ all_types.append({"type": ["PS"],
"struct PS" "struct PS"
]}) ]})
all_types.append({"type": ["_PSIa"],
"requires": [
"struct _PSIa"
]})
all_types.append({"type": ["PSIa"],
"requires": [
"struct PSIa"
]})
all_types.append({"type": ["_PSa"], all_types.append({"type": ["_PSa"],
"requires": [ "requires": [
"struct _PSa" "struct _PSa"

Loading…
Cancel
Save