text
stringlengths 0
2.2M
|
---|
//line input
|
//---- -----
|
{ L_, 0LL, },
|
{ L_, 1LL, },
|
{ L_, 4294967294U },
|
{ L_, 4294967295UL },
|
#ifdef U_LONG_IS_64_BITS
|
{ L_, 18446744073709551614ULL },
|
{ L_, 18446744073709551615ULL },
|
#endif
|
};
|
printDecimalRoundTripTester(DATA);
|
}
|
if (verbose) cout << "\nTesting 'bsls::Types::Uint64'." << endl;
|
{
|
static const RoundTripTestData<bsls::Types::Uint64> DATA[] =
|
{
|
//line input
|
//---- -----
|
{ L_, 0ULL },
|
{ L_, 1ULL },
|
{ L_, 18446744073709551614ULL },
|
{ L_, 18446744073709551615ULL },
|
};
|
printDecimalRoundTripTester(DATA);
|
}
|
if (verbose) cout << "\nTesting 'MyEnumeration::Value'." << endl;
|
{
|
static const RoundTripTestData<test::MyEnumeration::Value> DATA[] =
|
{
|
//line input
|
//---- -----
|
{ L_, test::MyEnumeration::VALUE1 },
|
{ L_, test::MyEnumeration::VALUE2 },
|
};
|
printDecimalRoundTripTester(DATA);
|
}
|
if (verbose) cout << "\nTesting 'CustomizedInt'." << endl;
|
{
|
typedef test::CustomizedInt Type;
|
static const RoundTripTestData<Type> DATA[] =
|
{
|
//line input
|
//---- -----
|
{ L_, Type(5) }, // 'CustomizedInt' fails
|
{ L_, Type(4) }, // to convert back from
|
{ L_, Type(3) }, // integer for values not
|
{ L_, Type(2) }, // less than 5.
|
{ L_, Type(1) },
|
{ L_, Type(0) },
|
{ L_, Type(-1) },
|
{ L_, Type(-2) },
|
{ L_, Type(-2147483647 - 1) },
|
{ L_, Type(-2147483647) },
|
};
|
printDecimalRoundTripTester(DATA);
|
}
|
if (verbose) cout << "\nTesting 'float'." << endl;
|
{
|
typedef bsl::numeric_limits<float> NumLimits;
|
static const RoundTripTestData<float> DATA[] =
|
{
|
//line input
|
//---- -----------
|
{ L_, -1.0f },
|
{ L_, -0.1f },
|
{ L_, -0.123456f },
|
{ L_, 0.0f },
|
{ L_, 0.1f },
|
{ L_, 1.0f },
|
{ L_, 123.4567f },
|
// Values from 'balxml_encoder.t.cpp' 'runTestCase17'
|
{ L_, 1.5258789e-05f },
|
{ L_, 3.0517578e-05f },
|
{ L_, 6.1035156e-05f },
|
{ L_, 1.2207031e-04f },
|
{ L_, 2.4414062e-04f },
|
{ L_, 4.8828125e-04f },
|
{ L_, 9.765625e-04f },
|
{ L_, 1.953125e-03f },
|
{ L_, 3.90625e-03f },
|
{ L_, 7.8125e-03f },
|
{ L_, 1.5625e-02f },
|
{ L_, 3.125e-02f },
|
{ L_, 6.25e-02f },
|
{ L_, 1.25e-01f },
|
{ L_, 2.5e-1f },
|
{ L_, 5e-1f },
|
{ L_, 1.f },
|
{ L_, 8.f },
|
{ L_, 64.f },
|
{ L_, 128.f },
|
{ L_, 1024.f },
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.