-#define BT_ASSERT_PRE_FT_HAS_ID(_ft, _type_id, _name) \
- BT_ASSERT_PRE(((struct bt_field_type *) (_ft))->id == (_type_id), \
- _name " has the wrong type ID: expected-type-id=%s, " \
- "%![ft-]+F", bt_common_field_type_id_string(_type_id), (_ft))
+#define BT_ASSERT_PRE_FT_IS_INT(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_ENUMERATION, \
+ _name " is not an integer field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_UNSIGNED_INT(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION, \
+ _name " is not an unsigned integer field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_ENUM(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_ENUMERATION, \
+ _name " is not an enumeration field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_ARRAY(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_STATIC_ARRAY || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_DYNAMIC_ARRAY, \
+ _name " is not an array field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_HAS_ID(_ft, _id, _name) \
+ BT_ASSERT_PRE(((struct bt_field_type *) (_ft))->id == (_id), \
+ _name " has the wrong ID: expected-id=%s, " \
+ "%![ft-]+F", bt_common_field_type_id_string(_id), (_ft))