text stringlengths 0 2.2M |
|---|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
|
0x02, 0x01, 0x02, 0xff, 0xff, 0xba, 0x9e, 0x00, 0x00, 0xff, 0xff, 0xc7,
|
0xc0, 0x01, 0x04, 0xff, 0xff, 0xb9, 0xb0, 0x00, 0x08, 0xff, 0xff, 0xc7,
|
0xc0, 0x01, 0x0c, 0xff, 0xff, 0xc7, 0xc0, 0x01, 0x10, 0x4c, 0x4d, 0x54,
|
0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54,
|
0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
0x00, 0x00, 0x01, 0x0a, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2c,
|
0x4d, 0x33, 0x2e, 0x32, 0x2e, 0x30, 0x2c, 0x4d, 0x31, 0x31, 0x2e, 0x31,
|
0x2e, 0x30, 0x0a
|
};
|
static void writeData(const char *fileName, const char *data, int numBytes)
|
{
|
int rc = bdls::FilesystemUtil::createDirectories(fileName, false);
|
if (rc != 0) {
|
// If this test-driver is being run in parallel, its possible for two
|
// instances to attempt to create the directory simultaneously, and
|
// for one of them to fail. But the directory should still exist.
|
bslmt::ThreadUtil::microSleep(0,1);
|
bsl::string path(fileName);
|
bdls::PathUtil::popLeaf(&path);
|
ASSERT(bdls::FilesystemUtil::exists(path));
|
}
|
//..
|
// Then we create a file for Bangkok and write the binary time zone data to
|
// that file.
|
//..
|
bsl::ofstream outputFile(fileName, bsl::ofstream::binary);
|
ASSERT(outputFile.is_open());
|
outputFile.write(data, numBytes);
|
outputFile.close();
|
}
|
namespace {
|
namespace u {
|
inline
|
void sleep(int seconds)
|
{
|
#ifdef BSLS_PLATFORM_OS_UNIX
|
::sleep(seconds);
|
#else
|
::Sleep(seconds * 1000);
|
#endif
|
}
|
} // close namespace u
|
} // close unnamed namespace
|
// ============================================================================
|
// MAIN PROGRAM
|
// ----------------------------------------------------------------------------
|
int main(int argc, char *argv[])
|
{
|
int test = argc > 1 ? atoi(argv[1]) : 0;
|
int verbose = argc > 2;
|
int veryVerbose = argc > 3;
|
int veryVeryVerbose = argc > 4;
|
int veryVeryVeryVerbose = argc > 5;
|
cout << "TEST " << __FILE__ << " CASE " << test << endl;
|
bslma::TestAllocator allocator; bslma::TestAllocator *Z = &allocator;
|
static bslma::TestAllocator defaultAllocator;
|
static bslma::TestAllocator globalAllocator( "gta", veryVeryVerbose);;
|
bslma::Default::setGlobalAllocator(&globalAllocator);
|
bslma::DefaultAllocatorGuard guard(&defaultAllocator);
|
if (veryVeryVerbose) {
|
defaultAllocator.setVerbose(true);
|
}
|
bsl::string origWorkingDirectory(&globalAllocator);
|
ASSERT(0 == FUtil::getWorkingDirectory(&origWorkingDirectory));
|
char tmpWorkingDir[256];
|
{
|
#ifdef BSLS_PLATFORM_OS_UNIX
|
char host[80];
|
ASSERT(0 == ::gethostname(host, sizeof(host)));
|
#else
|
const char *host = "win"; // 'gethostname' is difficult on
|
// Windows, and we usually aren't using
|
// nfs there anyway.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.