Vinnie Falco
3fbff6e620
beast cleanup and tidying:
...
* Replace custom types with C++11 <cstdint> types
* Fix sqlite integer intos and uses
* Fix String implicit integer constructors
* Escape the enclosing namespace in sqdb
* Replace contract checks with assert
* Make many header files compile independently
* Remove the dependence on beast_core.h in many places
* Remove unused or obsolete classes and functions
* Remove unused or obsolete macros
* Remove unused network functions and files
* Remove unused or obsolete classes:
- ChildProcess
- HighResolutionTimer
- InterProcessLock
- Throw
- TrackedMutex
- UntrackedMutex
- XmlDocument
- XmlElement
2014-03-23 15:23:55 -07:00
Vinnie Falco
f63cf33118
New unit_test framework:
...
* Header-only!
* No external dependencies or other beast modules
* Compilation options allow for:
- Stand-alone application to run a single test suite
- Stand-alone application to run a set of test suites
- Global suite of tests inline with the host application
- Disable test suite generation completely
* Existing tests reworked to use the new classes
2014-03-21 18:00:37 -07:00
Vinnie Falco
2d490f6e6a
beast cleaning and tidying:
...
* Consolidate small modules into one
* Remove Android-specific platform support
* Remove Chrono.h from beast_core.h
* Removed files:
- TypeTraits.h
- Utility.h
- Net.h
- Asio.h
* Remove zlib support:
- Remove inline zlib library sources
- Remove GZIPCompressorOutputStream
- Remove GZIPDecompressorInputStream
* Remove obsolete or unused classes:
- AbstractObject
- BigInteger
- BufferedInputStream
- CacheLine
- CPUMeter
- DatagramSocket
- DynamicObject
- FileLogger
- FPUFlags
- Identifier
- JSON
- LocalisedStrings
- MACAddress
- MemoryAlignment
- MemoryInputStream
- MemoryMappedFile
- NamedValueSet
- OptionalScopedPointer
- PerformanceCounter
- PropertySet
- ScopedTimeInterval
- SparseSet
- SpinDelay
- StreamingSocket
- StringPool
- SubregionStream
- Uuid
- Variant
2014-03-21 07:30:50 -07:00
Howard Hinnant
d580e7c694
General tidy and refactoring:
...
* Use nullptr (C++11) instead of NULL.
* Put each file into its own namespace declaration.
* Remove "using namespace" directives and add scope qualifiers.
* Control when beast's implementation of std::equal (C++14) is used.
* Tidy up some const declarations.
Conflicts:
src/ripple_app/shamap/SHAMapSync.cpp
src/ripple_app/tx/TransactionEngine.cpp
2014-03-19 13:42:01 -07:00
Vinnie Falco
d4a5c0353d
beast, beast::asio improvements and fixes:
...
* New maybe_const_t alias for maybe_const
* New asio::enable_wait_for_async for safe cleanup
* New asio::memory_buffer, a managed boost::asio compatible buffer
* shared_handler improvements:
- Can be 'empty' (no stored handler).
- Default constructible as 'empty'.
- Safe evaluation in bool contexts, false==empty
* Fix is_call_possible metafunction:
- Works on empty argument lists
- Works with reference types
* Replace SafeBool idiom with C++11 explicit operator bool
* Move IPAddress function definitions to the header
* Move cyclic_iterator to container/
* Remove unused BufferType
* Remove obsolete classes:
- NamedPipe
- ReadWriteLock
- ScopedReadLock
- ScopedWriteLock
- LockGuard
2014-03-17 17:40:55 -07:00
JoelKatz
028935a254
Handle unexpected relative paths from __FILE__
...
Fixes comref#RIPD-133
2014-03-13 16:49:20 -07:00
Vinnie Falco
eb5691e8fa
Change bassert to always call assert
2014-02-06 14:30:03 -08:00
Vinnie Falco
f7aa4f9593
Refactor some Journal::Sink members
2013-11-30 17:32:50 -08:00
Vinnie Falco
6c9d88bd6d
Fix missing assert in UnitTest runner
2013-11-30 01:42:37 -08:00
Vinnie Falco
b38dd98e71
Journal API improvements
2013-11-15 12:30:01 -08:00
Vinnie Falco
d5954fffa8
Add Journal to UnitTest
2013-10-17 17:46:13 -07:00
Vinnie Falco
55171f42f6
Remove obsolete source files
2013-10-05 13:08:39 -07:00
Vinnie Falco
6c7f5d093c
Move many Thread related classes
2013-10-04 14:34:01 -07:00
Vinnie Falco
d0a0dbf430
Don't break on Throw
2013-09-30 09:29:36 -07:00
Vinnie Falco
4394594518
Tidy up some use of Error for throw
2013-09-28 19:34:16 -07:00
Vinnie Falco
f07515eb88
Add Stoppable prepare and start interfaces
2013-09-28 15:30:01 -07:00
Vinnie Falco
5c5de57290
Reorganize beast modules and files
2013-09-23 10:13:24 -07:00
Vinnie Falco
1a3cddc002
Add SharedArg and AsyncObject
2013-09-22 11:51:43 -07:00
Vinnie Falco
7efb6a3ab8
Reorganize some MPL and Utility classes and files
2013-09-19 21:37:47 -07:00
Vinnie Falco
34fffca202
Rename beast sources for consistency
2013-09-19 14:42:51 -07:00
Vinnie Falco
2a04dcc334
Journal improvements
2013-09-17 17:47:04 -07:00
Vinnie Falco
e96ce99d3d
Better random number facilities in UnitTest
2013-09-12 21:39:17 -07:00
Vinnie Falco
f3dc7ce52c
Add generic Journal class for logging
2013-09-12 15:06:28 -07:00
Vinnie Falco
02acf7d6d0
General refactoring of beast framework classes
2013-09-12 10:55:24 -07:00
Vinnie Falco
27307fca0c
Use SharedFunction in ProtectedCall
2013-09-10 08:04:54 -07:00
Vinnie Falco
8b1b6050e7
Put back BEAST_CATCH_UNHANDLED_EXCEPTIONS macro, but disabled by default
2013-09-10 08:04:46 -07:00
Vinnie Falco
2a362a99da
Disable exception catching in unit tests
2013-09-07 11:53:37 -07:00
Vinnie Falco
88af355028
Update programming by contract macros
2013-09-07 11:53:36 -07:00
Vinnie Falco
5f6e2ee026
Add Debug unit test to check bassert behavior
2013-09-07 11:53:35 -07:00
Vinnie Falco
04a4219a75
Make bassert fatal
2013-09-06 21:29:16 -07:00
Vinnie Falco
aa2773e483
Add HashMap unit test
2013-09-05 04:22:25 -07:00
Vinnie Falco
d9d291abcb
Tidy up includes and header material
2013-08-30 17:33:33 -07:00
Vinnie Falco
38516ef793
Tidy up beast project files
2013-08-30 17:24:32 -07:00
Vinnie Falco
db05b9ff04
Add TracketMutex unit test
2013-08-23 17:49:29 -07:00
Vinnie Falco
04f9270772
Add TrackedMutex and measureFunctionCallTime
2013-08-23 15:00:04 -07:00
Vinnie Falco
ac9c02f73b
Fix ProtectedCall default handler
2013-08-20 15:22:21 -07:00
Vinnie Falco
377c983ecb
Remove spaces from unit test package and class names
2013-08-15 15:45:17 -07:00
Vinnie Falco
969eeec717
Add programming by contract support
2013-08-12 11:00:37 -07:00
Vinnie Falco
e8ad5a0e6b
Tidy up beast_asio
2013-08-09 20:53:49 -07:00
Vinnie Falco
88ffd3cdfb
TestPeer boost::asio Socket and UnitTest framework
2013-08-09 19:47:12 -07:00
Vinnie Falco
e0b6620df2
More match options for unit test selection string
2013-08-07 17:31:48 -07:00
Vinnie Falco
ebabeb6fbd
Add 'print' unit test which prints the list of tests
2013-08-07 15:34:13 -07:00
Vinnie Falco
9387e7dd2d
Tweak fatal_error macro to remove warning
2013-08-07 15:16:40 -07:00
Vinnie Falco
9aaaa6aef0
Make Uncopyable derivations public
2013-08-07 15:16:38 -07:00
Vinnie Falco
06ed133ae3
Add fatal_error() macro
2013-08-07 15:16:37 -07:00
Vinnie Falco
75b778924f
Change to fatal_assert()
2013-08-07 15:16:37 -07:00
Vinnie Falco
5e3548fc00
Add fatal_require and improved FatalError reporting interfaces
2013-08-07 15:16:35 -07:00
Vinnie Falco
fd14957072
Return results of expect in UnitTest
2013-08-07 15:16:35 -07:00
Vinnie Falco
6d9131084f
Add default to UnitTest::fail() and tidy up
2013-08-07 15:16:34 -07:00
Vinnie Falco
f07732a9ca
Fix clang warnings
2013-08-07 15:16:31 -07:00