#include <cstdio> // for printf
#include <istream>
#include <ostream>
#include <sstream>
#include <locale>
#include <testsuite_hooks.h>
std::string str_01;
std::string str_02("true false 0 1 110001");
std::string str_03("-19999999 777777 -234234 233 -234 33 1 66300.25 .315 1.5");
std::string str_04("0123");
std::stringbuf isbuf_01(std::ios_base::in);
std::stringbuf isbuf_02(str_02, std::ios_base::in);
std::stringbuf isbuf_03(str_03, std::ios_base::in);
std::stringbuf isbuf_04(str_04, std::ios_base::in);
std::istream is_01(NULL);
std::istream is_02(&isbuf_02);
std::istream is_03(&isbuf_03);
std::istream is_04(&isbuf_04);
std::stringstream ss_01(str_01);
void test13()
{
using namespace std;
bool test = true;
const char* l1 = "12345678901234567890123456789012345678901234567890123456";
const char* l2 = "1.2345678901234567890123456789012345678901234567890123456"
" "
"1246.9";
double d;
istringstream iss1(l2);
iss1 >> d;
iss1 >> d;
VERIFY (d > 1246 && d < 1247);
int i;
int max_digits = numeric_limits<int>::digits10 + 1;
string digits;
for (int j = 0; j < max_digits; ++j)
digits += '1';
istringstream iss2(digits);
iss2 >> i;
VERIFY( !iss2.fail() );
digits += '1';
i = 0;
iss2.str(digits);
iss2.clear();
iss2 >> i;
VERIFY( i == 0 );
VERIFY( iss2.fail() );
}
int main()
{
test13();
return 0;
}