google / google/googletest

TYPED_TEST_SUITE - Must specify at least one argument for '...' parameter of variadic macro

Open
#2,271 9 comments 8 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

When using TYPED_TEST_SUITE below error happens. (using master)
Here is log from clang:

path:14:48: error: must specify at least one argument for '...' parameter of variadic macro
[-Werror,-Wgnu-zero-variadic-macro-arguments]
TYPED_TEST_SUITE(XYZ, MyTypes );
^
path/gtest/googletest/include/gtest/gtest-typed-test.h:194:9: note: macro 'TYPED_TEST_SUITE' defined here
#define TYPED_TEST_SUITE(CaseName, Types, ...) \
^
1 error generated.

Seems like continuation of #2069

Contributor guide

Open the contributing guide

Research direction

Start in googletest/include/gtest/gtest-typed-test.h at the TYPED_TEST_SUITE definition and review the related context from issue #2069. Reproduce the reported Clang diagnostic with the two-argument invocation, then verify that the macro can be used without that warning while retaining its existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.