text
stringlengths 0
2.2M
|
---|
const int INPUT_LENGTH =
|
static_cast<int>(bsl::strlen(INPUT)) - 1;
|
const Type EXPECTED_RESULT = DATA[i].d_result;
|
Type mX; const Type& X = mX;
|
int retCode = Util::parseDefault(&mX, INPUT, INPUT_LENGTH);
|
LOOP2_ASSERT(LINE, retCode, 0 == retCode);
|
LOOP2_ASSERT(LINE, X, EXPECTED_RESULT == X);
|
}
|
}
|
if (verbose) cout << "\nUsing 'Datetime'." << endl;
|
{
|
static const struct {
|
int d_line; // source line number
|
const char *d_input_p; // input
|
int d_year; // year under test
|
int d_month; // month under test
|
int d_day; // day under test
|
int d_hour; // hour under test
|
int d_minutes; // minutes under test
|
int d_seconds; // seconds under test
|
int d_milliSecs; // milli seconds under test
|
int d_microSecs; // micro seconds under test
|
bool d_isValid; // isValid flag
|
} DATA[] = {
|
//line input year month day hour min sec ms us isValid
|
//---- ----- ---- ----- --- ---- --- --- -- -- -------
|
{ L_, "0001-01-01T00:00:00.000",
|
1, 1, 1, 0, 0, 0, 0, 0, true },
|
{ L_, "0001-01-01T00:00:00.000000",
|
1, 1, 1, 0, 0, 0, 0, 0, true },
|
{ L_, "0001-01-01T01:01:01.001",
|
1, 1, 1, 1, 1, 1, 1, 0, true },
|
{ L_, "0001-01-01T01:01:01.001000",
|
1, 1, 1, 1, 1, 1, 1, 0, true },
|
{ L_, "0001-01-01T01:23:59.059",
|
1, 1, 1, 1, 23, 59, 59, 0, true },
|
{ L_, "0001-01-01T01:23:59.059059",
|
1, 1, 1, 1, 23, 59, 59, 59, true },
|
{ L_, "0001-01-02T00:00:00.000",
|
1, 1, 2, 0, 0, 0, 0, 0, true },
|
{ L_, "0001-01-02T00:00:00.000000",
|
1, 1, 2, 0, 0, 0, 0, 0, true },
|
{ L_, "0001-01-02T01:01:01.001",
|
1, 1, 2, 1, 1, 1, 1, 0, true },
|
{ L_, "0001-01-02T01:01:01.001000",
|
1, 1, 2, 1, 1, 1, 1, 0, true },
|
{ L_, "0001-01-02T01:23:59.059",
|
1, 1, 2, 1, 23, 59, 59, 0, true },
|
{ L_, "0001-01-02T01:23:59.059501",
|
1, 1, 2, 1, 23, 59, 59, 501, true },
|
{ L_, "0001-02-01T23:59:59.000",
|
1, 2, 1, 23, 59, 59, 0, 0, true },
|
{ L_, "0001-02-01T23:59:59.000001",
|
1, 2, 1, 23, 59, 59, 0, 1, true },
|
{ L_, "0001-12-31T00:00:00.000",
|
1, 12, 31, 0, 0, 0, 0, 0, true },
|
{ L_, "0001-12-31T23:59:59.000",
|
1, 12, 31, 23, 59, 59, 0, 0, true },
|
{ L_, "0002-01-01T00:00:00.000000",
|
2, 1, 1, 0, 0, 0, 0, 0, true },
|
{ L_, "0002-01-01T23:59:59.000000",
|
2, 1, 1, 23, 59, 59, 0, 0, true },
|
{ L_, "0004-02-28T00:00:00.000000",
|
4, 2, 28, 0, 0, 0, 0, 0, true },
|
{ L_, "0004-02-28T23:59:59.000000",
|
4, 2, 28, 23, 59, 59, 0, 0, true },
|
{ L_, "0004-02-28T23:59:59.000000",
|
4, 2, 28, 23, 59, 59, 0, 0, true },
|
{ L_, "0004-02-29T00:00:00.000000",
|
4, 2, 29, 0, 0, 0, 0, 0, true },
|
{ L_, "0004-02-29T23:59:59.000000",
|
4, 2, 29, 23, 59, 59, 0, 0, true },
|
{ L_, "0004-03-01T00:00:00.000000",
|
4, 3, 1, 0, 0, 0, 0, 0, true },
|
{ L_, "0004-03-01T23:59:59.000000",
|
4, 3, 1, 23, 59, 59, 0, 0, true },
|
{ L_, "0004-03-01T23:59:59.000000",
|
4, 3, 1, 23, 59, 59, 0, 0, true },
|
{ L_, "0008-02-28T00:00:00.000000",
|
8, 2, 28, 0, 0, 0, 0, 0, true },
|
{ L_, "0008-02-28T23:59:59.000000",
|
8, 2, 28, 23, 59, 59, 0, 0, true },
|
{ L_, "0008-02-29T00:00:00.000000",
|
8, 2, 29, 0, 0, 0, 0, 0, true },
|
{ L_, "0008-02-29T23:59:59.000000",
|
8, 2, 29, 23, 59, 59, 0, 0, true },
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.