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

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

Issue 1184043002: Fix unit test style in Source/wtf/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 14 matching lines...) Expand all
25 25
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "wtf/LinkedHashSet.h" 28 #include "wtf/LinkedHashSet.h"
29 #include "wtf/ListHashSet.h" 29 #include "wtf/ListHashSet.h"
30 #include "wtf/PassRefPtr.h" 30 #include "wtf/PassRefPtr.h"
31 #include "wtf/RefCounted.h" 31 #include "wtf/RefCounted.h"
32 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
33 #include <gtest/gtest.h> 33 #include <gtest/gtest.h>
34 34
35 namespace WTF {
36
35 namespace { 37 namespace {
36 38
37 template<typename Set> 39 template<typename Set>
38 void removeFirstHelper() 40 void removeFirstHelper()
39 { 41 {
40 Set list; 42 Set list;
41 list.add(-1); 43 list.add(-1);
42 list.add(0); 44 list.add(0);
43 list.add(1); 45 list.add(1);
44 list.add(2); 46 list.add(2);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 { 239 {
238 prependOrMoveToLastWithDuplicates<ListHashSet<int>>(); 240 prependOrMoveToLastWithDuplicates<ListHashSet<int>>();
239 prependOrMoveToLastWithDuplicates<ListHashSet<int, 1>>(); 241 prependOrMoveToLastWithDuplicates<ListHashSet<int, 1>>();
240 } 242 }
241 243
242 TEST(LinkedHashSetTest, PrependOrMoveToLastWithDuplicates) 244 TEST(LinkedHashSetTest, PrependOrMoveToLastWithDuplicates)
243 { 245 {
244 prependOrMoveToLastWithDuplicates<LinkedHashSet<int>>(); 246 prependOrMoveToLastWithDuplicates<LinkedHashSet<int>>();
245 } 247 }
246 248
247 class DummyRefCounted: public WTF::RefCounted<DummyRefCounted> { 249 class DummyRefCounted: public WTF::RefCounted<DummyRefCounted> {
kochi 2015/06/15 03:34:22 One space between DummyRefCounted and ':'. WTF:: u
tkent 2015/06/15 04:45:57 Done.
248 public: 250 public:
249 DummyRefCounted(bool& isDeleted) : m_isDeleted(isDeleted) { m_isDeleted = fa lse; } 251 DummyRefCounted(bool& isDeleted) : m_isDeleted(isDeleted) { m_isDeleted = fa lse; }
250 ~DummyRefCounted() { m_isDeleted = true; } 252 ~DummyRefCounted() { m_isDeleted = true; }
251 void ref() 253 void ref()
252 { 254 {
253 WTF::RefCounted<DummyRefCounted>::ref(); 255 WTF::RefCounted<DummyRefCounted>::ref();
254 ++m_refInvokesCount; 256 ++m_refInvokesCount;
255 } 257 }
256 258
257 static int m_refInvokesCount; 259 static int m_refInvokesCount;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 TEST(ListHashSetTest, Swap) 713 TEST(ListHashSetTest, Swap)
712 { 714 {
713 swapTestHelper<ListHashSet<int>>(); 715 swapTestHelper<ListHashSet<int>>();
714 } 716 }
715 717
716 TEST(LinkedHashSetTest, Swap) 718 TEST(LinkedHashSetTest, Swap)
717 { 719 {
718 swapTestHelper<LinkedHashSet<int>>(); 720 swapTestHelper<LinkedHashSet<int>>();
719 } 721 }
720 722
721 } // namespace 723 } // anonymous namespace
724
725 } // namespace WTF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698