Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions libc/test/src/__support/wchar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ add_libc_test(
)


if(NOT(LIBC_TARGET_OS_IS_WINDOWS))
add_libc_test(
add_libc_test(
string_converter_test.cpp
SUITE
libc-support-tests
SRCS
string_converter_test.cpp
SUITE
libc-support-tests
SRCS
string_converter_test.cpp
DEPENDS
libc.src.__support.wchar.string_converter
libc.src.__support.wchar.mbstate
libc.src.__support.error_or
libc.hdr.errno_macros
libc.hdr.types.char32_t
)
endif()
DEPENDS
libc.src.__support.wchar.string_converter
libc.src.__support.wchar.mbstate
libc.src.__support.error_or
libc.hdr.errno_macros
libc.hdr.types.char32_t
)
15 changes: 10 additions & 5 deletions libc/test/src/__support/wchar/string_converter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@
//
//===----------------------------------------------------------------------===//

// TODO: add support for 16-bit widechars to StringConverter to remove this
// macro
#include "src/__support/macros/properties/os.h"
#ifndef LIBC_TARGET_OS_IS_WINDOWS

#include "hdr/errno_macros.h"
#include "hdr/types/char32_t.h"
#include "hdr/types/char8_t.h"
#include "src/__support/error_or.h"
#include "src/__support/macros/properties/os.h"
#include "src/__support/wchar/mbstate.h"
#include "src/__support/wchar/string_converter.h"
#include "test/UnitTest/Test.h"

// TODO: add support for 16-bit widechars to StringConverter to remove this
// macro
#ifdef LIBC_TARGET_OS_IS_WINDOWS
TEST(LlvmLibcStringConverterTest, Windows) {
// pass on windows for now
}
#endif

#ifndef LIBC_TARGET_OS_IS_WINDOWS
TEST(LlvmLibcStringConverterTest, UTF8To32) {
// first 4 bytes are clown emoji (🤡)
// next 3 bytes are sigma symbol (∑)
Expand Down
Loading