- "%![field-]+f", \
- bt_common_field_type_id_string((int) (_type_id)), (_field))
-
-#define BT_ASSERT_PRE_FIELD_IS_SET(_field, _name) \
- BT_ASSERT_PRE(bt_field_is_set_recursive(_field), \
+ "%![field-]+f", \
+ bt_common_field_type_id_string(_type_id), (_field))
+
+#define BT_ASSERT_PRE_FIELD_IS_UNSIGNED_INT(_field, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_UNSIGNED_INTEGER || \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION, \
+ _name " is not an unsigned integer field: %![field-]+f", \
+ (_field))
+
+#define BT_ASSERT_PRE_FIELD_IS_SIGNED_INT(_field, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_SIGNED_INTEGER || \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_SIGNED_ENUMERATION, \
+ _name " is not a signed integer field: %![field-]+f", \
+ (_field))
+
+#define BT_ASSERT_PRE_FIELD_IS_ARRAY(_field, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_STATIC_ARRAY || \
+ ((struct bt_field *) (_field))->type->id == BT_FIELD_TYPE_ID_DYNAMIC_ARRAY, \
+ _name " is not an array field: %![field-]+f", (_field))
+
+#define BT_ASSERT_PRE_FIELD_IS_SET(_field, _name) \
+ BT_ASSERT_PRE(bt_field_is_set(_field), \