Skip to content

Commit

Permalink
Fix missing doc parts
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou authored Aug 15, 2023
1 parent 856786a commit fa96d7e
Show file tree
Hide file tree
Showing 15 changed files with 412 additions and 493 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ option( RABERU_BUILD_DOCUMENTATION "Build Doxygen for Raberu" OFF )
##======================================================================================================================
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ${COPACABANA_SOURCE_DIR}/copacabana/cmake)
include(${COPACABANA_SOURCE_DIR}/copacabana/cmake/copacabana.cmake)
copa_project_version(MAJOR 1 MINOR 0 PATCH 0)
copa_project_version(MAJOR 1 MINOR 1 PATCH 0)

##======================================================================================================================
## Summary Display
Expand Down
5 changes: 5 additions & 0 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ STRIP_FROM_INC_PATH = $(DOXYGEN_STRIP)/include
STRIP_FROM_PATH = $(DOXYGEN_STRIP)/src
STRIP_FROM_PATH += $(DOXYGEN_STRIP)/include


EXAMPLE_PATH = ../test/doc \
../test/integration \
.

SEPARATE_MEMBER_PAGES = YES
TAB_SIZE = 2

Expand Down
2 changes: 1 addition & 1 deletion doc/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
<!--END FULL_SIDEBAR-->
<!--END DISABLE_INDEX-->
<a href="https://github.com/jfalcou/tts" class="github-corner" title="View source on GitHub" target="_blank">
<a href="https://github.com/jfalcou/raberu" class="github-corner" title="View source on GitHub" target="_blank">
<svg viewBox="0 0 250 250" width="40" height="40" style="position: absolute; top: 0; border: 0; right: 0; z-index: 99;" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>

Expand Down
113 changes: 24 additions & 89 deletions doc/changelog.md
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.
102 changes: 102 additions & 0 deletions doc/custom.hpp
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
**/
//==================================================================================================
47 changes: 17 additions & 30 deletions doc/layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,26 @@
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>

<tab type="usergroup" visible="yes" title="How-Tos">
<tab type="user" url="@ref setup" title="Setup"/>
<tab type="user" url="@ref tutorial" title="RABERU 101"/>
<tab type="user" url="@ref custom" title="Customizing Keywords"/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>

<tab type="usergroup" visible="yes" title="Reference Documentation">
<tab type="usergroup" visible="yes" title="Main API">
<tab type="user" url="@ref kwds" title="Keywords"/>
<tab type="user" url="@ref stng" title="Settings"/>
</tab>
<tab type="concepts" visible="yes" title="Concepts"/>
<tab type="user" url="@ref rbr" title="Raberu Namespace"/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>

<tab type="usergroup" visible="yes" title="About The Library">
<tab type="user" url="@ref changelog" title="Changelog"/>
<tab type="user" url="@ref licence" title="Licence"/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>

<!-- Layout definition for a class page -->
Expand Down
30 changes: 16 additions & 14 deletions doc/licence.md
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading

0 comments on commit fa96d7e

Please sign in to comment.