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

Side by Side Diff: third_party/WebKit/Source/wtf/ListHashSetTest.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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 EXPECT_TRUE(deleted1); 577 EXPECT_TRUE(deleted1);
578 578
579 set.clear(); 579 set.clear();
580 EXPECT_TRUE(deleted2); 580 EXPECT_TRUE(deleted2);
581 EXPECT_TRUE(set.isEmpty()); 581 EXPECT_TRUE(set.isEmpty());
582 582
583 deleted1 = false; 583 deleted1 = false;
584 deleted2 = false; 584 deleted2 = false;
585 { 585 {
586 OwnPtrSet set; 586 OwnPtrSet set;
587 set.add(wrapUnique(new Dummy(deleted1))); 587 set.add(makeUnique<Dummy>(deleted1));
588 set.add(wrapUnique(new Dummy(deleted2))); 588 set.add(makeUnique<Dummy>(deleted2));
589 } 589 }
590 EXPECT_TRUE(deleted1); 590 EXPECT_TRUE(deleted1);
591 EXPECT_TRUE(deleted2); 591 EXPECT_TRUE(deleted2);
592 592
593 deleted1 = false; 593 deleted1 = false;
594 deleted2 = false; 594 deleted2 = false;
595 std::unique_ptr<Dummy> ownPtr1; 595 std::unique_ptr<Dummy> ownPtr1;
596 std::unique_ptr<Dummy> ownPtr2; 596 std::unique_ptr<Dummy> ownPtr2;
597 ptr1 = new Dummy(deleted1); 597 ptr1 = new Dummy(deleted1);
598 ptr2 = new Dummy(deleted2); 598 ptr2 = new Dummy(deleted2);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 813
814 // ... but they don't have any pass-out (like take()) methods. 814 // ... but they don't have any pass-out (like take()) methods.
815 815
816 set.remove(MoveOnly(3)); 816 set.remove(MoveOnly(3));
817 set.clear(); 817 set.clear();
818 } 818 }
819 819
820 } // anonymous namespace 820 } // anonymous namespace
821 821
822 } // namespace WTF 822 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashSetTest.cpp ('k') | third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698