mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Improvements to jtx framework:
This adds "require" functionality which allows invariants to be checked after processing transactions using a simple, terse interface. Also adds more comprehensive test coverage for the framework itself, verifying that the more sophisticated language constructs work in all ways. All functions and classes have been split up into individual files which may be included a-la carte, or accessed through a single convenience header <ripple/test/jtx.h> * Move, rename all sources * Put everything in the jtx namespace * Add sendmax funclet * Rename funclet to paths * Correctly set input issue and destination amount in path * Conditionally invoke funclets using is_call_possible * Add any() function means "any currency they will accept" * Add None, none modifiers on amounts to mean "no amount" * Add require conditions to JTx * Add Env::require variadic condition checker * Add le, rename some items for consistency * Add require functors, balance, flags, nflags * Add require functors lines, owners, offers, tickets * Add ticket example of extending the system * Add noripple modifier for funding accounst * Add Env::st to parse Json into STTx * Add tests to ensure correctness of fund() * Add virtual Env member hooks * Add Env::balance * Add Env::seq * Add PrettyAmount * Add all container Account support * IOU and XRP return PrettyAmount amounts * IOUs print the issuer's name instead of base58 * Fix int and double conversions to XRP * Fix autofill of Env::fund with noripple
This commit is contained in:
committed by
Nik Bougalis
parent
4f34724c5a
commit
189592938a
43
src/ripple/unity/test.cpp
Normal file
43
src/ripple/unity/test.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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 <BeastConfig.h>
|
||||
|
||||
#include <ripple/test/jtx/impl/Account.cpp>
|
||||
#include <ripple/test/jtx/impl/amount.cpp>
|
||||
#include <ripple/test/jtx/impl/balance.cpp>
|
||||
#include <ripple/test/jtx/impl/Env.cpp>
|
||||
#include <ripple/test/jtx/impl/fee.cpp>
|
||||
#include <ripple/test/jtx/impl/flags.cpp>
|
||||
#include <ripple/test/jtx/impl/multisign.cpp>
|
||||
#include <ripple/test/jtx/impl/offer.cpp>
|
||||
#include <ripple/test/jtx/impl/owners.cpp>
|
||||
#include <ripple/test/jtx/impl/paths.cpp>
|
||||
#include <ripple/test/jtx/impl/pay.cpp>
|
||||
#include <ripple/test/jtx/impl/rate.cpp>
|
||||
#include <ripple/test/jtx/impl/regkey.cpp>
|
||||
#include <ripple/test/jtx/impl/sendmax.cpp>
|
||||
#include <ripple/test/jtx/impl/seq.cpp>
|
||||
#include <ripple/test/jtx/impl/sig.cpp>
|
||||
#include <ripple/test/jtx/impl/ticket.cpp>
|
||||
#include <ripple/test/jtx/impl/trust.cpp>
|
||||
#include <ripple/test/jtx/impl/txflags.cpp>
|
||||
#include <ripple/test/jtx/impl/utility.cpp>
|
||||
|
||||
#include <ripple/test/jtx/impl/Env_test.cpp>
|
||||
Reference in New Issue
Block a user