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

Side by Side Diff: Source/wtf/VectorTest.cpp

Issue 835953003: Fix template angle bracket syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « Source/wtf/Vector.h ('k') | Source/wtf/VectorTraits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 { } 122 { }
123 123
124 ~DestructCounter() { ++(*m_destructNumber); } 124 ~DestructCounter() { ++(*m_destructNumber); }
125 int get() const { return m_i; } 125 int get() const { return m_i; }
126 126
127 private: 127 private:
128 int m_i; 128 int m_i;
129 int* m_destructNumber; 129 int* m_destructNumber;
130 }; 130 };
131 131
132 typedef WTF::Vector<OwnPtr<DestructCounter> > OwnPtrVector; 132 typedef WTF::Vector<OwnPtr<DestructCounter>> OwnPtrVector;
133 133
134 TEST(VectorTest, OwnPtr) 134 TEST(VectorTest, OwnPtr)
135 { 135 {
136 int destructNumber = 0; 136 int destructNumber = 0;
137 OwnPtrVector vector; 137 OwnPtrVector vector;
138 vector.append(adoptPtr(new DestructCounter(0, &destructNumber))); 138 vector.append(adoptPtr(new DestructCounter(0, &destructNumber)));
139 vector.append(adoptPtr(new DestructCounter(1, &destructNumber))); 139 vector.append(adoptPtr(new DestructCounter(1, &destructNumber)));
140 EXPECT_EQ(2u, vector.size()); 140 EXPECT_EQ(2u, vector.size());
141 141
142 OwnPtr<DestructCounter>& counter0 = vector.first(); 142 OwnPtr<DestructCounter>& counter0 = vector.first();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 EXPECT_TRUE(Vector<T>(1) == Vector<T>(1)); 296 EXPECT_TRUE(Vector<T>(1) == Vector<T>(1));
297 } 297 }
298 298
299 TEST(VectorTest, Compare) 299 TEST(VectorTest, Compare)
300 { 300 {
301 compare<int>(); 301 compare<int>();
302 compare<Comparable>(); 302 compare<Comparable>();
303 compare<WTF::String>(); 303 compare<WTF::String>();
304 } 304 }
305 } // namespace 305 } // namespace
OLDNEW
« no previous file with comments | « Source/wtf/Vector.h ('k') | Source/wtf/VectorTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698