diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-12 21:08:21 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-12 21:08:21 +0000 |
| commit | 4f3e8770859705cb80bb38ec57348677d57b7e36 (patch) | |
| tree | 9c1292a14973e689a0dc486ce5a3c7a1d395b821 /testfiles/src | |
| parent | Added return value to remove (diff) | |
| parent | Fix faulty comparison function. (diff) | |
| download | inkscape-4f3e8770859705cb80bb38ec57348677d57b7e36.tar.gz inkscape-4f3e8770859705cb80bb38ec57348677d57b7e36.zip | |
Replaced old selection containers
(bzr r14954.1.6)
Diffstat (limited to 'testfiles/src')
| -rw-r--r-- | testfiles/src/attributes-test.cpp | 7 | ||||
| -rw-r--r-- | testfiles/src/object-set-test.cpp | 21 |
2 files changed, 25 insertions, 3 deletions
diff --git a/testfiles/src/attributes-test.cpp b/testfiles/src/attributes-test.cpp index 41c0274ec..e53eb9aef 100644 --- a/testfiles/src/attributes-test.cpp +++ b/testfiles/src/attributes-test.cpp @@ -1,3 +1,4 @@ + /* * Unit tests for attributes. * @@ -406,6 +407,8 @@ std::vector<AttributeInfo> getKnownAttrs() AttributeInfo("inkscape:layoutOptions", true), AttributeInfo("inkscape:lockguides", true), AttributeInfo("inkscape:locked", true), + AttributeInfo("inkscape:measure-end", true), + AttributeInfo("inkscape:measure-start", true), AttributeInfo("inkscape:object-nodes", true), AttributeInfo("inkscape:object-paths", true), AttributeInfo("inkscape:original", true), @@ -431,6 +434,7 @@ std::vector<AttributeInfo> getKnownAttrs() AttributeInfo("inkscape:snap-nodes", true), AttributeInfo("inkscape:snap-object-midpoints", true), AttributeInfo("inkscape:snap-others", true), + AttributeInfo("inkscape:snap-from-guide", true), AttributeInfo("inkscape:snap-page", true), AttributeInfo("inkscape:snap-path-clip", true), AttributeInfo("inkscape:snap-path-mask", true), @@ -460,11 +464,11 @@ std::vector<AttributeInfo> getKnownAttrs() AttributeInfo("sodipodi:argument", true), AttributeInfo("sodipodi:cx", true), AttributeInfo("sodipodi:cy", true), + AttributeInfo("sodipodi:docname", true), AttributeInfo("sodipodi:end", true), AttributeInfo("sodipodi:expansion", true), AttributeInfo("sodipodi:insensitive", true), AttributeInfo("sodipodi:linespacing", true), - AttributeInfo("sodipodi:nonprintable", true), AttributeInfo("sodipodi:open", true), AttributeInfo("sodipodi:original", true), AttributeInfo("sodipodi:r1", true), @@ -477,6 +481,7 @@ std::vector<AttributeInfo> getKnownAttrs() AttributeInfo("sodipodi:sides", true), AttributeInfo("sodipodi:start", true), AttributeInfo("sodipodi:t0", true), + AttributeInfo("sodipodi:type", true), AttributeInfo("sodipodi:version", false), // SPMeshPatch diff --git a/testfiles/src/object-set-test.cpp b/testfiles/src/object-set-test.cpp index c3c058d9a..124740495 100644 --- a/testfiles/src/object-set-test.cpp +++ b/testfiles/src/object-set-test.cpp @@ -118,8 +118,8 @@ TEST_F(ObjectSetTest, AdvancedDescendants) { EXPECT_TRUE(set.contains(X)); bool resultF2 = set.add(F); EXPECT_TRUE(resultF2); - EXPECT_EQ(1, set.size()); - EXPECT_TRUE(set.contains(A)); + EXPECT_EQ(5, set.size()); + EXPECT_TRUE(set.contains(F)); } TEST_F(ObjectSetTest, Removing) { @@ -184,3 +184,20 @@ TEST_F(ObjectSetTest, SetRemoving) { EXPECT_STREQ(nullptr, A->getId()); EXPECT_STREQ(nullptr, C->getId()); } + +TEST_F(ObjectSetTest, SetOrder) { + set.add(A); + set.add(D); + set.add(B); + set.add(E); + set.add(C); + EXPECT_EQ(5, set.size()); + auto it = set.begin(); + EXPECT_EQ(A, *it++); + EXPECT_EQ(D, *it++); + EXPECT_EQ(B, *it++); + EXPECT_EQ(E, *it++); + EXPECT_EQ(C, *it++); + EXPECT_EQ(set.end(), it); + +}
\ No newline at end of file |
