gTest对参数化测试的支持 |
|
声明Test Fixture |
#ifndef CLASS_UNDER_TEST_TEST_H |
定义Test Method |
// In [ClassUnderTest]Test.cpp file. |
gTest所支持的参数值生成器 |
|
testing::Range(begin, end[, step]) |
范围在[begin, end)之间, 步长为step. step缺省为1. |
testing::Values(val1, val2, ...) |
范围为(val1, val2, ...). |
testing::ValuesIn(array) |
范围由数组或STL容器给定. |
testing::Bool() |
范围为[false, true]. |