-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Description
To reproduce:
#include "gtest/gtest.h"
#include <iostream>
#include <cmath>
#include <functional>
using std::function;
class FooTest : public ::testing::TestWithParam<function<double(double)>> {
protected:
virtual void SetUp() {
}
virtual void TearDown() {
}
double a_;
};
TEST_P(FooTest, Check) {
a_ = GetParam()(547.0);
}
INSTANTIATE_TEST_CASE_P(
TestWithParametersC1, FooTest, testing::Values(
[](double x) { return std::abs(x); },
[](double x) { return std::log(x); }
));
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Metadata
Metadata
Assignees
Labels
No labels