Lines Matching refs:tests
33 // This file contains tests verifying correctness of data provided via
83 // Returns the array of pointers to all tests in a particular test case
87 TestInfo const** const tests =
91 tests[i] = test_case->GetTestInfo(i);
93 std::sort(tests, tests + test_case->total_test_count(),
95 return tests;
111 // We can only test the accessors that do not change value while tests run.
112 // Since tests can be run in any order, the values the accessors that track
158 const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
160 EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
161 EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
162 EXPECT_TRUE(IsNull(tests[0]->value_param()));
163 EXPECT_TRUE(IsNull(tests[0]->type_param()));
164 EXPECT_FALSE(tests[0]->should_run());
166 EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
167 EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
168 EXPECT_TRUE(IsNull(tests[1]->value_param()));
169 EXPECT_TRUE(IsNull(tests[1]->type_param()));
170 EXPECT_TRUE(tests[1]->should_run());
172 EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
173 EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
174 EXPECT_TRUE(IsNull(tests[2]->value_param()));
175 EXPECT_TRUE(IsNull(tests[2]->type_param()));
176 EXPECT_TRUE(tests[2]->should_run());
178 EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
179 EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
180 EXPECT_TRUE(IsNull(tests[3]->value_param()));
181 EXPECT_TRUE(IsNull(tests[3]->type_param()));
182 EXPECT_TRUE(tests[3]->should_run());
184 delete[] tests;
185 tests = NULL;
198 tests = UnitTestHelper::GetSortedTests(test_case);
200 EXPECT_STREQ("Dummy", tests[0]->name());
201 EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
202 EXPECT_TRUE(IsNull(tests[0]->value_param()));
203 EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
204 EXPECT_TRUE(tests[0]->should_run());
206 delete[] tests;
229 // These two tests are here to provide support for testing
280 const TestInfo** tests = UnitTestHelper::GetSortedTests(test_case);
281 EXPECT_STREQ("DISABLED_Dummy1", tests[0]->name());
282 EXPECT_STREQ("ApiTest", tests[0]->test_case_name());
283 EXPECT_FALSE(tests[0]->should_run());
285 EXPECT_STREQ("TestCaseDisabledAccessorsWork", tests[1]->name());
286 EXPECT_STREQ("ApiTest", tests[1]->test_case_name());
287 EXPECT_TRUE(IsNull(tests[1]->value_param()));
288 EXPECT_TRUE(IsNull(tests[1]->type_param()));
289 EXPECT_TRUE(tests[1]->should_run());
290 EXPECT_TRUE(tests[1]->result()->Passed());
291 EXPECT_EQ(0, tests[1]->result()->test_property_count());
293 EXPECT_STREQ("TestCaseImmutableAccessorsWork", tests[2]->name());
294 EXPECT_STREQ("ApiTest", tests[2]->test_case_name());
295 EXPECT_TRUE(IsNull(tests[2]->value_param()));
296 EXPECT_TRUE(IsNull(tests[2]->type_param()));
297 EXPECT_TRUE(tests[2]->should_run());
298 EXPECT_TRUE(tests[2]->result()->Passed());
299 EXPECT_EQ(0, tests[2]->result()->test_property_count());
301 EXPECT_STREQ("UnitTestImmutableAccessorsWork", tests[3]->name());
302 EXPECT_STREQ("ApiTest", tests[3]->test_case_name());
303 EXPECT_TRUE(IsNull(tests[3]->value_param()));
304 EXPECT_TRUE(IsNull(tests[3]->type_param()));
305 EXPECT_TRUE(tests[3]->should_run());
306 EXPECT_TRUE(tests[3]->result()->Passed());
307 EXPECT_EQ(1, tests[3]->result()->test_property_count());
308 const TestProperty& property = tests[3]->result()->GetTestProperty(0);
312 delete[] tests;
316 tests = UnitTestHelper::GetSortedTests(test_case);
318 EXPECT_STREQ("Dummy", tests[0]->name());
319 EXPECT_STREQ("TestCaseWithCommentTest/0", tests[0]->test_case_name());
320 EXPECT_TRUE(IsNull(tests[0]->value_param()));
321 EXPECT_STREQ(GetTypeName<int>().c_str(), tests[0]->type_param());
322 EXPECT_TRUE(tests[0]->should_run());
323 EXPECT_TRUE(tests[0]->result()->Passed());
324 EXPECT_EQ(0, tests[0]->result()->test_property_count());
326 delete[] tests;