extern const struct tvec_ienuminfo tvenum_bool;
extern const struct tvec_ienuminfo tvenum_cmp;
-/* --- @tvec_claimeq_tenum@, @TVEC_CLAIMEQ_TENUM@ --- *
+/* --- @tvec_claimeq_tenum@, @TVEC_CLAIMEQ_TENUM@, @TVEC_CLAIMEQ_PTR@ --- *
*
* Arguments: @struct tvec_state *tv@ = test-vector state
* @const struct tvec_typeenuminfo *ei@ = enumeration type info
* mismatched values are dumped: @t0@ is printed as the output
* value and @t1@ is printed as the input reference.
*
+ * The @ei@ argument to @tvec_claimeq_penum@ (but not the other
+ * functions) may be null, as a hack for comparing two plain
+ * pointers.
+ *
* The @TVEC_CLAIM_TENUM@ macro is similar, only it (a)
* identifies the file and line number of the call site
* automatically, and (b) implicitly quotes the source text of
- * the @t0@ and @t1@ arguments in the failure message.
+ * the @t0@ and @t1@ arguments in the failure message. The
+ * @TVEC_CLAIMEQ_PTR@ macro simply compares two pointers in the
+ * same way.
*/
#define DECLCLAIM(tag, ty, slot) \
#define TVEC_CLAIMEQ_PENUM(tv, ei, p0, p1) \
(tvec_claimeq_penum(tv, ei, p0, p1, \
__FILE__, __LINE__, #p0 " /= " #p1))
+#define TVEC_CLAIMEQ_PTR(tv, p0, p1) \
+ (tvec_claimeq_penum(tv, 0, p0, p1, \
+ __FILE__, __LINE__, #p0 " /= " #p1))
/*----- Flags type --------------------------------------------------------*/