From 78b1cd271a8d2bf5ce623d0e604a0388a69611a8 Mon Sep 17 00:00:00 2001 From: dellaert Date: Mon, 1 Dec 2014 20:34:05 +0100 Subject: [PATCH] Fixed testClass unit tests --- wrap/tests/testClass.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wrap/tests/testClass.cpp b/wrap/tests/testClass.cpp index abf006bff..0ceff500b 100644 --- a/wrap/tests/testClass.cpp +++ b/wrap/tests/testClass.cpp @@ -43,12 +43,21 @@ TEST( Class, OverloadingMethod ) { cls.addMethod(verbose, is_const, name, args, retVal, tmplate); EXPECT_LONGS_EQUAL(1, cls.nrMethods()); EXPECT(cls.exists(name)); - Method method = cls.method(name); - EXPECT_LONGS_EQUAL(1, method.nrOverloads()); + EXPECT_LONGS_EQUAL(1, cls.method(name).nrOverloads()); + // add an overload w different argument list + args.push_back(Argument(Qualified("Vector",Qualified::EIGEN),"v")); cls.addMethod(verbose, is_const, name, args, retVal, tmplate); EXPECT_LONGS_EQUAL(1, cls.nrMethods()); - EXPECT_LONGS_EQUAL(2, method.nrOverloads()); + EXPECT_LONGS_EQUAL(2, cls.method(name).nrOverloads()); + + // add with non-trivial template list, will create two different functions + boost::optional