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

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

Issue 2743743002: Migrate WTF::LinkedHashSet/ListHashSet::removeLast() to ::pop_back() (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/wtf/ListHashSet.h ('k') | no next file » | 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 list.insert(1); 53 list.insert(1);
54 list.insert(2); 54 list.insert(2);
55 list.insert(3); 55 list.insert(3);
56 56
57 EXPECT_EQ(-1, list.front()); 57 EXPECT_EQ(-1, list.front());
58 EXPECT_EQ(3, list.back()); 58 EXPECT_EQ(3, list.back());
59 59
60 list.removeFirst(); 60 list.removeFirst();
61 EXPECT_EQ(0, list.front()); 61 EXPECT_EQ(0, list.front());
62 62
63 list.removeLast(); 63 list.pop_back();
64 EXPECT_EQ(2, list.back()); 64 EXPECT_EQ(2, list.back());
65 65
66 list.removeFirst(); 66 list.removeFirst();
67 EXPECT_EQ(1, list.front()); 67 EXPECT_EQ(1, list.front());
68 68
69 list.removeFirst(); 69 list.removeFirst();
70 EXPECT_EQ(2, list.front()); 70 EXPECT_EQ(2, list.front());
71 71
72 list.removeFirst(); 72 list.removeFirst();
73 EXPECT_TRUE(list.isEmpty()); 73 EXPECT_TRUE(list.isEmpty());
(...skipping 739 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/ListHashSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698