catchorg / catchorg/Catch2

Single Test_case redefined

Open
#2,181 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Describe the bug**
I write only one test case but still get this error:
```
/home/../cmake-build-debug/test/someTest -r xml -d yes --order lex "Subdivide row dense vector scenario"
Testing started at 10:17 ...
error: TEST_CASE( "Subdivide row dense vector scenario" ) already defined.
First seen at /home/../test/presolve/someTest.cpp:9
Redefined at /home/../test/presolve/someTest.cpp:9
Process finished with exit code 255
```

the test case is quite simple
```
#define CATCH_CONFIG_MAIN

#include

TEST_CASE("Subdivide row dense vector scenario") {
REQUIRE(1 == 3);
}

```

**Expected behavior**
test success

**Reproduction steps**
I installed catch2 by cmake install in /usr/local

**Platform information:**

- OS: CentOS
- Compiler+version: **GCC v8.3.1 20191121 **
- Catch version: **v2.13.4**

**Additional context**
Add any other context about the problem here.

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.