PhotonMain, done for 0.0.1
This commit is contained in:
parent
0b64a143b4
commit
8bd0e0ec0a
@ -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,12 +17,8 @@ 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
|
||||
int PhotonMain(const StrVec& args)
|
||||
{
|
||||
public:
|
||||
|
||||
int main(const StrVec& args)
|
||||
{
|
||||
util::ConfigFile c1("config1.ini"),c2;
|
||||
c2.open("config2.ini");
|
||||
|
||||
@ -48,7 +44,5 @@ public:
|
||||
std::cerr << "ConfigFile test completed successfully!\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
ENTRYPOINT(ConfigTest) // make ConfigTest the entrypoint class
|
||||
|
@ -5,17 +5,14 @@
|
||||
// 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
|
||||
int PhotonMain(const StrVec& args)
|
||||
{
|
||||
public:
|
||||
int main(const StrVec& args)
|
||||
{
|
||||
// create the log and add three sinks
|
||||
Log log;
|
||||
LogSinkPtr a( new ConsoleSink("console") ); // standard error output
|
||||
@ -45,8 +42,4 @@ public:
|
||||
log.note() << "not seen at all!";
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
ENTRYPOINT(LogTest)
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,12 +16,8 @@ using namespace photon::util;
|
||||
|
||||
// Basic test of util::filesys functionality, simply outputs essentially
|
||||
// all information available via util::filesys.
|
||||
class FilesysTest : public Application
|
||||
int PhotonMain(const StrVec& args)
|
||||
{
|
||||
public:
|
||||
|
||||
int main(const StrVec& args)
|
||||
{
|
||||
StrVec list;
|
||||
|
||||
//System Directories
|
||||
@ -100,8 +96,5 @@ public:
|
||||
cout << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
ENTRYPOINT(FilesysTest)
|
||||
}
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user