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

Unified Diff: Source/wtf/VectorTest.cpp

Issue 1309153003: Remove container overflow tests for Vectors with inline capacity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/VectorTest.cpp
diff --git a/Source/wtf/VectorTest.cpp b/Source/wtf/VectorTest.cpp
index afb625762ca7d00e14e182df8e220a618bc52d18..7d27c508fddae3e40a45c758720aea32d0f68a0d 100644
--- a/Source/wtf/VectorTest.cpp
+++ b/Source/wtf/VectorTest.cpp
@@ -286,7 +286,7 @@ TEST(VectorTest, SwapWithInlineCapacity)
vectorB.swap(vectorA);
}
-#if defined(ADDRESS_SANITIZER)
+#if defined(ANNOTATE_CONTIGUOUS_CONTAINER)
TEST(VectorTest, ContainerAnnotations)
{
Vector<int> vectorA;
@@ -325,52 +325,7 @@ TEST(VectorTest, ContainerAnnotations)
volatile int* intPointerB3 = vectorB.data();
EXPECT_DEATH((void)intPointerB3[2], "container-overflow");
}
-
-TEST(VectorTest, ContainerAnnotationsInline)
-{
- Vector<int> vectorA;
- Vector<int, 4> vectorB;
-
- vectorB.append(1);
- vectorB.append(2);
- volatile int* intPointerB = vectorB.data();
- EXPECT_DEATH((void)intPointerB[2], "container-overflow");
-
- vectorB.append(3);
- vectorB.append(4);
- vectorB.append(5);
- vectorB.reserveCapacity(16);
- intPointerB = vectorB.data();
- EXPECT_DEATH((void)intPointerB[5], "container-overflow");
-
- vectorB.clear();
- vectorB.shrinkToFit();
- vectorB.append(1);
- intPointerB = vectorB.data();
- EXPECT_DEATH((void)intPointerB[1], "container-overflow");
-
- vectorB.shrinkToFit();
- intPointerB = vectorB.data();
- EXPECT_DEATH((void)intPointerB[1], "container-overflow");
-
- vectorA = vectorB;
- vectorA.reserveCapacity(8);
- volatile int* intPointerA = vectorA.data();
- EXPECT_DEATH((void)intPointerA[1], "container-overflow");
-
- Vector<int, 4> vectorC;
- vectorC.append(3);
- vectorC.append(4);
- vectorB.swap(vectorC);
- intPointerB = vectorB.data();
- vectorC.reserveCapacity(8);
- volatile int* intPointerC = vectorC.data();
- vectorC[0] = 2;
- vectorB[1] = 1337;
- EXPECT_DEATH((void)intPointerC[1], "container-overflow");
- EXPECT_DEATH((void)intPointerB[2], "container-overflow");
-}
-#endif // defined(ADDRESS_SANITIZER)
+#endif // defined(ANNOTATE_CONTIGUOUS_CONTAINER)
class Comparable {
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698