-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
412 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,37 @@ | ||
Change Log {#changelog} | ||
========== | ||
|
||
# Version 2.2 - Aubrey Bradimore | ||
# Version 2.0 - Past Prologue | ||
|
||
## What's Changed | ||
## Bug Fixes | ||
* Moved from `pragma once` to `#ifndef` to allow for multiple raberu files to coexist in multiple projects. | ||
* Fixed a regression in Visual Studio that affected ability to run tests. | ||
* Fix #6 - Compile-time ID are now properly displayed and compared without any issues due to terminal `\0`. | ||
|
||
### Infrastructure | ||
* **We are now under the Boost Software Licence 1.0** | ||
* Enable Android tests and support | ||
* Clarify some output when failures occur | ||
## New Features | ||
* Fix #4 - Simplify and generalize custom keyword generation | ||
A new CRTP class `rbr::as_keyword` streamlines the definition of compact keyword by users while | ||
supporting the whole range of built-in keywords. Associated documentation has been updated. | ||
|
||
### New Features | ||
* Implement ALL_EQUAL | ||
* Test can now use configurable, automatic data generator (https://github.com/jfalcou/tts/pull/53) | ||
* `TTS_EXPECT_COMPILES/COMPILE_NOT` check if a fragment of code can be compiled or not | ||
* Reimplement `TTS_WHEN` and `TTS_AND_THEN` to support sub-tests | ||
* Add typed tests that checks both value and exact type | ||
* Fix #2 - Implement direct keyword value access | ||
Keyword can now fetch themselves from a bundles of options. E.g | ||
|
||
### Bug Fixes | ||
* Fix Visual Studio interaction with constexpr tests | ||
* Improve random generators and seed management | ||
``` c++ | ||
inline constexpr auto coord_ = "coord"_kw; | ||
inline constexpr auto is_modal_ = "is_modal"_fl; | ||
|
||
## Detective who? | ||
[Aubrey Bradimore](https://en.wikipedia.org/wiki/Aubrey_Bradimore), this is a Christmas Release afterall | ||
auto x = coord_(coord_ = "Jane"s, is_modal_); | ||
``` | ||
|
||
# Version 2.1 - Cordelia Gray | ||
* Fix #5 - Mass extractors for keyword and values | ||
`rbr::keywords` and`rbr::values` can be used to retrieve a tuple-like object containing all the | ||
keywords or values from a bundle of options. | ||
|
||
## What's Changed | ||
* Fix #42 - Proper FetchContent support | ||
* Better compatibility | ||
* Enable EMSCRIPTEN tests and supports | ||
* Add tests over sequences | ||
* `rbr::get_type` is removed and is replaced by `rbr::fetch` and `rbr::result::fetch_t`. | ||
This functions provides an infix syntax for options access. | ||
|
||
## Detective who? | ||
[Cordelia Gray](https://en.wikipedia.org/wiki/Cordelia_Gray), a very suitable detective | ||
# Version 1.0 - Emissary | ||
|
||
# Version 2.0 - Kay Scarpetta | ||
## First autonomous public release. | ||
|
||
**TTS** version 2.0 is taking a major break from an earlier version. Compile-time was creeping upward | ||
and some features were not that useful. So the code base got streamlined and simplified. | ||
|
||
This version is a **Major Release With API Changes** release: | ||
|
||
**Breaking API Changes**: | ||
+ Removal of support for colors | ||
+ Removal of support for sub-scenario | ||
+ Silent mode for tests is the default. The only information displayed concerns failures | ||
|
||
**Features:** | ||
+ Improved compile-times | ||
+ Output streamlined to fit machine processing in CI context or scripts | ||
+ Better handling of template test cases: less generated symbol, better flexibility in inputs (list of types or types list generator) | ||
|
||
## Detective who? | ||
[Kay Scarpetta](https://en.wikipedia.org/wiki/Kay_Scarpetta), the private forensic consultant. | ||
|
||
# Version 1.0 - Phoebe Daring | ||
|
||
This version is a **Major Release With API Changes** release: | ||
|
||
**Breaking API Changes**: | ||
|
||
To support some of the new feature and simplify some macros, **TTS** API is now based on a | ||
lambda system. If this doesn't change the way tests are performed, it now requires to end all | ||
tests cases by a `;`. | ||
|
||
**Bug Fixes:** | ||
|
||
* Fix #3 - `TTS_TPL_CASES` now use meta-function based system for types generation | ||
* Fix #32 - Provide a way to log arbitrary data when failures occur | ||
* Fix #33 - Provide the `REQUIRED` option on tests to halt tests at first failure | ||
* Fix #34 - Provide a command-line option to fix precision when displaying floating points | ||
* Fix #37 - Stop displaying `char const*` as a string. | ||
|
||
## Detective who? | ||
[Phoebe Daring](https://en.wikipedia.org/wiki/Phoebe_Daring), the first half of the Daring Twins since 1912. | ||
|
||
# Version 0.2 - Kate Fansler | ||
|
||
This version is a fix+features release: | ||
|
||
* Fix #20 - Make string and pointers display in a more intuitive way | ||
* Fix #23 - Add proper parens in `EXPECT` macro | ||
* Add support for `constexpr` expectation and relational tests | ||
* `TTS_CASE_TPL` now generates one scenario per type | ||
* Fix #21 - Add runtime filtering for tests based on description string | ||
|
||
## Detective who? | ||
[Kate Fansler](https://en.wikipedia.org/wiki/Kate_Fansler), solving academic crimes since 1964. | ||
|
||
# Version 0.1 - Cadfael | ||
|
||
## First public release. | ||
|
||
**TTS** first complete release enables numerically oriented TDD including: | ||
- precision testing | ||
- checks over the data set | ||
- easy to customize the use of user-defined types. | ||
|
||
## Detective who? | ||
[Cadfael](https://en.wikipedia.org/wiki/Cadfael) is probably the eldest of all amateur detectives in history. | ||
**RABERU** (ラベル組) is now independent of the OFW repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#error DO NOT INCLUDE - DOCUMENTATION PURPOSE ONLY | ||
|
||
//================================================================================================== | ||
/** | ||
\page custom Tutorial: Customizing Keyword | ||
@tableofcontents | ||
\section custom_01 Using Pre-bound keyword | ||
Sometimes you wish you could have a terser syntax for keyword parameters. | ||
Let's say you want to pass a compile-time unrolling factor to some algorithm. | ||
@code | ||
// This is working but a bit verbose | ||
using namespace rbr::literals; | ||
inline constexpr auto unroll = rbr::keyword("unrolling"_id); | ||
auto x = my_algorithm( unroll = std::integral_constant<int,4>{}); | ||
@endcode | ||
One idea is to defines a **pre-bound keyword parameter**, i.e constructs an inline | ||
variable initialized with the result of the assignment of a value to a keyword. | ||
@code | ||
using namespace rbr::literals; | ||
inline constexpr auto unrolling = rbr::keyword("unrolling"_id); | ||
template<int N> inline constexpr auto unroll = (unrolling = std::integral_constant<int,N>{}); | ||
@endcode | ||
`unroll<N>` is now ready to be passed around. To retrieve it, you'll need to use | ||
the `unrolling` keyword. | ||
@include doc/tutorial04.cpp | ||
\section custom_02 Custom RABERU Keywords | ||
The keywords provided by **RABERU** can also be extended to propose a better user experience. | ||
This includes using user-defined type instead of **RABERU** long symbol to improve diagnostic | ||
, complex checks or provide custom display when using stream insertion of settings. | ||
\subsection custom-extension Extending RABERU Keywords | ||
Let's start again with our unrolling option. This time we want to be able to be sure nobody | ||
will use it with a non integral constant value and to display the value in a more informative way. | ||
To do so, we can inherits from `rbr::as_keyword`, a CRTP enabled base class: | ||
@code | ||
struct unrolling : rbr::as_keyword<unrolling> | ||
{ | ||
template<int N> | ||
constexpr auto operator=(std::integral_constant<int,N> const&) const noexcept | ||
{ | ||
return rbr::option<unrolling,std::integral_constant<int,N>>{}; | ||
} | ||
std::ostream& display(std::ostream& os, auto v) const { return os << "Unroll Factor: " << v; } | ||
}; | ||
template<int N> inline constexpr auto unroll = (unrolling{} = std::integral_constant<int,N>{}); | ||
@endcode | ||
What if we call `f( unrolling{} = 3.f );` ? Well, we go this error message: | ||
@code | ||
example.cpp:25:18: error: no viable overloaded '=' | ||
f( unrolling{} = 3.f ); | ||
~~~~~~~~~~~ ^ ~~~ | ||
<source>:8:18: note: candidate template ignored: could not match 'integral_constant<int, N>' against 'float' | ||
constexpr auto operator=(std::integral_constant<int,N> const&) const noexcept | ||
@endcode | ||
\subsection custom-display Custom Keywords Display | ||
Let's now improve the output of the option. Currently, the output is like: | ||
@code | ||
[unrolling] : 8 (std::integral_constant<int, 8>) | ||
@endcode | ||
A bit verbose especially for end-user. | ||
Keyword-like entity can specialize a `display` member function to replace this output by a custom one. | ||
@code | ||
struct unrolling : rbr::as_keyword<unrolling> | ||
{ | ||
template<int N> | ||
constexpr auto operator=(std::integral_constant<int,N> const&) const noexcept | ||
{ | ||
return rbr::option<unrolling,std::integral_constant<int,N>>{}; | ||
} | ||
std::ostream& display(std::ostream& os, auto v) const { return os << "Unroll Factor: " << v; } | ||
}; | ||
@endcode | ||
The `display` member takes the output stream and the actual value of the option to be displayed. | ||
One can then arrange those as they see fit, leading to a better output: | ||
@include doc/tutorial05.cpp | ||
**/ | ||
//================================================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
Licence {#licence} | ||
======= | ||
|
||
This library is licensed under the [MIT License](http://opensource.org/licenses/MIT): | ||
This library is licensed under the [Boost Software License](https://opensource.org/licenses/BSL-1.0): | ||
|
||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ none | ||
Copyright : EVE Contributors & Maintainers | ||
Copyright : RABERU Project Contributors | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | ||
and associated documentation files (the “Software”), to deal in the Software without restriction, | ||
including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the | ||
software and accompanying documentation covered by this license (the "Software") to use, reproduce, | ||
display, distribute, execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the | ||
following: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial | ||
portions of the Software. | ||
The copyright notices in the Software and this entire statement, including the above license grant, | ||
this restriction and the following disclaimer, must be included in all copies of the Software, in | ||
whole or in part, and all derivative works of the Software, unless such copies or derivative works | ||
are solely in the form of machine-executable object code generated by a source language processor. | ||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND | ||
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE | ||
BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Oops, something went wrong.