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

Side by Side Diff: third_party/WebKit/Source/wtf/HashSetTest.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 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 unified diff | Download patch
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 EXPECT_TRUE(deleted1); 121 EXPECT_TRUE(deleted1);
122 122
123 set.clear(); 123 set.clear();
124 EXPECT_TRUE(deleted2); 124 EXPECT_TRUE(deleted2);
125 EXPECT_TRUE(set.isEmpty()); 125 EXPECT_TRUE(set.isEmpty());
126 126
127 deleted1 = false; 127 deleted1 = false;
128 deleted2 = false; 128 deleted2 = false;
129 { 129 {
130 OwnPtrSet set; 130 OwnPtrSet set;
131 set.add(wrapUnique(new Dummy(deleted1))); 131 set.add(makeUnique<Dummy>(deleted1));
132 set.add(wrapUnique(new Dummy(deleted2))); 132 set.add(makeUnique<Dummy>(deleted2));
133 } 133 }
134 EXPECT_TRUE(deleted1); 134 EXPECT_TRUE(deleted1);
135 EXPECT_TRUE(deleted2); 135 EXPECT_TRUE(deleted2);
136 136
137 deleted1 = false; 137 deleted1 = false;
138 deleted2 = false; 138 deleted2 = false;
139 std::unique_ptr<Dummy> ownPtr1; 139 std::unique_ptr<Dummy> ownPtr1;
140 std::unique_ptr<Dummy> ownPtr2; 140 std::unique_ptr<Dummy> ownPtr2;
141 ptr1 = new Dummy(deleted1); 141 ptr1 = new Dummy(deleted1);
142 ptr2 = new Dummy(deleted2); 142 ptr2 = new Dummy(deleted2);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 // Other ways of construction: as a function parameter and in a return 498 // Other ways of construction: as a function parameter and in a return
499 // statement. 499 // statement.
500 EXPECT_TRUE(isOneTwoThree({1, 2, 3})); 500 EXPECT_TRUE(isOneTwoThree({1, 2, 3}));
501 EXPECT_TRUE(isOneTwoThree(returnOneTwoThree())); 501 EXPECT_TRUE(isOneTwoThree(returnOneTwoThree()));
502 } 502 }
503 503
504 } // anonymous namespace 504 } // anonymous namespace
505 505
506 } // namespace WTF 506 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashMapTest.cpp ('k') | third_party/WebKit/Source/wtf/ListHashSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698