| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 3046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3057 | 3057 |
| 3058 EXPECT_EQ(set1->end(), it); | 3058 EXPECT_EQ(set1->end(), it); |
| 3059 EXPECT_EQ(constSet.end(), cit); | 3059 EXPECT_EQ(constSet.end(), cit); |
| 3060 EXPECT_EQ(set1->rend(), reverse); | 3060 EXPECT_EQ(set1->rend(), reverse); |
| 3061 EXPECT_EQ(constSet.rend(), creverse); | 3061 EXPECT_EQ(constSet.rend(), creverse); |
| 3062 | 3062 |
| 3063 typename Set::iterator iX(set2->begin()); | 3063 typename Set::iterator iX(set2->begin()); |
| 3064 EXPECT_EQ(set2->end(), iX); | 3064 EXPECT_EQ(set2->end(), iX); |
| 3065 | 3065 |
| 3066 if (strong) | 3066 if (strong) |
| 3067 set1->remove(keepNumbersAlive[0]); | 3067 set1->erase(keepNumbersAlive[0]); |
| 3068 | 3068 |
| 3069 keepNumbersAlive[0] = nullptr; | 3069 keepNumbersAlive[0] = nullptr; |
| 3070 | 3070 |
| 3071 preciselyCollectGarbage(); | 3071 preciselyCollectGarbage(); |
| 3072 | 3072 |
| 3073 EXPECT_EQ(2u + (strong ? 1u : 0u), set1->size()); | 3073 EXPECT_EQ(2u + (strong ? 1u : 0u), set1->size()); |
| 3074 | 3074 |
| 3075 EXPECT_EQ(2 + (strong ? 0 : 1), IntWrapper::s_destructorCalls); | 3075 EXPECT_EQ(2 + (strong ? 0 : 1), IntWrapper::s_destructorCalls); |
| 3076 | 3076 |
| 3077 typename Set::iterator i2(set1->begin()); | 3077 typename Set::iterator i2(set1->begin()); |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3490 count++; | 3490 count++; |
| 3491 } else if (collectionNumber == weakSetIndex && firstAlive) { | 3491 } else if (collectionNumber == weakSetIndex && firstAlive) { |
| 3492 ASSERT_TRUE(weakSet->contains(keepNumbersAlive[i])); | 3492 ASSERT_TRUE(weakSet->contains(keepNumbersAlive[i])); |
| 3493 if (deleteAfterwards) | 3493 if (deleteAfterwards) |
| 3494 weakSet->erase(keepNumbersAlive[i]); | 3494 weakSet->erase(keepNumbersAlive[i]); |
| 3495 else | 3495 else |
| 3496 count++; | 3496 count++; |
| 3497 } else if (collectionNumber == weakOrderedSetIndex && firstAlive) { | 3497 } else if (collectionNumber == weakOrderedSetIndex && firstAlive) { |
| 3498 ASSERT_TRUE(weakOrderedSet->contains(keepNumbersAlive[i])); | 3498 ASSERT_TRUE(weakOrderedSet->contains(keepNumbersAlive[i])); |
| 3499 if (deleteAfterwards) | 3499 if (deleteAfterwards) |
| 3500 weakOrderedSet->remove(keepNumbersAlive[i]); | 3500 weakOrderedSet->erase(keepNumbersAlive[i]); |
| 3501 else | 3501 else |
| 3502 count++; | 3502 count++; |
| 3503 } | 3503 } |
| 3504 } | 3504 } |
| 3505 if (addAfterwards) { | 3505 if (addAfterwards) { |
| 3506 for (int i = 1000; i < 1100; i++) { | 3506 for (int i = 1000; i < 1100; i++) { |
| 3507 IntWrapper* wrapped = IntWrapper::create(i); | 3507 IntWrapper* wrapped = IntWrapper::create(i); |
| 3508 keepNumbersAlive.push_back(wrapped); | 3508 keepNumbersAlive.push_back(wrapped); |
| 3509 weakStrong->insert(wrapped, wrapped); | 3509 weakStrong->insert(wrapped, wrapped); |
| 3510 strongWeak->insert(wrapped, wrapped); | 3510 strongWeak->insert(wrapped, wrapped); |
| (...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6345 "HeapVector"); | 6345 "HeapVector"); |
| 6346 static_assert( | 6346 static_assert( |
| 6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, | 6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, |
| 6348 "HeapDeque"); | 6348 "HeapDeque"); |
| 6349 static_assert(WTF::IsGarbageCollectedType< | 6349 static_assert(WTF::IsGarbageCollectedType< |
| 6350 HeapTerminatedArray<Member<IntWrapper>>>::value, | 6350 HeapTerminatedArray<Member<IntWrapper>>>::value, |
| 6351 "HeapTerminatedArray"); | 6351 "HeapTerminatedArray"); |
| 6352 } | 6352 } |
| 6353 | 6353 |
| 6354 } // namespace blink | 6354 } // namespace blink |
| OLD | NEW |