Added benchmark tests

This commit is contained in:
Phil Nash
2017-08-05 11:12:29 +01:00
parent 22e9ebef0d
commit f45d35c980
6 changed files with 165 additions and 8 deletions

View File

@@ -850,6 +850,22 @@ warning:
Uncomment the code in this test to check that it gives a sensible compiler
error
-------------------------------------------------------------------------------
benchmarked
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
+-----------------------------------------------------------------------------+
| benchmark name | iters | elapsed ns | average |
+-----------------------------------------------------------------------------+
| Load up a vector | 1 | 8459 | 8459 ns |
| Load up a map | 1 | 28774 | 28774 ns |
| Reserved vector | 1 | 2430 | 2430 ns |
| A fixed size array that should require | | | |
| no allocations | 10 | 2563 | 256 ns |
+-----------------------------------------------------------------------------+
-------------------------------------------------------------------------------
checkedElse, failing
-------------------------------------------------------------------------------
@@ -1016,6 +1032,6 @@ with expansion:
"{?}" == "1"
===============================================================================
test cases: 182 | 131 passed | 47 failed | 4 failed as expected
assertions: 896 | 779 passed | 96 failed | 21 failed as expected
test cases: 183 | 132 passed | 47 failed | 4 failed as expected
assertions: 900 | 783 passed | 96 failed | 21 failed as expected