Fix region_tests compilation (as now it depends on pixman library)

This commit is contained in:
David Capello 2014-10-29 10:37:44 -03:00
parent d327ab536f
commit ec99866a23
2 changed files with 9 additions and 5 deletions

View File

@ -316,7 +316,7 @@ function(find_tests dir dependencies)
endfunction()
find_tests(base base-lib ${sys_libs})
find_tests(gfx gfx-lib base-lib ${sys_libs})
find_tests(gfx gfx-lib base-lib ${libs3rdparty} ${sys_libs})
find_tests(raster raster-lib gfx-lib base-lib ${libs3rdparty} ${sys_libs})
find_tests(doc doc-lib raster-lib gfx-lib base-lib ${libs3rdparty} ${sys_libs})
find_tests(css css-lib gfx-lib base-lib ${libs3rdparty} ${sys_libs})

View File

@ -4,6 +4,10 @@
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gtest/gtest.h>
#include "gfx/region.h"
@ -52,12 +56,12 @@ TEST(Region, Equal)
{
Region a;
a = Rect(2, 3, 4, 5);
EXPECT_EQ(Rect(2, 3, 4, 5), a.getBounds());
EXPECT_EQ(Rect(2, 3, 4, 5), a.bounds());
EXPECT_EQ(Rect(2, 3, 4, 5), a[0]);
EXPECT_FALSE(a.isEmpty());
a = Rect(6, 7, 8, 9);
EXPECT_EQ(Rect(6, 7, 8, 9), a.getBounds());
EXPECT_EQ(Rect(6, 7, 8, 9), a.bounds());
EXPECT_EQ(Rect(6, 7, 8, 9), a[0]);
Region b;
@ -80,8 +84,8 @@ TEST(Region, Union)
{
Region a(Rect(2, 3, 4, 5));
Region b(Rect(6, 3, 4, 5));
EXPECT_EQ(Rect(2, 3, 8, 5), Region().createUnion(a, b).getBounds());
EXPECT_EQ(Rect(2, 3, 8, 5), Region().createUnion(b, a).getBounds());
EXPECT_EQ(Rect(2, 3, 8, 5), Region().createUnion(a, b).bounds());
EXPECT_EQ(Rect(2, 3, 8, 5), Region().createUnion(b, a).bounds());
ASSERT_EQ(1, Region().createUnion(a, b).size());
ASSERT_EQ(1, Region().createUnion(b, a).size());
EXPECT_EQ(Rect(2, 3, 8, 5), Region().createUnion(a, b)[0]);