libc: cleanup strchr
Move strchr to a .cpp file, and change to bionic directory. Change-Id: I64ade7df326c0a9a714aca4caf5647b6833b1c97
This commit is contained in:
@@ -209,6 +209,13 @@ TEST(string, strcat) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(string, strchr_with_0) {
|
||||
char buf[10];
|
||||
const char* s = "01234";
|
||||
memcpy(buf, s, strlen(s) + 1);
|
||||
EXPECT_TRUE(strchr(buf, '\0') == (buf + strlen(s)));
|
||||
}
|
||||
|
||||
TEST(string, strchr) {
|
||||
int seek_char = random() & 255;
|
||||
|
||||
|
Reference in New Issue
Block a user