PhotonMain, done for 0.0.1

This commit is contained in:
James Turk 2005-08-08 04:55:48 +00:00
parent 0b64a143b4
commit 8bd0e0ec0a
5 changed files with 145 additions and 162 deletions

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: ConfigFile_test.cpp,v 1.2 2005/07/19 18:41:36 cozman Exp $
// $Id: ConfigFile_test.cpp,v 1.3 2005/08/08 04:55:48 cozman Exp $
#include "photon.hpp"
@ -17,11 +17,7 @@ using namespace photon;
// Simple test of ConfigFile functionality
// Tests reading/writing to a ConfigFile
// Successful test will simply output a message indicating success.
class ConfigTest : public Application
{
public:
int main(const StrVec& args)
int PhotonMain(const StrVec& args)
{
util::ConfigFile c1("config1.ini"),c2;
c2.open("config2.ini");
@ -49,6 +45,4 @@ public:
return 0;
}
};
ENTRYPOINT(ConfigTest) // make ConfigTest the entrypoint class

View File

@ -5,16 +5,13 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: Log_test.cpp,v 1.2 2005/07/19 20:37:04 cozman Exp $
// $Id: Log_test.cpp,v 1.3 2005/08/08 04:55:48 cozman Exp $
#include "photon.hpp"
using namespace photon;
// extremely simple log test application
class LogTest : public Application
{
public:
int main(const StrVec& args)
int PhotonMain(const StrVec& args)
{
// create the log and add three sinks
Log log;
@ -46,7 +43,3 @@ public:
return 0;
}
};
ENTRYPOINT(LogTest)

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: RandGen_test.cpp,v 1.2 2005/07/19 21:02:04 cozman Exp $
// $Id: RandGen_test.cpp,v 1.3 2005/08/08 04:55:48 cozman Exp $
#include <iostream>
#include <iomanip>
@ -14,7 +14,7 @@ using namespace photon::util;
using namespace std;
// simple demo of RandGen
int main()
int PhotonMain(const photon::StrVec& args)
{
RandGen g1;
RandGen g2(0); // seed randgen 2 and 3 with same number so they are in sync
@ -72,4 +72,6 @@ int main()
// the values will fall within a small deviation from the "expected" and
// they are there for reference when ensuring that the bounds are set
// properly on the generators.
return 0;
}

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: filesys_test.cpp,v 1.3 2005/07/20 01:43:57 cozman Exp $
// $Id: filesys_test.cpp,v 1.4 2005/08/08 04:55:48 cozman Exp $
#include "photon.hpp"
#include <iostream>
@ -16,11 +16,7 @@ using namespace photon::util;
// Basic test of util::filesys functionality, simply outputs essentially
// all information available via util::filesys.
class FilesysTest : public Application
{
public:
int main(const StrVec& args)
int PhotonMain(const StrVec& args)
{
StrVec list;
@ -101,7 +97,4 @@ public:
return 0;
}
};
ENTRYPOINT(FilesysTest)

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: math_test.cpp,v 1.4 2005/07/20 01:47:15 cozman Exp $
// $Id: math_test.cpp,v 1.5 2005/08/08 04:55:48 cozman Exp $
// Tests almost everything within photon::math (example run at bottom of file)
// Doesn't test:
@ -161,12 +161,13 @@ void testVector2()
cout << endl;
}
int main()
int PhotonMain(const StrVec& args)
{
testGeneral();
testCircle();
testRect();
testVector2();
return 0;
}
// Example run (values may vary slightly):