Put modules in ripple namespace

This commit is contained in:
Vinnie Falco
2013-06-27 13:41:20 -07:00
parent 8588587b71
commit 638656a597
35 changed files with 198 additions and 234 deletions

View File

@@ -3,10 +3,13 @@
Copyright (c) 2011-2013, OpenCoin, Inc.
*/
//==============================================================================
BOOST_AUTO_TEST_SUITE (RangeSet_suite)
BOOST_AUTO_TEST_CASE (RangeSet_test)
{
using namespace ripple;
WriteLog (lsTRACE, RangeSet) << "RangeSet test begins";
RangeSet r1, r2;

View File

@@ -34,6 +34,8 @@
#include <boost/asio.hpp> // VFALCO NOTE just for parseIpPort (!)
#include <boost/regex.hpp>
//#include <boost/test/included/unit_test.hpp>
// VFALCO TODO Replace OpenSSL randomness with a dependency-free implementation
// Perhaps Schneier's Fortuna or a variant. Abstract the collection of
// entropy and provide OS-specific implementation. We can re-use the
@@ -50,10 +52,12 @@
#include <Winsock2.h> // for ripple_ByteOrder.cpp
#endif
#if RIPPLE_USE_NAMESPACE
// This brings in the definitions for the Unit Test Framework.
//
#include <boost/test/included/unit_test.hpp>
namespace ripple
{
#endif
#include "containers/ripple_RangeSet.cpp"
#include "containers/ripple_TaggedCache.cpp"
@@ -74,9 +78,7 @@ namespace ripple
#include "types/ripple_UInt256.cpp"
#if RIPPLE_USE_NAMESPACE
}
#endif
// These must be outside the namespace (because of boost)
#include "containers/ripple_RangeSetUnitTests.cpp"

View File

@@ -38,11 +38,12 @@
#error Ripple requires Boost version 1.47 or later
#endif
#include "system/ripple_BoostIncludes.h"
// VFALCO TODO Move all boost includes into ripple_BoostHeaders.h
//
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/format.hpp>
#include <boost/function.hpp>
@@ -79,10 +80,8 @@
#include "../ripple_json/ripple_json.h"
#if RIPPLE_USE_NAMESPACE
namespace ripple
{
#endif
#include "utility/ripple_IntegerTypes.h" // must come first
#include "utility/ripple_Log.h" // Needed by others
@@ -110,8 +109,6 @@ namespace ripple
#include "containers/ripple_SecureAllocator.h"
#include "containers/ripple_TaggedCache.h"
#if RIPPLE_USE_NAMESPACE
}
#endif
#endif

View File

@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
/*
Copyright (c) 2011-2013, OpenCoin, Inc.
*/
//==============================================================================
#ifndef RIPPLE_BOOSTINCLUDES_RIPPLEHEADER
#define RIPPLE_BOOSTINCLUDES_RIPPLEHEADER
// All Boost includes used throughout Ripple.
//
// This shows all the dependencies in one place. Please do not add
// boost includes anywhere else in the source code. If possible, do
// not add any more includes.
//
// A long term goal is to reduce and hopefully eliminate the usage of boost.
//
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>
//------------------------------------------------------------------------------
// Boost Unit Test Framework
#define BOOST_TEST_NO_LIB
#define BOOST_TEST_ALTERNATIVE_INIT_API
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#endif

View File

@@ -8,6 +8,8 @@ BOOST_AUTO_TEST_SUITE ( Utils)
BOOST_AUTO_TEST_CASE ( ParseUrl )
{
using namespace ripple;
std::string strScheme;
std::string strDomain;
int iPort;