diff --git a/Builds/VisualStudio2015/RippleD.vcxproj b/Builds/VisualStudio2015/RippleD.vcxproj
index 4c78178611..5cb348b7bc 100644
--- a/Builds/VisualStudio2015/RippleD.vcxproj
+++ b/Builds/VisualStudio2015/RippleD.vcxproj
@@ -1709,6 +1709,10 @@
True
True
+
+ True
+ True
+
True
True
diff --git a/Builds/VisualStudio2015/RippleD.vcxproj.filters b/Builds/VisualStudio2015/RippleD.vcxproj.filters
index 94be47bd1a..63d0722070 100644
--- a/Builds/VisualStudio2015/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2015/RippleD.vcxproj.filters
@@ -2451,6 +2451,9 @@
ripple\app\tests
+
+ ripple\app\tests
+
ripple\app\tests
diff --git a/Builds/VisualStudio2015/ripple.sln b/Builds/VisualStudio2015/ripple.sln
index 9e43cd3024..bafdabdbf0 100644
--- a/Builds/VisualStudio2015/ripple.sln
+++ b/Builds/VisualStudio2015/ripple.sln
@@ -1,9 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2013 for Windows Desktop
-VisualStudioVersion = 12.0.31101.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}") = "RippleD", "RippleD.vcxproj", "{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{26B7D9AC-1A80-8EF8-6703-D061F1BECB75}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/ripple/app/tests/OversizeMeta_test.cpp b/src/ripple/app/tests/OversizeMeta_test.cpp
new file mode 100644
index 0000000000..fbb88d54c4
--- /dev/null
+++ b/src/ripple/app/tests/OversizeMeta_test.cpp
@@ -0,0 +1,176 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of rippled: https://github.com/ripple/rippled
+ Copyright (c) 2012, 2013 Ripple Labs Inc.
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#include
+#include
+#include
+#include
+
+namespace ripple {
+namespace test {
+
+// Make sure "plump" order books don't have problems
+class PlumpBook_test : public beast::unit_test::suite
+{
+public:
+ void
+ createOffers (jtx::Env& env,
+ jtx::IOU const& iou, std::size_t n)
+ {
+ using namespace jtx;
+ for (std::size_t i = 1; i <= n; ++i)
+ env(offer("alice", XRP(i), iou(1)));
+ }
+
+ void
+ test (std::size_t n)
+ {
+ using namespace jtx;
+ auto const billion = 1000000000ul;
+ Env env(*this);
+ env.disable_sigs();
+ auto const gw = Account("gateway");
+ auto const USD = gw["USD"];
+ env.fund(XRP(billion), gw, "alice", "bob", "carol");
+ env.trust(USD(billion), "alice", "bob", "carol");
+ env(pay(gw, "alice", USD(billion)));
+ createOffers(env, USD, n);
+ }
+
+ void
+ run()
+ {
+ test(10000);
+ }
+};
+
+BEAST_DEFINE_TESTSUITE_MANUAL(PlumpBook,tx,ripple);
+
+//------------------------------------------------------------------------------
+
+class OversizeMeta_test : public beast::unit_test::suite
+{
+public:
+ void
+ createOffers (jtx::Env& env, jtx::IOU const& iou,
+ std::size_t n)
+ {
+ using namespace jtx;
+ for (std::size_t i = 1; i <= n; ++i)
+ //env(offer("alice", XRP(i), iou(1)));
+ env(offer("alice", XRP(1), iou(1)));
+ }
+
+ void
+ test()
+ {
+ std::size_t const n = 9000;
+ using namespace jtx;
+ auto const billion = 1000000000ul;
+ Env env(*this);
+ env.disable_sigs();
+ auto const gw = Account("gateway");
+ auto const USD = gw["USD"];
+ env.fund(XRP(billion), gw, "alice", "bob", "carol");
+ env.trust(USD(billion), "alice", "bob", "carol");
+ env(pay(gw, "alice", USD(billion)));
+ createOffers(env, USD, n);
+ env(pay("alice", gw, USD(billion)));
+ env(offer("alice", USD(1), XRP(1)));
+ }
+
+ void
+ run()
+ {
+ test();
+ }
+};
+
+BEAST_DEFINE_TESTSUITE_MANUAL(OversizeMeta,tx,ripple);
+
+//------------------------------------------------------------------------------
+
+class FindOversizeCross_test : public beast::unit_test::suite
+{
+public:
+ // Return lowest x in [lo, hi] for which f(x)==true
+ template
+ static
+ std::size_t
+ bfind(std::size_t lo, std::size_t hi, Function&& f)
+ {
+ auto len = hi - lo;
+ while (len != 0)
+ {
+ auto l2 = len / 2;
+ auto m = lo + l2;
+ if (! f(m))
+ {
+ lo = ++m;
+ len -= l2 + 1;
+ }
+ else
+ len = l2;
+ }
+ return lo;
+ }
+
+ void
+ createOffers (jtx::Env& env, jtx::IOU const& iou,
+ std::size_t n)
+ {
+ using namespace jtx;
+ for (std::size_t i = 1; i <= n; ++i)
+ env(offer("alice", XRP(i), iou(1)));
+ //env(offer("alice", XRP(1), iou(1)));
+ }
+
+ bool
+ oversize(std::size_t n)
+ {
+ using namespace jtx;
+ auto const billion = 1000000000ul;
+ Env env(*this);
+ env.disable_sigs();
+ auto const gw = Account("gateway");
+ auto const USD = gw["USD"];
+ env.fund(XRP(billion), gw, "alice", "bob", "carol");
+ env.trust(USD(billion), "alice", "bob", "carol");
+ env(pay(gw, "alice", USD(billion)));
+ createOffers(env, USD, n);
+ env(pay("alice", gw, USD(billion)));
+ env(offer("alice", USD(1), XRP(1)), ter(std::ignore));
+ return env.ter() == tecOVERSIZE;
+ }
+
+ void
+ run()
+ {
+ auto const result = bfind(100, 9000,
+ [&](std::size_t n)
+ { return oversize(n); });
+ log << "Min oversize offers = " << result;
+ }
+};
+
+BEAST_DEFINE_TESTSUITE_MANUAL(FindOversizeCross,tx,ripple);
+
+} // test
+} // ripple
+
diff --git a/src/ripple/unity/app_tests.cpp b/src/ripple/unity/app_tests.cpp
index 5d309ced04..a236ac9e84 100644
--- a/src/ripple/unity/app_tests.cpp
+++ b/src/ripple/unity/app_tests.cpp
@@ -30,4 +30,5 @@
#include
#include
#include
+#include
#include