summaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-24 22:47:04 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-24 22:47:04 -0300
commitc2fdf775230ea9b0d9a6b1af209cd0a99e2a848e (patch)
tree882e264cf942c2c9512d482d076ab530a36815b9 /tests/libsample
parent7d069eda6d0df0ca6976612af2077a85b3ab3fea (diff)
downloadshiboken-c2fdf775230ea9b0d9a6b1af209cd0a99e2a848e.tar.gz
shiboken-c2fdf775230ea9b0d9a6b1af209cd0a99e2a848e.tar.xz
shiboken-c2fdf775230ea9b0d9a6b1af209cd0a99e2a848e.zip
added unit tests for stl::pair and stl::list conversions on libsample
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/listuser.h6
-rw-r--r--tests/libsample/pairuser.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/libsample/listuser.h b/tests/libsample/listuser.h
index c1ea7091..f2bfe13b 100644
--- a/tests/libsample/listuser.h
+++ b/tests/libsample/listuser.h
@@ -17,6 +17,12 @@ public:
double sumList(std::list<int> vallist);
double sumList(std::list<double> vallist);
+
+ void setList(std::list<int> lst) { m_lst = lst; }
+ std::list<int> getList() { return m_lst; }
+
+private:
+ std::list<int> m_lst;
};
#endif // LISTUSER_H
diff --git a/tests/libsample/pairuser.h b/tests/libsample/pairuser.h
index 27cf7668..109d7218 100644
--- a/tests/libsample/pairuser.h
+++ b/tests/libsample/pairuser.h
@@ -14,6 +14,12 @@ public:
std::pair<int, int> callCreatePair();
static std::pair<Complex, Complex> createComplexPair(Complex cpx0, Complex cpx1);
double sumPair(std::pair<int, double> pair);
+
+ void setPair(std::pair<int, int> pair) { m_pair = pair; }
+ std::pair<int, int> getPair() { return m_pair; }
+
+private:
+ std::pair<int, int> m_pair;
};
#endif // PAIRUSER_H