Improve backwards compatibility with GNU Make

This commit is contained in:
Justine Tunney 2021-05-02 07:48:59 -07:00
parent fabf7f9f02
commit 1f2288be6e
18 changed files with 412 additions and 96 deletions

View file

@ -23,6 +23,8 @@
#include "libc/nexgen32e/x86feature.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h"
#include "libc/testlib/testlib.h"
#define MAKESTRING(NAME, VALUE) \
@ -75,3 +77,11 @@ TEST(strstr, test) {
ASSERT_EQ(NULL, strstr("-Wl,--gc-sections", "sanitize"));
ASSERT_STREQ("x", strstr("x", "x"));
}
BENCH(strstr, bench) {
EZBENCH2("strstr", donothing, EXPROPRIATE(strstr(kHyperion, "THE END")));
EZBENCH2("strstr", donothing,
EXPROPRIATE(strstr(
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
"aaaaaab")));
}