Skip to content

Commit b0b7b9a

Browse files
make tests shorter
1 parent 6f386ab commit b0b7b9a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libc/test/src/wchar/wcslen_test.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@
1212
#include "test/UnitTest/Test.h"
1313

1414
TEST(LlvmLibcWCSLenTest, EmptyString) {
15-
const wchar_t *empty = L"";
16-
17-
size_t result = LIBC_NAMESPACE::wcslen(empty);
18-
ASSERT_EQ(size_t{0}, result);
15+
ASSERT_EQ(size_t{0}, LIBC_NAMESPACE::wcslen(L""));
1916
}
2017

2118
TEST(LlvmLibcWCSLenTest, AnyString) {
22-
const wchar_t *any = L"Hello World!";
23-
24-
size_t result = LIBC_NAMESPACE::wcslen(any);
25-
ASSERT_EQ(size_t{12}, result);
19+
ASSERT_EQ(size_t{12}, LIBC_NAMESPACE::wcslen(L"Hello World!"));
2620
}

0 commit comments

Comments
 (0)