1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-15 17:27:12 +01:00
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

62 lines
1.1 KiB
C++

//
// TimezoneTest.cpp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "TimezoneTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Poco/Timezone.h"
#include <iostream>
using Poco::Timezone;
TimezoneTest::TimezoneTest(const std::string& name): CppUnit::TestCase(name)
{
}
TimezoneTest::~TimezoneTest()
{
}
void TimezoneTest::testTimezone()
{
std::string name = Timezone::name();
std::string stdName = Timezone::standardName();
std::string dstName = Timezone::dstName();
std::cout << "Timezone Names: " << name << ", " << stdName << ", " << dstName << std::endl;
int utcOffset = Timezone::utcOffset();
std::cout << "UTC Offset: " << utcOffset << std::endl;
int dst = Timezone::dst();
std::cout << "DST Offset: " << dst << std::endl;
}
void TimezoneTest::setUp()
{
}
void TimezoneTest::tearDown()
{
}
CppUnit::Test* TimezoneTest::suite()
{
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("TimezoneTest");
CppUnit_addTest(pSuite, TimezoneTest, testTimezone);
return pSuite;
}