mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1860949 - Fix C++20 build by converting TestBase64 test result from UTF-16 to UTF-8. r=xpcom-reviewers,emilio
basic_ostream::operator<< overloads that accept char16_t and char32_t were removed in C++20, so std::cout << u'X' is no longer allowed. Previously, these overloads would print an integer or pointer address, not a character or string as the caller might have expected. https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2 Differential Revision: https://phabricator.services.mozilla.com/D191921
This commit is contained in:
parent
7e6da5b9b6
commit
102a715cda
@ -178,7 +178,7 @@ bool FakeInputStream::NextTest() {
|
||||
mChunk = &mTest->mChunks[0];
|
||||
mClosed = false;
|
||||
|
||||
return mTest->mChunks ? true : false;
|
||||
return mTest->mChunks != nullptr;
|
||||
}
|
||||
|
||||
void FakeInputStream::CheckTest(nsACString& aResult) {
|
||||
@ -187,7 +187,7 @@ void FakeInputStream::CheckTest(nsACString& aResult) {
|
||||
|
||||
void FakeInputStream::CheckTest(nsAString& aResult) {
|
||||
ASSERT_TRUE(aResult.EqualsASCII(mTest->mResult))
|
||||
<< "Actual: " << aResult.BeginReading() << std::endl
|
||||
<< "Actual: " << NS_ConvertUTF16toUTF8(aResult).get() << '\n'
|
||||
<< "Expected: " << mTest->mResult;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user