File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
include/criterion/internal/assert Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 129129
130130#define CRI_ASSERT_TEST_TAG_ptr ,
131131#define CRI_ASSERT_TEST_TAGC_ptr () ,
132- #define CRI_ASSERT_TYPE_TAG_ptr void *,
132+ #define CRI_ASSERT_TYPE_TAG_ptr const void *,
133133#define CRI_ASSERT_TYPE_TAG_ID_ptr ptr,
134134
135135#define CRI_ASSERT_TEST_TAG_str ,
@@ -311,7 +311,7 @@ static inline char *CRI_USER_TAG_ID(tostr, uptr)(const uintptr_t *e)
311311 return str;
312312}
313313
314- static inline char *CRI_USER_TAG_ID (tostr, ptr)(void **e)
314+ static inline char *CRI_USER_TAG_ID (tostr, ptr)(const void **e)
315315{
316316 char *str = NULL ;
317317 cr_asprintf (&str, " 0x%" CRI_PRIxPTR, (uintptr_t ) *e);
Original file line number Diff line number Diff line change 22#include <criterion/new/assert.h>
33
44Test (bug521 , str ) {
5- static const char * foo = "foo" ;
5+ static const char * const foo = "foo" ;
66 cr_assert (eq (str , foo , "foo" ));
77 cr_assert (ne (str , foo , "oof" ));
88}
99
1010Test (bug521 , wcs ) {
11- static const wchar_t * foo = L"foo" ;
11+ static const wchar_t * const foo = L"foo" ;
1212 cr_assert (eq (wcs , foo , L"foo" ));
1313 cr_assert (ne (wcs , foo , L"oof" ));
14+ }
15+
16+ Test (bug521 , ptr ) {
17+ static const char * const foo = "foo" ;
18+ cr_assert (eq (ptr , foo , foo ));
1419}
You can’t perform that action at this time.
0 commit comments