projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
poll, select: handle ERROR_BROKEN_PIPE.
[gnulib.git]
/
tests
/
test-memmem.c
diff --git
a/tests/test-memmem.c
b/tests/test-memmem.c
index
75a2505
..
3a21213
100644
(file)
--- a/
tests/test-memmem.c
+++ b/
tests/test-memmem.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2004, 2007-20
09 Free Software Foundation
+ * Copyright (C) 2004, 2007-20
10 Free Software Foundation, Inc.
* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
@@
-19,24
+19,15
@@
#include <string.h>
#include <string.h>
+#include "signature.h"
+SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t));
+
#include <signal.h>
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "zerosize-ptr.h"
#include <stdlib.h>
#include <unistd.h>
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void *
null_ptr (void)
static void *
null_ptr (void)
@@
-103,7
+94,7
@@
main (int argc, char *argv[])
{
size_t repeat = 10000;
size_t m = 1000000;
{
size_t repeat = 10000;
size_t m = 1000000;
- char *needle =
+ c
onst c
har *needle =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
size_t n = strlen (needle);
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
size_t n = strlen (needle);
@@
-127,7
+118,7
@@
main (int argc, char *argv[])
{
size_t repeat = 10000;
size_t m = 1000000;
{
size_t repeat = 10000;
size_t m = 1000000;
- char *haystack =
+ c
onst c
har *haystack =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
size_t n = strlen (haystack);
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
size_t n = strlen (haystack);