diff options
Diffstat (limited to 'document/src/tests/fieldsettest.cpp')
-rw-r--r-- | document/src/tests/fieldsettest.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/document/src/tests/fieldsettest.cpp b/document/src/tests/fieldsettest.cpp index c94523ea23f..8a01c53c278 100644 --- a/document/src/tests/fieldsettest.cpp +++ b/document/src/tests/fieldsettest.cpp @@ -274,14 +274,10 @@ TEST(FieldCollectionTest, testHash ) { TestDocMan testDocMan; const DocumentTypeRepo& repo = testDocMan.getTypeRepo(); const DocumentType & type = *repo.getDocumentType("testdoctype1"); - Field::Set set; - EXPECT_EQ(0ul, FieldCollection(type, set).hash()); - set.insert(&type.getField("headerval")); - EXPECT_EQ(0x548599858c77ef83ul, FieldCollection(type, set).hash()); - set.insert(&type.getField("hstringval")); - EXPECT_EQ(0x4a7ff2406d36a9b0ul, FieldCollection(type, set).hash()); - set.erase(&type.getField("headerval")); - EXPECT_EQ(0x1e0918531b19734ul, FieldCollection(type, set).hash()); + EXPECT_EQ(0ul, FieldCollection(type, Field::Set::Builder().build()).hash()); + EXPECT_EQ(0x548599858c77ef83ul, FieldCollection(type, Field::Set::Builder().insert(&type.getField("headerval")).build()).hash()); + EXPECT_EQ(0x4a7ff2406d36a9b0ul, FieldCollection(type, Field::Set::Builder().insert(&type.getField("headerval")).insert(&type.getField("hstringval")).build()).hash()); + EXPECT_EQ(0x1e0918531b19734ul, FieldCollection(type, Field::Set::Builder().insert(&type.getField("hstringval")).build()).hash()); } } // document |