summaryrefslogtreecommitdiffstats
path: root/document/src/tests/documenttestcase.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-17 09:25:04 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-17 09:25:04 +0000
commitd092c8e45fe74f0fe7808a6d4fa363fb0a009181 (patch)
tree153d0b894a87fc4b6044893dc3f03bd744d619c3 /document/src/tests/documenttestcase.cpp
parentb1bc742e8ac18dd41ea8f19919005257fbfa277b (diff)
GC unused code and simplify StructFieldValue.
Diffstat (limited to 'document/src/tests/documenttestcase.cpp')
-rw-r--r--document/src/tests/documenttestcase.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/document/src/tests/documenttestcase.cpp b/document/src/tests/documenttestcase.cpp
index 93bcd61ddb0..9a3d9c94a91 100644
--- a/document/src/tests/documenttestcase.cpp
+++ b/document/src/tests/documenttestcase.cpp
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/document/base/testdocman.h>
-#include <vespa/vespalib/io/fileutil.h>
#include <vespa/document/datatype/annotationreferencedatatype.h>
#include <vespa/document/fieldvalue/iteratorhandler.h>
#include <vespa/document/repo/configbuilder.h>
@@ -9,6 +8,9 @@
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
+#include <vespa/vespalib/io/fileutil.h>
+#include <vespa/vespalib/util/growablebytebuffer.h>
+
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/document/util/serializableexceptions.h>
#include <vespa/document/util/bytebuffer.h>
@@ -28,10 +30,15 @@ using namespace fieldvalue;
TEST(DocumentTest, testSizeOf)
{
+ EXPECT_EQ(24u, sizeof(std::vector<char>));
+ EXPECT_EQ(24u, sizeof(vespalib::alloc::Alloc));
+ EXPECT_EQ(56u, sizeof(ByteBuffer));
+ EXPECT_EQ(32u, sizeof(vespalib::GrowableByteBuffer));
+ EXPECT_EQ(56u, sizeof(ByteBuffer));
EXPECT_EQ(88ul, sizeof(IdString));
EXPECT_EQ(104ul, sizeof(DocumentId));
- EXPECT_EQ(208ul, sizeof(Document));
- EXPECT_EQ(72ul, sizeof(StructFieldValue));
+ EXPECT_EQ(200ul, sizeof(Document));
+ EXPECT_EQ(64ul, sizeof(StructFieldValue));
EXPECT_EQ(24ul, sizeof(StructuredFieldValue));
EXPECT_EQ(64ul, sizeof(SerializableArray));
}
@@ -63,7 +70,7 @@ TEST(DocumentTest, testFieldPath)
class Handler : public fieldvalue::IteratorHandler {
public:
Handler();
- ~Handler();
+ ~Handler() override;
const std::string & getResult() const { return _result; }
private:
void onPrimitive(uint32_t, const Content&) override {