Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: base/id_map_unittest.cc

Issue 11308261: base: Use TEST() macro when possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rms Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_version_info_unittest.cc ('k') | base/message_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/id_map_unittest.cc
diff --git a/base/id_map_unittest.cc b/base/id_map_unittest.cc
index 80c4c66986ae7c0b8a3d9a63fa4c4e9790849b9f..76d7c3ed4e99eae72655c07c52fc72b6ea034c82 100644
--- a/base/id_map_unittest.cc
+++ b/base/id_map_unittest.cc
@@ -8,9 +8,6 @@
namespace {
-class IDMapTest : public testing::Test {
-};
-
class TestObject {
};
@@ -18,11 +15,12 @@ class DestructorCounter {
public:
explicit DestructorCounter(int* counter) : counter_(counter) {}
~DestructorCounter() { ++(*counter_); }
+
private:
int* counter_;
};
-TEST_F(IDMapTest, Basic) {
+TEST(IDMapTest, Basic) {
IDMap<TestObject> map;
EXPECT_TRUE(map.IsEmpty());
EXPECT_EQ(0U, map.size());
@@ -58,7 +56,7 @@ TEST_F(IDMapTest, Basic) {
EXPECT_EQ(0, map.iteration_depth());
}
-TEST_F(IDMapTest, IteratorRemainsValidWhenRemovingCurrentElement) {
+TEST(IDMapTest, IteratorRemainsValidWhenRemovingCurrentElement) {
IDMap<TestObject> map;
TestObject obj1;
@@ -91,7 +89,7 @@ TEST_F(IDMapTest, IteratorRemainsValidWhenRemovingCurrentElement) {
EXPECT_EQ(0, map.iteration_depth());
}
-TEST_F(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) {
+TEST(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) {
IDMap<TestObject> map;
const int kCount = 5;
@@ -133,7 +131,7 @@ TEST_F(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) {
EXPECT_EQ(0, map.iteration_depth());
}
-TEST_F(IDMapTest, CopyIterator) {
+TEST(IDMapTest, CopyIterator) {
IDMap<TestObject> map;
TestObject obj1;
@@ -161,7 +159,7 @@ TEST_F(IDMapTest, CopyIterator) {
EXPECT_EQ(0, map.iteration_depth());
}
-TEST_F(IDMapTest, AssignIterator) {
+TEST(IDMapTest, AssignIterator) {
IDMap<TestObject> map;
TestObject obj1;
@@ -191,7 +189,7 @@ TEST_F(IDMapTest, AssignIterator) {
EXPECT_EQ(0, map.iteration_depth());
}
-TEST_F(IDMapTest, IteratorRemainsValidWhenClearing) {
+TEST(IDMapTest, IteratorRemainsValidWhenClearing) {
IDMap<TestObject> map;
const int kCount = 5;
@@ -227,7 +225,7 @@ TEST_F(IDMapTest, IteratorRemainsValidWhenClearing) {
EXPECT_EQ(0U, map.size());
}
-TEST_F(IDMapTest, OwningPointersDeletesThemOnRemove) {
+TEST(IDMapTest, OwningPointersDeletesThemOnRemove) {
const int kCount = 3;
int external_del_count = 0;
@@ -265,7 +263,7 @@ TEST_F(IDMapTest, OwningPointersDeletesThemOnRemove) {
EXPECT_EQ(owned_del_count, kCount);
}
-TEST_F(IDMapTest, OwningPointersDeletesThemOnClear) {
+TEST(IDMapTest, OwningPointersDeletesThemOnClear) {
const int kCount = 3;
int external_del_count = 0;
@@ -302,7 +300,7 @@ TEST_F(IDMapTest, OwningPointersDeletesThemOnClear) {
EXPECT_EQ(owned_del_count, kCount);
}
-TEST_F(IDMapTest, OwningPointersDeletesThemOnDestruct) {
+TEST(IDMapTest, OwningPointersDeletesThemOnDestruct) {
const int kCount = 3;
int external_del_count = 0;
« no previous file with comments | « base/file_version_info_unittest.cc ('k') | base/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698