summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04501ee)
raw | patch | inline | side by side (parent: 04501ee)
author | joncruz <joncruz@users.sourceforge.net> | |
Mon, 8 Dec 2008 07:15:15 +0000 (07:15 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Mon, 8 Dec 2008 07:15:15 +0000 (07:15 +0000) |
13 files changed:
diff --git a/src/attributes-test.h b/src/attributes-test.h
index 381821cd8c4456de30a4794631fe23a7f67967c4..bffc2779802334d2c825523dc6780693c6947f08 100644 (file)
--- a/src/attributes-test.h
+++ b/src/attributes-test.h
}
TS_ASSERT(!found);
- for ( guint index = 1; index < n_ids; index++ ) {
+ for ( unsigned int index = 1; index < n_ids; index++ ) {
guchar const* name = sp_attribute_name(index);
- gint postLookup = sp_attribute_lookup( reinterpret_cast<gchar const*>(name) );
+ unsigned int postLookup = sp_attribute_lookup( reinterpret_cast<gchar const*>(name) );
TSM_ASSERT_EQUALS( std::string("Enum round-trip through string {") + (char const*)name + "} failed.", index, postLookup );
}
index 5cd58c15cb1bde57aac4aa394c50ffc987c870eb..cdbf76b446721bcd2f4799ed08442ab8eeb6a8fc 100644 (file)
--- a/src/color-profile-test.h
+++ b/src/color-profile-test.h
#include "color-profile.h"
#include "color-profile-fns.h"
-using Inkscape::ColorProfile;
-
class ColorProfileTest : public CxxTest::TestSuite
{
public:
static void createSuiteSubclass( ColorProfileTest*& dst )
{
- ColorProfile *prof = static_cast<ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
+ Inkscape::ColorProfile *prof = static_cast<Inkscape::ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
if ( prof ) {
if ( prof->rendering_intent == (guint)Inkscape::RENDERING_INTENT_UNKNOWN ) {
TS_ASSERT_EQUALS( prof->rendering_intent, (guint)Inkscape::RENDERING_INTENT_UNKNOWN );
{"auto2", (guint)Inkscape::RENDERING_INTENT_UNKNOWN},
};
- ColorProfile *prof = static_cast<ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
+ Inkscape::ColorProfile *prof = static_cast<Inkscape::ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
TS_ASSERT( prof );
SP_OBJECT(prof)->document = _doc;
"something",
};
- ColorProfile *prof = static_cast<ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
+ Inkscape::ColorProfile *prof = static_cast<Inkscape::ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
TS_ASSERT( prof );
SP_OBJECT(prof)->document = _doc;
"something",
};
- ColorProfile *prof = static_cast<ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
+ Inkscape::ColorProfile *prof = static_cast<Inkscape::ColorProfile *>(g_object_new(COLORPROFILE_TYPE, NULL));
TS_ASSERT( prof );
SP_OBJECT(prof)->document = _doc;
index cc24adaad462b6e2476be76317b9096d365117aa..3be643568f7cf751d4ee8f67613082bff8bd6886 100644 (file)
static inline bool point_approx_equal(Geom::Point const &a, Geom::Point const &b, double const eps)
{
- using Geom::X; using Geom::Y;
- return ( NR_DF_TEST_CLOSE(a[X], b[X], eps) &&
- NR_DF_TEST_CLOSE(a[Y], b[Y], eps) );
+ return ( NR_DF_TEST_CLOSE(a[Geom::X], b[Geom::X], eps) &&
+ NR_DF_TEST_CLOSE(a[Geom::Y], b[Geom::Y], eps) );
}
static inline double square(double const x) {
index b5c15b60bcb575f348f25290e5aecf7c2ead99b0..d4267ffa518297af2f77dc31e74b0f05025a6306 100644 (file)
#include <libnr/nr-translate.h>
#include <libnr/nr-translate-ops.h>
#include <libnr/nr-translate-scale-ops.h>
-using NR::Matrix;
-using NR::X;
-using NR::Y;
inline bool point_equalp(NR::Point const &a, NR::Point const &b)
{
- return ( NR_DF_TEST_CLOSE(a[X], b[X], 1e-5) &&
- NR_DF_TEST_CLOSE(a[Y], b[Y], 1e-5) );
+ return ( NR_DF_TEST_CLOSE(a[NR::X], b[NR::X], 1e-5) &&
+ NR_DF_TEST_CLOSE(a[NR::Y], b[NR::Y], 1e-5) );
}
class NrMatrixTest : public CxxTest::TestSuite
static NrMatrixTest *createSuite() { return new NrMatrixTest(); }
static void destroySuite( NrMatrixTest *suite ) { delete suite; }
- Matrix const m_id;
+ NR::Matrix const m_id;
NR::rotate const r_id;
NR::translate const t_id;
- Matrix const c16;
+ NR::Matrix const c16;
NR::rotate const r86;
NR::Matrix const mr86;
NR::translate const t23;
void testCtorsAssignmentOp(void)
{
- Matrix const c16_copy(c16);
- Matrix c16_eq(m_id);
+ NR::Matrix const c16_copy(c16);
+ NR::Matrix c16_eq(m_id);
c16_eq = c16;
for(unsigned i = 0; i < 6; ++i) {
TS_ASSERT_EQUALS( c16[i], 1.0 + i );
TS_ASSERT_EQUALS( p0 * mr86, NR::Point(.8, .6) );
TS_ASSERT_EQUALS( p90 * r86, NR::Point(-.6, .8) );
TS_ASSERT_EQUALS( p90 * mr86, NR::Point(-.6, .8) );
- TS_ASSERT( matrix_equalp(Matrix( r86 * r86 ),
+ TS_ASSERT( matrix_equalp(NR::Matrix( r86 * r86 ),
mr86 * mr86,
1e-14) );
}
void testIdentity(void)
{
TS_ASSERT( m_id.test_identity() );
- TS_ASSERT( Matrix(t_id).test_identity() );
- TS_ASSERT( !(Matrix(NR::translate(-2, 3)).test_identity()) );
- TS_ASSERT( Matrix(r_id).test_identity() );
+ TS_ASSERT( NR::Matrix(t_id).test_identity() );
+ TS_ASSERT( !(NR::Matrix(NR::translate(-2, 3)).test_identity()) );
+ TS_ASSERT( NR::Matrix(r_id).test_identity() );
NR::rotate const rot180(NR::Point(-1, 0));
- TS_ASSERT( !(Matrix(rot180).test_identity()) );
- TS_ASSERT( Matrix(s_id).test_identity() );
- TS_ASSERT( !(Matrix(NR::scale(1.0, 0.0)).test_identity()) );
- TS_ASSERT( !(Matrix(NR::scale(0.0, 1.0)).test_identity()) );
- TS_ASSERT( !(Matrix(NR::scale(1.0, -1.0)).test_identity()) );
- TS_ASSERT( !(Matrix(NR::scale(-1.0, -1.0)).test_identity()) );
+ TS_ASSERT( !(NR::Matrix(rot180).test_identity()) );
+ TS_ASSERT( NR::Matrix(s_id).test_identity() );
+ TS_ASSERT( !(NR::Matrix(NR::scale(1.0, 0.0)).test_identity()) );
+ TS_ASSERT( !(NR::Matrix(NR::scale(0.0, 1.0)).test_identity()) );
+ TS_ASSERT( !(NR::Matrix(NR::scale(1.0, -1.0)).test_identity()) );
+ TS_ASSERT( !(NR::Matrix(NR::scale(-1.0, -1.0)).test_identity()) );
}
void testInverse(void)
{
TS_ASSERT_EQUALS( m_id.inverse(), m_id );
- TS_ASSERT_EQUALS( Matrix(t23).inverse(), Matrix(NR::translate(-2.0, -3.0)) );
+ TS_ASSERT_EQUALS( NR::Matrix(t23).inverse(), NR::Matrix(NR::translate(-2.0, -3.0)) );
NR::scale const s2(-4.0, 2.0);
NR::scale const sp5(-.25, .5);
- TS_ASSERT_EQUALS( Matrix(s2).inverse(), Matrix(sp5) );
- TS_ASSERT_EQUALS( Matrix(sp5).inverse(), Matrix(s2) );
+ TS_ASSERT_EQUALS( NR::Matrix(s2).inverse(), NR::Matrix(sp5) );
+ TS_ASSERT_EQUALS( NR::Matrix(sp5).inverse(), NR::Matrix(s2) );
}
void testEllipticQuadraticForm(void)
index bd6605802787566e454e7e11a27982c2dcee06ed..7d28c9c0e4e43966c4a0fd07de8d30e6c349dd97 100644 (file)
#include "libnr/nr-point-fns.h"
#include "2geom/isnan.h"
-using NR::Point;
-
class NrPointFnsTest : public CxxTest::TestSuite
{
public:
}
bool setupValid;
- Point const p3n4;
- Point const p0;
+ NR::Point const p3n4;
+ NR::Point const p0;
double const small;
double const inf;
double const nan;
- Point const small_left;
- Point const small_n3_4;
- Point const part_nan;
- Point const inf_left;
+ NR::Point const small_left;
+ NR::Point const small_n3_4;
+ NR::Point const part_nan;
+ NR::Point const inf_left;
void testL1(void)
void testUnitVector(void)
{
- TS_ASSERT_EQUALS( NR::unit_vector(p3n4), Point(.6, -0.8) );
- TS_ASSERT_EQUALS( NR::unit_vector(small_left), Point(-1.0, 0.0) );
- TS_ASSERT_EQUALS( NR::unit_vector(small_n3_4), Point(-.6, 0.8) );
+ TS_ASSERT_EQUALS( NR::unit_vector(p3n4), NR::Point(.6, -0.8) );
+ TS_ASSERT_EQUALS( NR::unit_vector(small_left), NR::Point(-1.0, 0.0) );
+ TS_ASSERT_EQUALS( NR::unit_vector(small_n3_4), NR::Point(-.6, 0.8) );
}
void testIsUnitVector(void)
TS_ASSERT( !NR::is_unit_vector(small_n3_4) );
TS_ASSERT( !NR::is_unit_vector(part_nan) );
TS_ASSERT( !NR::is_unit_vector(inf_left) );
- TS_ASSERT( !NR::is_unit_vector(Point(.5, 0.5)) );
- TS_ASSERT( NR::is_unit_vector(Point(.6, -0.8)) );
- TS_ASSERT( NR::is_unit_vector(Point(-.6, 0.8)) );
- TS_ASSERT( NR::is_unit_vector(Point(-1.0, 0.0)) );
- TS_ASSERT( NR::is_unit_vector(Point(1.0, 0.0)) );
- TS_ASSERT( NR::is_unit_vector(Point(0.0, -1.0)) );
- TS_ASSERT( NR::is_unit_vector(Point(0.0, 1.0)) );
+ TS_ASSERT( !NR::is_unit_vector(NR::Point(.5, 0.5)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(.6, -0.8)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(-.6, 0.8)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(-1.0, 0.0)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(1.0, 0.0)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(0.0, -1.0)) );
+ TS_ASSERT( NR::is_unit_vector(NR::Point(0.0, 1.0)) );
}
};
index 252b250229940ba9864e7f1bca16d8e6b2b1014e..5514d09d1f3282e6624cfc854fa7b3f0d6c8335b 100644 (file)
#include <libnr/nr-rotate.h>
#include <libnr/nr-rotate-fns.h>
#include <libnr/nr-rotate-ops.h>
-using NR::X;
-using NR::Y;
class NrRotateTest : public CxxTest::TestSuite
index dc5e6ef286148ac523485771e7b6ff26955204df..938e8e14ddf838a0d7fff35e3b0ba14841230af3 100644 (file)
#include <libnr/nr-scale.h>
#include <libnr/nr-scale-ops.h>
-using NR::X;
-using NR::Y;
class NrScaleTest : public CxxTest::TestSuite
{
void testXY_CtorArrayOperator(void)
{
- TS_ASSERT_EQUALS( sa[X], 1.5 );
- TS_ASSERT_EQUALS( sa[Y], 2.0 );
+ TS_ASSERT_EQUALS( sa[NR::X], 1.5 );
+ TS_ASSERT_EQUALS( sa[NR::Y], 2.0 );
TS_ASSERT_EQUALS( sa[0u], 1.5 );
TS_ASSERT_EQUALS( sa[1u], 2.0 );
}
void testPointCtor(void)
{
- TS_ASSERT_EQUALS( sb[X], b[X] );
- TS_ASSERT_EQUALS( sb[Y], b[Y] );
+ TS_ASSERT_EQUALS( sb[NR::X], b[NR::X] );
+ TS_ASSERT_EQUALS( sb[NR::Y], b[NR::Y] );
}
void testOpStarPointScale(void)
index 20b537a45505999ddfc5648ce17797b722209cef..630f435232c34755484f72d9aef2cc80b3cb44eb 100644 (file)
#include <libnr/nr-point-matrix-ops.h>
#include <libnr/nr-translate.h>
#include <libnr/nr-translate-ops.h>
-using NR::X;
-using NR::Y;
class NrTranslateTest : public CxxTest::TestSuite
{
void testCtorsArrayOperator(void)
{
- TS_ASSERT_EQUALS( tc[X], -3.0 );
- TS_ASSERT_EQUALS( tc[Y], -2.0 );
+ TS_ASSERT_EQUALS( tc[NR::X], -3.0 );
+ TS_ASSERT_EQUALS( tc[NR::Y], -2.0 );
- TS_ASSERT_EQUALS( tb[0], b[X] );
- TS_ASSERT_EQUALS( tb[1], b[Y] );
+ TS_ASSERT_EQUALS( tb[0], b[NR::X] );
+ TS_ASSERT_EQUALS( tb[1], b[NR::Y] );
}
void testAssignmentOperator(void)
index d51db1be7daaf302ed2fc44ae9ae05e76dcb47cb..e472c2d2930505472b7bb8826779c76ffee48c1b 100644 (file)
#include "libnr/nr-types.h"
#include "libnr/nr-point-fns.h"
#include <cmath>
-using NR::Point;
-using NR::X;
-using NR::Y;
class NrTypesTest : public CxxTest::TestSuite
{
NR::Point const b;
NR::Point const ab;
double const small;
- Point const small_left;
- Point const smallish_3_neg4;
+ NR::Point const small_left;
+ NR::Point const smallish_3_neg4;
void testXYValues( void )
{
- TS_ASSERT_EQUALS( X, 0 );
- TS_ASSERT_EQUALS( Y, 1 );
+ TS_ASSERT_EQUALS( NR::X, 0 );
+ TS_ASSERT_EQUALS( NR::Y, 1 );
}
void testXYCtorAndArrayConst(void)
{
- TS_ASSERT_EQUALS( a[X], 1.5 );
- TS_ASSERT_EQUALS( a[Y], 2.0 );
+ TS_ASSERT_EQUALS( a[NR::X], 1.5 );
+ TS_ASSERT_EQUALS( a[NR::Y], 2.0 );
}
void testCopyCtor(void)
void testNonConstArrayOperator(void)
{
NR::Point a_copy(a);
- a_copy[X] = -2.0;
+ a_copy[NR::X] = -2.0;
TS_ASSERT_DIFFERS( a_copy, a );
TS_ASSERT_DIFFERS( a_copy, b );
- a_copy[Y] = 3.0;
+ a_copy[NR::Y] = 3.0;
TS_ASSERT_EQUALS( a_copy, b );
}
void testUnaryMinus(void)
{
- TS_ASSERT_EQUALS( -a, Point(-a[X], -a[Y]) );
+ TS_ASSERT_EQUALS( -a, NR::Point(-a[NR::X], -a[NR::Y]) );
}
void tetScaleDivide(void)
void testDot(void)
{
- TS_ASSERT_EQUALS( dot(a, b), ( a[X] * b[X] +
- a[Y] * b[Y] ) );
+ TS_ASSERT_EQUALS( dot(a, b), ( a[NR::X] * b[NR::X] +
+ a[NR::Y] * b[NR::Y] ) );
TS_ASSERT_EQUALS( dot(a, NR::rot90(a)), 0.0 );
TS_ASSERT_EQUALS( dot(-a, NR::rot90(a)), 0.0 );
}
void testOperatorPlusEquals(void)
{
- Point x(a);
+ NR::Point x(a);
x += b;
TS_ASSERT_EQUALS( x, ab );
}
void tetOperatorDivEquals(void)
{
- Point x(a);
+ NR::Point x(a);
x /= .5;
TS_ASSERT_EQUALS( x, a + a );
}
void testNormalize(void)
{
- Point x(small_left);
+ NR::Point x(small_left);
x.normalize();
- TS_ASSERT_EQUALS( x, Point(-1.0, 0.0) );
+ TS_ASSERT_EQUALS( x, NR::Point(-1.0, 0.0) );
x = smallish_3_neg4;
x.normalize();
- TS_ASSERT_EQUALS( x, Point(0.6, -0.8) );
+ TS_ASSERT_EQUALS( x, NR::Point(0.6, -0.8) );
}
};
index ffe15ee9af9dec7eb03d8afbde7f7d7fc94715d6..5656baf5c5d8083b46f5f578db2f29ebb11321fd 100644 (file)
#include "svg/css-ostringstream.h"
// dummy functions to prevent link errors
-int sp_main_gui(int argc, char const **argv) { return 0; }
-int sp_main_console(int argc, char const **argv) { return 0; }
+int sp_main_gui(int /*argc*/, char const **/*argv*/) { return 0; }
+int sp_main_console(int /*argc*/, char const **/*argv*/) { return 0; }
template<typename T>
static void
index d249c675c9bfeeb8a3db60ed97a0a2100d8e1192..49af63a5d2eba4d4c19c6a96d35a3769dd357da6 100644 (file)
--- a/src/svg/svg-color-test.h
+++ b/src/svg/svg-color-test.h
}
/* And a few completely random ones. */
- using std::rand;
for (unsigned i = 500; i--;) { /* Arbitrary number of iterations. */
- unsigned const rgb24 = (rand() >> 4) & 0xffffff;
+ unsigned const rgb24 = (std::rand() >> 4) & 0xffffff;
check_rgb24(rgb24);
}
}
index 08e7cfa4160ccfd40d59cab5f80469eca970ff39..c2db79fee0e52d5f4e39fa797ec9299ce65edb2b 100644 (file)
#include <stdarg.h>
#include "util/list-container.h"
-using Inkscape::Util::ListContainer;
-
#define ARRAY_RANGE(array) (array), (array)+sizeof((array))/sizeof((array)[0])
-static bool check_values(ListContainer<int> const &c, unsigned n_values, ...) {
+static bool check_values(Inkscape::Util::ListContainer<int> const &c, unsigned n_values, ...) {
bool ret = true;
va_list args;
va_start(args, n_values);
- ListContainer<int>::const_iterator iter(c.begin());
+ Inkscape::Util::ListContainer<int>::const_iterator iter(c.begin());
while ( n_values && iter != c.end() ) {
int const value = va_arg(args, int);
if ( value != *iter ) {
{
int const values[]={1,2,3,4};
int const * const values_end=values+4;
- ListContainer<int> container(values, values_end);
+ Inkscape::Util::ListContainer<int> container(values, values_end);
- ListContainer<int>::iterator container_iter=container.begin();
+ Inkscape::Util::ListContainer<int>::iterator container_iter=container.begin();
int const * values_iter=values;
while ( values_iter != values_end && container_iter != container.end() ) {
int const b[] = { 1, 2, 3, 4 };
int const c[] = { 1, 2, 3 };
int const d[] = { 1, 2, 3, 5 };
- ListContainer<int> c_a(ARRAY_RANGE(a));
- ListContainer<int> c_b(ARRAY_RANGE(b));
- ListContainer<int> c_c(ARRAY_RANGE(c));
- ListContainer<int> c_d(ARRAY_RANGE(d));
+ Inkscape::Util::ListContainer<int> c_a(ARRAY_RANGE(a));
+ Inkscape::Util::ListContainer<int> c_b(ARRAY_RANGE(b));
+ Inkscape::Util::ListContainer<int> c_c(ARRAY_RANGE(c));
+ Inkscape::Util::ListContainer<int> c_d(ARRAY_RANGE(d));
TS_ASSERT(c_a == c_b);
TS_ASSERT(!( c_a != c_b ));
int const b[] = { 1, 2, 2, 4 };
int const c[] = { 1, 2, 4, 4 };
int const d[] = { 1, 2, 3 };
- ListContainer<int> c_a(ARRAY_RANGE(a));
- ListContainer<int> c_b(ARRAY_RANGE(b));
- ListContainer<int> c_c(ARRAY_RANGE(c));
- ListContainer<int> c_d(ARRAY_RANGE(d));
+ Inkscape::Util::ListContainer<int> c_a(ARRAY_RANGE(a));
+ Inkscape::Util::ListContainer<int> c_b(ARRAY_RANGE(b));
+ Inkscape::Util::ListContainer<int> c_c(ARRAY_RANGE(c));
+ Inkscape::Util::ListContainer<int> c_d(ARRAY_RANGE(d));
TS_ASSERT(c_a >= c_b);
TS_ASSERT(!( c_a < c_b ));
TS_ASSERT(!( c_a >= c_c ));
void testAssignmentOperator()
{
int const a[] = { 1, 2, 3, 4 };
- ListContainer<int> c_a(ARRAY_RANGE(a));
- ListContainer<int> c_c;
+ Inkscape::Util::ListContainer<int> c_a(ARRAY_RANGE(a));
+ Inkscape::Util::ListContainer<int> c_c;
TS_ASSERT(c_a != c_c);
c_c = c_a;
TS_ASSERT(c_a == c_c);
void testFillConstructor()
{
- ListContainer<int> filled((std::size_t)3, 2);
+ Inkscape::Util::ListContainer<int> filled((std::size_t)3, 2);
TS_ASSERT(check_values(filled, 3, 2, 2, 2));
}
void testContainerSize()
{
- ListContainer<int> empty;
+ Inkscape::Util::ListContainer<int> empty;
TS_ASSERT(empty.empty());
- TS_ASSERT_EQUALS(empty.size() , 0);
+ TS_ASSERT_EQUALS(static_cast<int>(empty.size()), 0);
int const a[] = { 1, 2, 3 };
- ListContainer<int> c_a(ARRAY_RANGE(a));
+ Inkscape::Util::ListContainer<int> c_a(ARRAY_RANGE(a));
TS_ASSERT(!c_a.empty());
- TS_ASSERT_EQUALS(c_a.size() , 3);
+ TS_ASSERT_EQUALS(static_cast<int>(c_a.size()), 3);
- TS_ASSERT_LESS_THAN(0 , empty.max_size());
+ TS_ASSERT_LESS_THAN(0, static_cast<int>(empty.max_size()));
}
void testAppending()
{
- ListContainer<int> c;
+ Inkscape::Util::ListContainer<int> c;
c.push_back(1);
TS_ASSERT(check_values(c, 1, 1));
c.push_back(2);
{
int const a[] = { 1, 2, 3, 4 };
int const b[] = { 5, 6, 7 };
- ListContainer<int> c_a(ARRAY_RANGE(a));
- ListContainer<int> c_b(ARRAY_RANGE(b));
+ Inkscape::Util::ListContainer<int> c_a(ARRAY_RANGE(a));
+ Inkscape::Util::ListContainer<int> c_b(ARRAY_RANGE(b));
c_a.insert(c_a.end(), c_b.begin(), c_b.end());
TS_ASSERT(check_values(c_a, 7, 1, 2, 3, 4, 5, 6, 7));
}
void testPrepending()
{
- ListContainer<int> c;
+ Inkscape::Util::ListContainer<int> c;
c.push_front(1);
TS_ASSERT(check_values(c, 1, 1));
c.push_front(2);
void testSingleValueInsertion()
{
- ListContainer<int> c;
+ Inkscape::Util::ListContainer<int> c;
c.insert(c.begin(), 1);
TS_ASSERT(check_values(c, 1, 1));
c.insert(c.begin(), 3);
TS_ASSERT(check_values(c, 3, 3, 1, 2));
- ListContainer<int>::iterator pos=c.begin();
+ Inkscape::Util::ListContainer<int>::iterator pos=c.begin();
++pos;
c.insert(pos, 4);
TS_ASSERT(check_values(c, 4, 3, 4, 1, 2));
void testSingleValueErasure()
{
int const values[] = { 1, 2, 3, 4 };
- ListContainer<int> c(ARRAY_RANGE(values));
+ Inkscape::Util::ListContainer<int> c(ARRAY_RANGE(values));
c.erase(c.begin());
TS_ASSERT(check_values(c, 3, 2, 3, 4));
- ListContainer<int>::iterator pos=c.begin();
+ Inkscape::Util::ListContainer<int>::iterator pos=c.begin();
++pos;
c.erase(pos);
TS_ASSERT(check_values(c, 2, 2, 4));
void testPopFront()
{
int const full_ary[] = { 1, 2, 3 };
- ListContainer<int> t(ARRAY_RANGE(full_ary));
+ Inkscape::Util::ListContainer<int> t(ARRAY_RANGE(full_ary));
TS_ASSERT(check_values(t, 3, 1, 2, 3));
TS_ASSERT_EQUALS(t.back() , 3);
t.pop_front();
{
int const full_ary[] = { 1, 2, 3, 4 };
int const exp_ary[] = { 1, 3, 4 };
- ListContainer<int> full_list(ARRAY_RANGE(full_ary));
- ListContainer<int> exp_list(ARRAY_RANGE(exp_ary));
+ Inkscape::Util::ListContainer<int> full_list(ARRAY_RANGE(full_ary));
+ Inkscape::Util::ListContainer<int> exp_list(ARRAY_RANGE(exp_ary));
TS_ASSERT(full_list != exp_list);
full_list.erase_after(full_list.begin());
TS_ASSERT(full_list == exp_list);
diff --git a/src/verbs-test.h b/src/verbs-test.h
index 4fe6ea888c9e6d62b22f07b2cdce861c953d9319..145b3859fade88daed70c6bf68a191d87b0d6574 100644 (file)
--- a/src/verbs-test.h
+++ b/src/verbs-test.h
TSM_ASSERT( descr, verb );
if ( verb )
{
- TSM_ASSERT_EQUALS( descr, verb->get_code(), i );
+ TSM_ASSERT_EQUALS( descr, verb->get_code(), static_cast<unsigned int>(i) );
if ( i != static_cast<int>(SP_VERB_INVALID) )
{
//TSM_ASSERT( descr, bounced );
if ( bounced )
{
- TSM_ASSERT_EQUALS( descr, bounced->get_code(), i );
+ TSM_ASSERT_EQUALS( descr, bounced->get_code(), static_cast<unsigned int>(i) );
}
else
{