catchorg / catchorg/Catch2

-r console report displays BDD-style test results out of order

Open
#886 1 comment 5 reactions 0 assignees View on GitHub
Bug
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

## Description

1. What I did
* Ran tutorial BDD-style test - https://github.com/philsquared/Catch/blob/master/docs/tutorial.md

2. What I wanted to happen
Output to be in correct order that matches SCENARIO test code.
Note : "-r xml" param outputs in correct order.
```
$ ./udacity_cpp_for_programmers -r console -d yes --order lex "Scenario: vectors can be sized and resized"
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Given: A vector with some items
0.000 s: When: the size is increased
0.000 s: Then: the size and capacity change
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Given: A vector with some items
0.000 s: When: the size is reduced
0.000 s: Then: the size changes but not capacity
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Given: A vector with some items
0.000 s: When: more capacity is reserved
0.000 s: Then: the capacity changes but not the size
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Given: A vector with some items
0.000 s: When: less capacity is reserved
0.000 s: Then: neither size nor capacity are changed
===============================================================================
All tests passed (16 assertions in 1 test case)
```

3. What actually happened
Output was out of order ...

```$ ./udacity_cpp_for_programmers -r console -d yes --order lex "Scenario: vectors can be sized and resized"
0.000 s: Then: the size and capacity change
0.000 s: When: the size is increased
0.000 s: Given: A vector with some items
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Then: the size changes but not capacity
0.000 s: When: the size is reduced
0.000 s: Given: A vector with some items
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Then: the capacity changes but not the size
0.000 s: When: more capacity is reserved
0.000 s: Given: A vector with some items
0.000 s: Scenario: vectors can be sized and resized
0.000 s: Then: neither size nor capacity are changed
0.000 s: When: less capacity is reserved
0.000 s: Given: A vector with some items
0.000 s: Scenario: vectors can be sized and resized
===============================================================================
All tests passed (16 assertions in 1 test case)
```

### Steps to reproduce
* Created new source file 'vector_resizing_test_bdd_style.cpp' in Clion, pasted tutorial code, then ran test.
* Clion 2017.1, build CL-171.3780.121, 28/Mar/2017
* Catch version: ?
* Operating System: Ubuntu 16.04
* Compiler+version: C++11, CMake 3.7.1, GDB 7.11.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.