summaryrefslogtreecommitdiff
path: root/decoder/small_vector_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/small_vector_test.cc')
-rw-r--r--decoder/small_vector_test.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/decoder/small_vector_test.cc b/decoder/small_vector_test.cc
index 84237791..d1d8dcab 100644
--- a/decoder/small_vector_test.cc
+++ b/decoder/small_vector_test.cc
@@ -12,10 +12,10 @@ class SVTest : public testing::Test {
virtual void SetUp() { }
virtual void TearDown() { }
};
-
+
TEST_F(SVTest, LargerThan2) {
- SmallVector v;
- SmallVector v2;
+ SmallVectorInt v;
+ SmallVectorInt v2;
v.push_back(0);
v.push_back(1);
v.push_back(2);
@@ -24,7 +24,7 @@ TEST_F(SVTest, LargerThan2) {
assert(v[1] == 1);
assert(v[0] == 0);
v2 = v;
- SmallVector copy(v);
+ SmallVectorInt copy(v);
assert(copy.size() == 3);
assert(copy[0] == 0);
assert(copy[1] == 1);
@@ -42,12 +42,12 @@ TEST_F(SVTest, LargerThan2) {
assert(v2[2] == 0);
assert(v2[1] == -1);
assert(v2[0] == -2);
- SmallVector v3(1,1);
+ SmallVectorInt v3(1,1);
assert(v3[0] == 1);
v2 = v3;
assert(v2.size() == 1);
assert(v2[0] == 1);
- SmallVector v4(10, 1);
+ SmallVectorInt v4(10, 1);
assert(v4.size() == 10);
assert(v4[5] == 1);
assert(v4[9] == 1);
@@ -56,7 +56,7 @@ TEST_F(SVTest, LargerThan2) {
assert(v4[2] == 2);
assert(v4[1] == 1);
assert(v4[0] == 0);
- SmallVector v5(10, 2);
+ SmallVectorInt v5(10, 2);
assert(v5.size() == 10);
assert(v5[7] == 2);
assert(v5[0] == 2);
@@ -65,7 +65,7 @@ TEST_F(SVTest, LargerThan2) {
assert(v.size() == 10);
assert(v[2] == 2);
assert(v[9] == 2);
- SmallVector cc;
+ SmallVectorInt cc;
for (int i = 0; i < 33; ++i)
cc.push_back(i);
for (int i = 0; i < 33; ++i)
@@ -88,10 +88,10 @@ TEST_F(SVTest, LargerThan2) {
}
TEST_F(SVTest, Small) {
- SmallVector v;
- SmallVector v1(1,0);
- SmallVector v2(2,10);
- SmallVector v1a(2,0);
+ SmallVectorInt v;
+ SmallVectorInt v1(1,0);
+ SmallVectorInt v2(2,10);
+ SmallVectorInt v1a(2,0);
EXPECT_TRUE(v1 != v1a);
EXPECT_TRUE(v1 == v1);
EXPECT_EQ(v1[0], 0);
@@ -101,7 +101,7 @@ TEST_F(SVTest, Small) {
--v2[0];
EXPECT_EQ(v2[0], 9);
EXPECT_EQ(v2[1], 11);
- SmallVector v3(v2);
+ SmallVectorInt v3(v2);
assert(v3[0] == 9);
assert(v3[1] == 11);
assert(!v3.empty());
@@ -118,7 +118,7 @@ TEST_F(SVTest, Small) {
assert(v3[1] == 11);
assert(!v3.empty());
assert(v3.size() == 2);
- cerr << sizeof(SmallVector) << endl;
+ cerr << sizeof(SmallVectorInt) << endl;
cerr << sizeof(vector<int>) << endl;
}