Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/test/src/stdio/scanf_core/string_reader_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/test/src/stdio/scanf_core/string_reader_test.cpp b/libc/test/src/stdio/scanf_core/string_reader_test.cpp
index 43e65cc1bab6..4331d488be06 100644
--- a/libc/test/src/stdio/scanf_core/string_reader_test.cpp
+++ b/libc/test/src/stdio/scanf_core/string_reader_test.cpp
@@ -23,7 +23,7 @@ TEST(LlvmLibcScanfStringReaderTest, SimpleRead) {
__llvm_libc::scanf_core::StringReader str_reader(str);
__llvm_libc::scanf_core::Reader reader(&str_reader);
- for (size_t i = 0; i < sizeof(str); ++i) {
+ for (size_t i = 0; i < sizeof("abc"); ++i) {
ASSERT_EQ(str[i], reader.getc());
}
}
@@ -60,7 +60,7 @@ TEST(LlvmLibcScanfStringReaderTest, ReadAndReverse) {
}
// Check the whole string.
- for (size_t i = 0; i < sizeof(str); ++i) {
+ for (size_t i = 0; i < sizeof("abcDEF123"); ++i) {
ASSERT_EQ(str[i], reader.getc());
}
}