2009-11-19 00:30:54 +00:00
|
|
|
// Cyphesis Online RPG Server and AI Engine
|
|
|
|
|
// Copyright (C) 2009 Alistair Riddoch
|
|
|
|
|
//
|
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
// along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
|
|
// $Id$
|
|
|
|
|
|
2011-02-15 09:30:46 +00:00
|
|
|
#ifdef NDEBUG
|
|
|
|
|
#undef NDEBUG
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
|
#define DEBUG
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-08-31 11:04:20 +01:00
|
|
|
#include "TestBase.h"
|
|
|
|
|
|
2009-11-19 00:30:54 +00:00
|
|
|
#include "common/const.h"
|
|
|
|
|
|
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
|
|
2012-08-31 11:04:20 +01:00
|
|
|
class buildidtest : public Cyphesis::TestBase
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
buildidtest()
|
|
|
|
|
{
|
|
|
|
|
ADD_TEST(buildidtest::test_time);
|
|
|
|
|
ADD_TEST(buildidtest::test_date);
|
|
|
|
|
ADD_TEST(buildidtest::test_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setup()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void teardown()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_time();
|
|
|
|
|
void test_date();
|
|
|
|
|
void test_id();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void buildidtest::test_time()
|
|
|
|
|
{
|
2012-09-05 10:08:33 +01:00
|
|
|
ASSERT_GREATER(strlen(consts::buildTime), 0u);
|
2012-08-31 11:04:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildidtest::test_date()
|
|
|
|
|
{
|
2012-09-05 10:08:33 +01:00
|
|
|
ASSERT_GREATER(strlen(consts::buildDate), 0u);
|
2012-08-31 11:04:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildidtest::test_id()
|
|
|
|
|
{
|
2012-09-05 10:08:33 +01:00
|
|
|
ASSERT_GREATER(consts::buildId, 0);
|
2012-08-31 11:04:20 +01:00
|
|
|
}
|
|
|
|
|
|
2009-11-19 00:30:54 +00:00
|
|
|
int main()
|
|
|
|
|
{
|
2012-08-31 11:04:20 +01:00
|
|
|
buildidtest t;
|
|
|
|
|
|
|
|
|
|
return t.run();
|
2009-11-19 00:30:54 +00:00
|
|
|
}
|