haikuwebkit/Source/WTF/wtf/text/cocoa
Myles C. Maxfield f512d3569c [Cocoa] Tweak the formatting for passing NSArrays to TextStreams
https://bugs.webkit.org/show_bug.cgi?id=228766

Reviewed by Simon Fraser.

Source/WTF:

Instead of using -[NSArray description], which puts its output on multiple lines,
instead use the same formatting as WTF::Vector, which puts its output on a single line.

We can also use this opportunity to tweak the implementation of operator<<(id) to
allow it to be called with Core Foundation types in raw C++ code.

* wtf/text/TextStream.h:
* wtf/text/cocoa/TextStreamCocoa.mm:
(WTF::TextStream::operator<<):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.cpp: Added.
(TEST):
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.mm: Added.
(TEST):

Canonical link: https://commits.webkit.org/240262@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-04 19:37:35 +00:00
..
StringCocoa.mm Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
StringImplCocoa.mm
StringViewCocoa.mm
TextBreakIteratorInternalICUCocoa.cpp
TextStreamCocoa.mm [Cocoa] Tweak the formatting for passing NSArrays to TextStreams 2021-08-04 19:37:35 +00:00