#include "platform_support.h" // locale name macros
-// TODO:
-// Some of the assertions in this test are failing on Apple platforms.
-// Until we figure out the problem and fix it, disable these tests on
-// Apple platforms. Note that we're not using XFAIL or UNSUPPORTED markup
-// here, because this test would otherwise be disabled on all platforms
-// we test. To avoid this test becoming entirely stale, we just disable
-// the parts that fail.
-//
-// See https://llvm.org/PR45739 for the bug tracking this.
-#if defined(__APPLE__)
-# define APPLE_FIXME
-#endif
-
typedef std::money_get<char, cpp17_input_iterator<const char*> > Fn;
class my_facet
std::noshowbase(ios);
}
{ // negative, showbase
- std::string v = "-1 234 567,89 RUB ";
+ std::string v = "-1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const char*> I;
long double ex;
std::noshowbase(ios);
}
{ // negative, showbase
- std::string v = "-1 234 567,89 RUB ";
+ std::string v = "-1 234 567,89 RUB";
typedef cpp17_input_iterator<const char*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(ex == -123456789);
}
{ // zero, showbase
- std::string v = "0,00 RUB ";
+ std::string v = "0,00 RUB";
typedef cpp17_input_iterator<const char*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == 0);
}
-#if !defined(APPLE_FIXME)
{ // zero, showbase
- std::string v = "0,00 RUB ";
+ std::string v = "0,00 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const char*> I;
long double ex;
assert(ex == 0);
std::noshowbase(ios);
}
-#endif
{ // negative one, showbase
- std::string v = "-0,01 RUB ";
+ std::string v = "-0,01 RUB";
typedef cpp17_input_iterator<const char*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == -1);
}
-#if !defined(APPLE_FIXME)
{ // negative one, showbase
- std::string v = "-0,01 RUB ";
+ std::string v = "-0,01 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const char*> I;
long double ex;
assert(ex == -1);
std::noshowbase(ios);
}
-#endif
{ // positive, showbase
- std::string v = "1 234 567,89 RUB ";
+ std::string v = "1 234 567,89 RUB";
typedef cpp17_input_iterator<const char*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == 123456789);
}
-#if !defined(APPLE_FIXME)
{ // positive, showbase
- std::string v = "1 234 567,89 RUB ";
+ std::string v = "1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const char*> I;
long double ex;
assert(ex == 123456789);
std::noshowbase(ios);
}
-#endif
-#if !defined(APPLE_FIXME)
{ // negative, showbase
- std::string v = "-1 234 567,89 RUB ";
+ std::string v = "-1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const char*> I;
long double ex;
assert(ex == -123456789);
std::noshowbase(ios);
}
-#endif
{ // negative, showbase
std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1"".";
std::showbase(ios);
std::noshowbase(ios);
}
{ // negative, showbase
- std::wstring v = L"-1 234 567,89 RUB ";
+ std::wstring v = L"-1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
std::noshowbase(ios);
}
{ // negative, showbase
- std::wstring v = L"-1 234 567,89 RUB ";
+ std::wstring v = L"-1 234 567,89 RUB";
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(ex == -123456789);
}
{ // zero, showbase
- std::wstring v = L"0,00 RUB ";
+ std::wstring v = L"0,00 RUB";
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == 0);
}
-#if !defined(APPLE_FIXME)
{ // zero, showbase
- std::wstring v = L"0,00 RUB ";
+ std::wstring v = L"0,00 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
assert(ex == 0);
std::noshowbase(ios);
}
-#endif
{ // negative one, showbase
- std::wstring v = L"-0,01 RUB ";
+ std::wstring v = L"-0,01 RUB";
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == -1);
}
-#if !defined(APPLE_FIXME)
{ // negative one, showbase
- std::wstring v = L"-0,01 RUB ";
+ std::wstring v = L"-0,01 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
assert(ex == -1);
std::noshowbase(ios);
}
-#endif
{ // positive, showbase
- std::wstring v = L"1 234 567,89 RUB ";
+ std::wstring v = L"1 234 567,89 RUB";
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
std::ios_base::iostate err = std::ios_base::goodbit;
assert(err == std::ios_base::goodbit);
assert(ex == 123456789);
}
-#if !defined(APPLE_FIXME)
{ // positive, showbase
- std::wstring v = L"1 234 567,89 RUB ";
+ std::wstring v = L"1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
assert(ex == 123456789);
std::noshowbase(ios);
}
-#endif
-#if !defined(APPLE_FIXME)
{ // negative, showbase
- std::wstring v = L"-1 234 567,89 RUB ";
+ std::wstring v = L"-1 234 567,89 RUB";
std::showbase(ios);
typedef cpp17_input_iterator<const wchar_t*> I;
long double ex;
assert(ex == -123456789);
std::noshowbase(ios);
}
-#endif
{ // negative, showbase
std::wstring v = L"-1 234 567,89 \x440\x443\x431"".";
std::showbase(ios);
#include "platform_support.h" // locale name macros
-// TODO:
-// Some of the assertions in this test are failing on Apple platforms.
-// Until we figure out the problem and fix it, disable these tests on
-// Apple platforms. Note that we're not using XFAIL or UNSUPPORTED markup
-// here, because this test would otherwise be disabled on all platforms
-// we test. To avoid this test becoming entirely stale, we just disable
-// the parts that fail.
-//
-// See https://llvm.org/PR45739 for the bug tracking this.
-#if defined(__APPLE__)
-# define APPLE_FIXME
-#endif
-
typedef std::money_put<char, cpp17_output_iterator<char*> > Fn;
class my_facet
{
const my_facet f(1);
// char, national
-#if !defined(APPLE_FIXME)
{ // zero
long double v = 0;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "0,00 ");
+ assert(ex == "0,00");
}
{ // negative one
long double v = -1;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-0,01 ");
+ assert(ex == "-0,01");
}
{ // positive
long double v = 123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "1 234 567,89 ");
+ assert(ex == "1 234 567,89");
}
{ // negative
long double v = -123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-1 234 567,89 ");
+ assert(ex == "-1 234 567,89");
}
-#endif // APPLE_FIXME
{ // zero, showbase
long double v = 0;
std::showbase(ios);
// char, international
std::noshowbase(ios);
ios.unsetf(std::ios_base::adjustfield);
-#if !defined(APPLE_FIXME)
{ // zero
long double v = 0;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "0,00 ");
+ assert(ex == "0,00");
}
{ // negative one
long double v = -1;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-0,01 ");
+ assert(ex == "-0,01");
}
{ // positive
long double v = 123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "1 234 567,89 ");
+ assert(ex == "1 234 567,89");
}
{ // negative
long double v = -123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-1 234 567,89 ");
+ assert(ex == "-1 234 567,89");
}
{ // zero, showbase
long double v = 0;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "0,00 RUB ");
+ assert(ex == "0,00 RUB");
}
{ // negative one, showbase
long double v = -1;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-0,01 RUB ");
+ assert(ex == "-0,01 RUB");
}
{ // positive, showbase
long double v = 123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "1 234 567,89 RUB ");
+ assert(ex == "1 234 567,89 RUB");
}
{ // negative, showbase
long double v = -123456789;
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);
std::string ex(str, iter.base());
- assert(ex == "-1 234 567,89 RUB ");
+ assert(ex == "-1 234 567,89 RUB");
}
-#endif // APPLE_FIXME
{ // negative, showbase, left
long double v = -123456789;
std::showbase(ios);
assert(ex == "-1 234 567,89 RUB ");
assert(ios.width() == 0);
}
-#if !defined(APPLE_FIXME)
{ // negative, showbase, internal
long double v = -123456789;
std::showbase(ios);
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);
std::string ex(str, iter.base());
- assert(ex == "-1 234 567,89 RUB ");
+ assert(ex == "-1 234 567,89 RUB");
assert(ios.width() == 0);
}
{ // negative, showbase, right
char str[100];
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);
std::string ex(str, iter.base());
- assert(ex == " -1 234 567,89 RUB ");
+ assert(ex == " -1 234 567,89 RUB");
assert(ios.width() == 0);
}
-#endif // APPLE_FIXME
}
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
{
// wchar_t, national
std::noshowbase(ios);
ios.unsetf(std::ios_base::adjustfield);
-#if !defined(APPLE_FIXME)
{ // zero
long double v = 0;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"0,00 ");
+ assert(ex == L"0,00");
}
{ // negative one
long double v = -1;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-0,01 ");
+ assert(ex == L"-0,01");
}
{ // positive
long double v = 123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"1 234 567,89 ");
+ assert(ex == L"1 234 567,89");
}
{ // negative
long double v = -123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-1 234 567,89 ");
+ assert(ex == L"-1 234 567,89");
}
-#endif // APPLE_FIXME
{ // zero, showbase
long double v = 0;
std::showbase(ios);
// wchar_t, international
std::noshowbase(ios);
ios.unsetf(std::ios_base::adjustfield);
-#if !defined(APPLE_FIXME)
{ // zero
long double v = 0;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"0,00 ");
+ assert(ex == L"0,00");
}
{ // negative one
long double v = -1;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-0,01 ");
+ assert(ex == L"-0,01");
}
{ // positive
long double v = 123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"1 234 567,89 ");
+ assert(ex == L"1 234 567,89");
}
{ // negative
long double v = -123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-1 234 567,89 ");
+ assert(ex == L"-1 234 567,89");
}
{ // zero, showbase
long double v = 0;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"0,00 RUB ");
+ assert(ex == L"0,00 RUB");
}
{ // negative one, showbase
long double v = -1;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-0,01 RUB ");
+ assert(ex == L"-0,01 RUB");
}
{ // positive, showbase
long double v = 123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"1 234 567,89 RUB ");
+ assert(ex == L"1 234 567,89 RUB");
}
{ // negative, showbase
long double v = -123456789;
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-1 234 567,89 RUB ");
+ assert(ex == L"-1 234 567,89 RUB");
}
-#endif // APPLE_FIXME
{ // negative, showbase, left
long double v = -123456789;
std::showbase(ios);
assert(ex == L"-1 234 567,89 RUB ");
assert(ios.width() == 0);
}
-#if !defined(APPLE_FIXME)
{ // negative, showbase, internal
long double v = -123456789;
std::showbase(ios);
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);
std::wstring ex(str, iter.base());
- assert(ex == L"-1 234 567,89 RUB ");
+ assert(ex == L"-1 234 567,89 RUB");
assert(ios.width() == 0);
}
{ // negative, showbase, right
wchar_t str[100];
cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);
std::wstring ex(str, iter.base());
- assert(ex == L" -1 234 567,89 RUB ");
+ assert(ex == L" -1 234 567,89 RUB");
assert(ios.width() == 0);
}
-#endif // APPLE_FIXME
}
#endif // TEST_HAS_NO_WIDE_CHARACTERS