From: Eugene Syromyatnikov Date: Fri, 19 Jul 2019 11:08:40 +0000 (+0200) Subject: tests/tests.h: add XLAT_STR macro X-Git-Tag: v5.3~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6905e32045e144de4e72fb8cfd32cfc7ef1c435;p=strace tests/tests.h: add XLAT_STR macro XLAT_STR allows describing expected output succintly in some simple cases. * tests/tests.h (XLAT_STR): New macro. --- diff --git a/tests/tests.h b/tests/tests.h index da6423a8..53d7b72f 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -63,6 +63,8 @@ # define XLAT_UNKNOWN(val_, dflt_) STRINGIFY_VAL(val_) " /* " dflt_ " */" # endif +# define XLAT_STR(v_) sprintxlat(#v_, v_, NULL) + # ifndef DEFAULT_STRLEN /* Default maximum # of bytes printed in printstr et al. */ # define DEFAULT_STRLEN 32