text
stringlengths 0
2.2M
|
---|
char TZ_ID[2];
|
TZ_ID[1] = '\0';
|
for (bsl::size_t ti = 0; ti < NUM_INVALID_CHAR; ++ti) {
|
TZ_ID[0] = INVALID_CHAR[ti];
|
if (veryVerbose) { T_ P_(ti) P_(TZ_ID) };
|
bsl::string bslResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 != X.loadTimeZoneFilePath(&bslResult, TZ_ID));
|
std::string stdResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 != X.loadTimeZoneFilePath(&stdResult, TZ_ID));
|
#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
|
std::pmr::string pmrResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 != X.loadTimeZoneFilePath(&pmrResult, TZ_ID));
|
#endif
|
}
|
}
|
if (verbose) cout << "\nTesting valid characters." << endl;
|
{
|
const char *VALID_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
"abcdefghijklmnopqrstuvwxyz"
|
"1234567890_+-";
|
const bsl::size_t NUM_VALID_CHAR = strlen(VALID_CHAR);
|
Obj mX; const Obj& X = mX;
|
mX.configureRootPath(".");
|
char TZ_ID[2];
|
TZ_ID[1] = '\0';
|
for (bsl::size_t ti = 0; ti < NUM_VALID_CHAR; ++ti) {
|
TZ_ID[0] = VALID_CHAR[ti];
|
if (veryVerbose) { T_ P_(ti) P_(TZ_ID) };
|
bsl::string bslResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 == X.loadTimeZoneFilePath(&bslResult, TZ_ID));
|
std::string stdResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 == X.loadTimeZoneFilePath(&stdResult, TZ_ID));
|
#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
|
std::pmr::string pmrResult;
|
LOOP2_ASSERT(ti, TZ_ID,
|
0 == X.loadTimeZoneFilePath(&pmrResult, TZ_ID));
|
#endif
|
}
|
}
|
if (verbose) cout << "\nTesting '/' characters." << endl;
|
{
|
Obj mX; const Obj& X = mX;
|
mX.configureRootPath(".");
|
bsl::string bslResult;
|
ASSERT(0 != X.loadTimeZoneFilePath(&bslResult, "/"));
|
ASSERT(0 != X.loadTimeZoneFilePath(&bslResult, "/A"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&bslResult, "A/"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&bslResult, "A/B"));
|
std::string stdResult;
|
ASSERT(0 != X.loadTimeZoneFilePath(&stdResult, "/"));
|
ASSERT(0 != X.loadTimeZoneFilePath(&stdResult, "/A"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&stdResult, "A/"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&stdResult, "A/B"));
|
#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR
|
std::pmr::string pmrResult;
|
ASSERT(0 != X.loadTimeZoneFilePath(&pmrResult, "/"));
|
ASSERT(0 != X.loadTimeZoneFilePath(&pmrResult, "/A"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&pmrResult, "A/"));
|
ASSERT(0 == X.loadTimeZoneFilePath(&pmrResult, "A/B"));
|
#endif
|
}
|
if (verbose) cout <<
|
"\nCreate a table of distinct object values." << endl;
|
{
|
static const struct {
|
int d_line;
|
const char *d_root;
|
const char *d_tzId;
|
const char *d_result;
|
} DATA [] = {
|
//LINE ROOT TZ_ID RESULT
|
//---- ---- ----- ------
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.