diff --git a/Builds/VisualStudio2012/RippleD.vcxproj b/Builds/VisualStudio2012/RippleD.vcxproj
index de1f84bf82..d427585702 100644
--- a/Builds/VisualStudio2012/RippleD.vcxproj
+++ b/Builds/VisualStudio2012/RippleD.vcxproj
@@ -193,7 +193,7 @@
true
true
-
+
true
true
true
@@ -1405,6 +1405,7 @@
+
diff --git a/Builds/VisualStudio2012/RippleD.vcxproj.filters b/Builds/VisualStudio2012/RippleD.vcxproj.filters
index 91219499c1..e1c53a83e3 100644
--- a/Builds/VisualStudio2012/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2012/RippleD.vcxproj.filters
@@ -678,9 +678,6 @@
[1] Ripple\ripple_app\main
-
- [1] Ripple\ripple_app\main
-
[1] Ripple\ripple_app\misc
@@ -885,6 +882,9 @@
[1] Ripple\ripple_app\network
+
+ [1] Ripple\ripple_app\main
+
@@ -1676,6 +1676,9 @@
[1] Ripple\ripple_app\network
+
+ [1] Ripple\ripple_app\main
+
diff --git a/Notes/VFALCO_LOG.txt b/Notes/VFALCO_LOG.txt
index 30e1a711b8..6e87fdd03b 100644
--- a/Notes/VFALCO_LOG.txt
+++ b/Notes/VFALCO_LOG.txt
@@ -4,6 +4,8 @@ Vinnie Falco's Change Log
- Add beast::SemanticVersion
- Change rippled to use SemanticVersion
+- Add runStartup to UnitTest, allowing forced tests on startup
+- Force rippled BuildInfo unit test to run on every startup
2013/07/31
diff --git a/modules/ripple_app/main/ripple_Main.cpp b/modules/ripple_app/main/ripple_RippleMain.cpp
similarity index 99%
rename from modules/ripple_app/main/ripple_Main.cpp
rename to modules/ripple_app/main/ripple_RippleMain.cpp
index 076f71f49c..2284798f8d 100644
--- a/modules/ripple_app/main/ripple_Main.cpp
+++ b/modules/ripple_app/main/ripple_RippleMain.cpp
@@ -224,7 +224,7 @@ static int runUnitTests (String const& whichTests, String const& format)
//------------------------------------------------------------------------------
-int rippleMain (int argc, char** argv)
+int RippleMain::run (int argc, char const* const* argv)
{
FatalErrorReporter reporter;
diff --git a/modules/ripple_app/main/ripple_RippleMain.h b/modules/ripple_app/main/ripple_RippleMain.h
new file mode 100644
index 0000000000..3c57f222de
--- /dev/null
+++ b/modules/ripple_app/main/ripple_RippleMain.h
@@ -0,0 +1,16 @@
+//------------------------------------------------------------------------------
+/*
+ Copyright (c) 2011-2013, OpenCoin, Inc.
+*/
+//==============================================================================
+
+#ifndef RIPPLE_RIPPLEMAIN_H_INCLUDED
+#define RIPPLE_RIPPLEMAIN_H_INCLUDED
+
+class RippleMain : public Main
+{
+public:
+ int run (int argc, char const* const* argv);
+};
+
+#endif
diff --git a/modules/ripple_app/ripple_app.cpp b/modules/ripple_app/ripple_app.cpp
index 469bccd3bd..ab1bb88ccc 100644
--- a/modules/ripple_app/ripple_app.cpp
+++ b/modules/ripple_app/ripple_app.cpp
@@ -379,9 +379,6 @@ static DH* handleTmpDh (SSL* ssl, int is_export, int iKeyLength)
#include "ledger/ripple_AcceptedLedger.cpp"
#include "consensus/ripple_DisputedTx.cpp"
#include "misc/ripple_HashRouter.cpp"
- #include "main/ripple_FatalErrorReporter.h" // private
-#include "main/ripple_FatalErrorReporter.cpp"
-#include "main/ripple_Main.cpp"
#include "misc/ripple_Offer.cpp"
#endif
@@ -417,25 +414,24 @@ static DH* handleTmpDh (SSL* ssl, int is_export, int iKeyLength)
#include "shamap/ripple_SHAMapSyncFilters.cpp" // requires Application
+ #include "main/ripple_FatalErrorReporter.h" // private
+#include "main/ripple_FatalErrorReporter.cpp"
+ #include "main/ripple_RippleMain.h" // private
+#include "main/ripple_RippleMain.cpp"
+
#endif
//------------------------------------------------------------------------------
}
-//------------------------------------------------------------------------------
-
#if ! defined (RIPPLE_MAIN_PART) || RIPPLE_MAIN_PART == 8
-namespace ripple
-{
- extern int rippleMain (int argc, char** argv);
-}
-
// Must be outside the namespace for obvious reasons
int main (int argc, char** argv)
{
- return ripple::rippleMain (argc, argv);
+ ripple::RippleMain rippled;
+ return rippled.runFromMain (argc, argv);
}
#endif