summaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/googletest-param-test-test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc
index c78623a..04b92ca 100644
--- a/googletest/test/googletest-param-test-test.cc
+++ b/googletest/test/googletest-param-test-test.cc
@@ -1031,6 +1031,18 @@ TEST_F(ParameterizedDeathTest, GetParamDiesFromTestF) {
INSTANTIATE_TEST_CASE_P(RangeZeroToFive, ParameterizedDerivedTest, Range(0, 5));
+// Tests param generator working with Enums
+enum MyEnums {
+ ENUM1 = 1,
+ ENUM2 = 3,
+ ENUM3 = 8,
+};
+
+class MyEnumTest : public testing::TestWithParam<MyEnums> {};
+
+TEST_P(MyEnumTest, ChecksParamMoreThanZero) { EXPECT_GE(10, GetParam()); }
+INSTANTIATE_TEST_CASE_P(MyEnumTests, MyEnumTest,
+ ::testing::Values(ENUM1, ENUM2, 0));
int main(int argc, char **argv) {
// Used in TestGenerationTest test case.