Skip to content

Commit

Permalink
📚 [README] UT showcase image
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-jusiak committed Oct 26, 2019
1 parent 3cfc664 commit fe9db7b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://github.com/boost-experimental/ut/issues" target="_blank">![Github Issues](https://img.shields.io/github/issues/boost-experimental/ut.svg)</a>
<a href="https://godbolt.org/z/EtmE8-">![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)</a>

# [Boost].UT
# [Boost].UT / μt

> C++20 **single header, macro-free** μ(micro)/unit test framework
Expand All @@ -18,6 +18,8 @@
* **Fast to compile/execute** ([Benchmarks](benchmark))
* **Extensible** ([Runners](example/cfg/runner.cpp), [Reporters](example/cfg/reporter.cpp))

<a href="https://godbolt.org/z/8llYrg"><img src="doc/images/ut.png"></a>

### Testing

> "If you liked it then you should have put a test on it", Beyonce rule
Expand All @@ -30,7 +32,7 @@
#include <boost/ut.hpp>
```

#### Hello World - https://godbolt.org/z/ZLCQ2n
**Hello World** (https://godbolt.org/z/ZLCQ2n)

```cpp
constexpr auto sum = [](auto... args) { return (0 + ... + args); };
Expand All @@ -52,7 +54,7 @@ int main() {
All tests passed (3 asserts in 1 tests)
```

#### Assertions - https://godbolt.org/z/-C-yh2
**Assertions** (https://godbolt.org/z/-C-yh2)

```cpp
"operators"_test = [] {
Expand Down Expand Up @@ -108,7 +110,7 @@ tests: 6 | 1 failed
asserts: 16 | 14 passed | 2 failed
```

#### Sections - https://godbolt.org/z/Q4iXBE
**Sections** (https://godbolt.org/z/Q4iXBE)

```cpp
"[vector]"_test = [] {
Expand All @@ -134,7 +136,7 @@ asserts: 16 | 14 passed | 2 failed
All tests passed (4 asserts in 1 tests)
```

#### Exceptions - https://godbolt.org/z/3BdTtA
**Exceptions** (https://godbolt.org/z/3BdTtA)

```cpp
"exceptions"_test = [] {
Expand All @@ -149,7 +151,7 @@ All tests passed (4 asserts in 1 tests)
All tests passed (3 asserts in 1 tests)
```

#### Parameterized - https://godbolt.org/z/N_4CIF
**Parameterized** (https://godbolt.org/z/N_4CIF)

```cpp
"args"_test =
Expand Down Expand Up @@ -177,7 +179,7 @@ All tests passed (3 asserts in 1 tests)
All tests passed (11 asserts in 7 tests)
```
#### Logging - https://godbolt.org/z/WLVmwd
**Logging** (https://godbolt.org/z/WLVmwd)
```cpp
"logging"_test = [] {
Expand All @@ -200,7 +202,7 @@ tests: 1 | 1 failed
asserts: 1 | 0 passed | 1 failed
```

#### Behavior Driven Development - https://godbolt.org/z/A1Lkec
**Behavior Driven Development** (https://godbolt.org/z/A1Lkec)

```cpp
"scenario"_test = [] {
Expand All @@ -217,7 +219,7 @@ asserts: 1 | 0 passed | 1 failed
All tests passed (2 asserts in 1 tests)
```

#### Test Suites - https://godbolt.org/z/1pPYlN
**Test Suites** (https://godbolt.org/z/1pPYlN)

```cpp
namespace ut = boost::ut;
Expand All @@ -243,7 +245,7 @@ int main() { }
All tests passed (2 asserts in 1 tests)
```
#### Skipping tests - https://godbolt.org/z/FeWVjB
*Skipping tests** (https://godbolt.org/z/FeWVjB)
```cpp
skip | "don't run"_test = [] {
Expand All @@ -256,7 +258,7 @@ All tests passed (0 asserts in 0 tests)
1 tests skipped
```

#### Runner - https://godbolt.org/z/0uaFlH
**Runner** (https://godbolt.org/z/0uaFlH)

```cpp
namespace ut = boost::ut;
Expand Down Expand Up @@ -312,7 +314,7 @@ class runner {
template<> auto ut::cfg<ut::override> = cfg::runner{};
```
#### Reporter - https://godbolt.org/z/COV5xu
**Reporter** (https://godbolt.org/z/COV5xu)
```cpp
namespace ut = boost::ut;
Expand Down
Binary file added doc/images/ut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fe9db7b

Please sign in to comment.