mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Do some basic housekeeping in LIBC_STR
This commit is contained in:
parent
12a33858c9
commit
4e81d3277c
7 changed files with 13 additions and 128 deletions
|
@ -16,8 +16,8 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
TEST(strlen16, testEmpty) {
|
||||
|
@ -31,12 +31,10 @@ TEST(strlen16, testUnicode) {
|
|||
EXPECT_EQ(28, strlen16(u"αcτµαlly pδrταblε εxεcµταblε"));
|
||||
}
|
||||
|
||||
TEST(strclen, testAegeanNumberSupplementaryPlane) {
|
||||
TEST(len, testAegeanNumberSupplementaryPlane) {
|
||||
EXPECT_EQ(36, strlen("𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
EXPECT_EQ(18, strlen16(u"𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
EXPECT_EQ(9, wcslen(L"𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
EXPECT_EQ(9, strclen("𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
EXPECT_EQ(9, strclen16(u"𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
EXPECT_EQ(9, wcslen(L"𐄷𐄸𐄹𐄺𐄻𐄼𐄽𐄾𐄿"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue