mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Put modules in ripple namespace
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
33
modules/ripple_basics/system/ripple_BoostIncludes.h
Normal file
33
modules/ripple_basics/system/ripple_BoostIncludes.h
Normal 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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user