Skip to content

Commit

Permalink
v0.2 - Kate Fansler release
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Jan 11, 2021
2 parents 207be7c + f4e374b commit 8ba40c6
Show file tree
Hide file tree
Showing 23 changed files with 692 additions and 44 deletions.
33 changes: 30 additions & 3 deletions docs/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,39 @@

(insert crumbs.html here)

Changes

Version 0.2 - Kate Fansler
====================================================================================================

**Version 0.1: **
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

Documentation: https://jfalcou.github.io/tts/

## 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 data set
- easy to customize the use of user-defined types.

Documentation: https://jfalcou.github.io/tts/

## Detective who ?
[Cadfael](https://en.wikipedia.org/wiki/Cadfael) is probably the eldest of all amateur detective in history.

* Initial release

----------------------------------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/crumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
[**Status Tests**](reference.html#statustests)
[**Basic Tests**](reference.html#basictests)
[**Relational Tests**](reference.html#relationaltests)
[**Constexpr Tests**](reference.html#constexprtests)
[**Precision Tests**](reference.html#precisiontests)
[**Sequence Tests**](reference.html#sequencetests)
[**Runtime Error Tests**](reference.html#runtimeerrortests)
Expand Down
13 changes: 7 additions & 6 deletions docs/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
TTS supports options that can be passed as command line arguments of the test binary. Those
options modify how the tests are run.

Options | Shortcut | Description
------------ | -------- | -----------------------------------------------------------------------
`--help` | `-h` | Display the list of supported options <br>`./my_test --help`
`--no-color` | `-n` | Disable the colored output of test results. <br>`./my_test --no-color`
`--pass` | `-p` | Display both failing and passing tests. <br>`./my_test --pass`
`--repeat=N` | `-r=N` | Repeat each tests `N` times <br>`./my_test --repeat=42`
Options | Shortcut | Description
------------------- | ----------- | ---------------------------------------------------------------
`--help` | `-h` | Display the list of supported options <br>`./my_test --help`
`--no-color` | `-n` | Disable the colored output of test results. <br>`./my_test --no-color`
`--pass` | `-p` | Display both failing and passing tests. <br>`./my_test --pass`
`--repeat=N` | `-r=N` | Repeat each tests `N` times <br>`./my_test --repeat=42`
`--filter="str" ` | -f="str" | Only run tests containing `str` in their title

Another set of options is provided to control the specifics of the range check tests.

Expand Down
17 changes: 17 additions & 0 deletions docs/reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@
(insert reference/tts_less_equal.html here)
(insert reference/tts_greater_equal.html here)


Constexpr Tests
====================================================================================================
The following component provides macros to perform basic and relationnal tests in a `constexpr`
context.
<br>
To use those macros, include the `tts/tts.hpp` file.

(insert reference/tts_constexpr_expect.html here)
(insert reference/tts_constexpr_expect_not.html here)
(insert reference/tts_constexpr_equal.html here)
(insert reference/tts_constexpr_not_equal.html here)
(insert reference/tts_constexpr_less.html here)
(insert reference/tts_constexpr_greater.html here)
(insert reference/tts_constexpr_less_equal.html here)
(insert reference/tts_constexpr_greater_equal.html here)

Precision Tests
====================================================================================================
The following component provides macros to perform precision tests between values.
Expand Down
50 changes: 50 additions & 0 deletions docs/reference/tts_constexpr_equal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_EQUAL
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_EQUAL(LHS,RHS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Performs equality comparison between two values in a `constexpr` context. This comparison is
performed by using the proper `operator==` overload or by a [custom comparison](extensions.htm#customizationpoints).

**Parameters:**
:
- `LHS`, `RHS`: Expressions to compare

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check correctness of constexpr equality tests" )
{
constexpr float a = 45.f;
constexpr int b = 45;

TTS_CONSTEXPR_EQUAL(a, b);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
52 changes: 52 additions & 0 deletions docs/reference/tts_constexpr_expect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_EXPECT
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_EXPECT(Expression)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Checks if a given expression evaluates to `true` in a `constexpr` context.

**Parameters:**
:
- `Expression`: Constexpr expression to evaluate and compare to `true`.

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check that expectation can be met" )
{
constexpr int a = 42, b = 69;

TTS_CONSTEXPR_EXPECT(a != b);
TTS_CONSTEXPR_EXPECT(a < b);
TTS_CONSTEXPR_EXPECT(a <= b);
TTS_CONSTEXPR_EXPECT(b > a);
TTS_CONSTEXPR_EXPECT(b >= a);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
52 changes: 52 additions & 0 deletions docs/reference/tts_constexpr_expect_not.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_EXPECT_NOT
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_EXPECT_NOT(Expression)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Checks if a given expression evaluates to `false`.

**Parameters:**
:
- `Expression`: Expression to evaluate and compare to `false`.

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check that counter-expectation can be met" )
{
constexpr int a = 42, b = 69;

TTS_CONSTEXPR_EXPECT_NOT(a == b);
TTS_CONSTEXPR_EXPECT_NOT(a > b);
TTS_CONSTEXPR_EXPECT_NOT(a >= b);
TTS_CONSTEXPR_EXPECT_NOT(b < a);
TTS_CONSTEXPR_EXPECT_NOT(b <= a);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
48 changes: 48 additions & 0 deletions docs/reference/tts_constexpr_greater.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_GREATER
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_GREATER(LHS,RHS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Performs greater-than comparison between two values in a `constexpr` context.
This comparison is performed by using the proper `operator<` overload or
by a [custom comparison](extensions.htm#customizationpoints).

**Parameters:**
:
- `LHS`, `RHS`: Expressions to compare

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check correctness of greater-than comparison tests" )
{
TTS_CONSTEXPR_GREATER(69LL, 42.f);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
49 changes: 49 additions & 0 deletions docs/reference/tts_constexpr_greater_equal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_GREATER_EQUAL
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_GREATER_EQUAL(LHS,RHS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Performs greater-than-or-equal comparison between two values in a `constexpr` context.
This comparison is performed by using the proper `operator<` and `operator==` overloads or
by a [custom comparison](extensions.htm#customizationpoints).

**Parameters:**
:
- `LHS`, `RHS`: Expressions to compare

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check correctness of greater-equal comparison tests" )
{
TTS_CONSTEXPR_GREATER_EQUAL(69LL, 42.f);
TTS_CONSTEXPR_GREATER_EQUAL(69., 69);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
48 changes: 48 additions & 0 deletions docs/reference/tts_constexpr_less.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
TTS - Tiny Test System
Copyright 2020 Joel FALCOU
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
-->

<meta charset="utf-8">

TTS_CONSTEXPR_LESS
----------------------------------------------------------------------------------------------------

**Synopsis:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_CONSTEXPR_LESS(LHS,RHS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

**Required header:** <script type="preformatted">`#include <tts/tts.hpp>`</script>

Performs less-than comparison between two values in a `constexpr` context.
This comparison is performed by using the proper `operator<` overload or
by a [custom comparison](extensions.htm#customizationpoints).

**Parameters:**
:
- `LHS`, `RHS`: Expressions to compare

**Example:**

<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#include <tts/tts.hpp>

TTS_CASE( "Check correctness of less-than comparison tests" )
{
TTS_CONSTEXPR_LESS(42LL, 69.f);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

<!-- End of Document -->
<!-- Markdeep: -->
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js?"></script>
Loading

0 comments on commit 8ba40c6

Please sign in to comment.