google / google/googletest

Allow emtpy ::testing::Types<> list in Typed Tests

Open
#3,469 0 comments 0 reactions 1 assignee Claimed by @sbenzaquen View on GitHub
enhancement
Dominant language
C++
Stars
39.6k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

**Does the feature exist in the most recent commit?**

No, but it was working in earlier versions of googletest, e.g. in version 1.10.0.

**Why do we need this feature?**

The features is convenient if the `Types<...>` type list is constructed conditionally, e.g.
```cpp
my_types = typename std::conditional>::type;
```

**Describe the proposal**

Allow the following code to compile
```cpp
TYPED_TEST_SUITE(TypedTest3, Types<>);
TYPED_TEST(TypedTest3, A) {}
```
It will do nothing, i.e. not add a test.

**Is the feature specific to an operating system, compiler, or build system version?**

No.

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.