summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 03:52:25 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 03:52:25 -0300
commit9d58de1bfc7e93606fb5582dd05eea185e9fe851 (patch)
tree10b195facb6e35749195d7f62576c965265791b1
parent2132a3eb82830d0719d19eaadb32e39222948bca (diff)
commented debug messages from test library
-rw-r--r--tests/libsample/abstract.cpp22
-rw-r--r--tests/libsample/derived.cpp28
-rw-r--r--tests/libsample/kindergarten.cpp13
-rw-r--r--tests/libsample/listuser.cpp7
-rw-r--r--tests/libsample/pairuser.cpp6
5 files changed, 38 insertions, 38 deletions
diff --git a/tests/libsample/abstract.cpp b/tests/libsample/abstract.cpp
index 8b49f37f..39ac0fdb 100644
--- a/tests/libsample/abstract.cpp
+++ b/tests/libsample/abstract.cpp
@@ -5,39 +5,39 @@ using namespace std;
Abstract::Abstract(int id) : m_id(id)
{
- cout << __PRETTY_FUNCTION__;
- show();
- cout << endl;
+ //cout << __PRETTY_FUNCTION__;
+ //show();
+ //cout << endl;
}
Abstract::~Abstract()
{
- cout << __PRETTY_FUNCTION__;
- show();
- cout << endl;
+ //cout << __PRETTY_FUNCTION__;
+ //show();
+ //cout << endl;
}
void
Abstract::unpureVirtual()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
}
void
Abstract::callUnpureVirtual()
{
- cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl;
+ //cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl;
this->unpureVirtual();
- cout << __PRETTY_FUNCTION__ << " --- END" << endl;
+ //cout << __PRETTY_FUNCTION__ << " --- END" << endl;
}
void
Abstract::callPureVirtual()
{
- cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl;
+ //cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl;
this->pureVirtual();
- cout << __PRETTY_FUNCTION__ << " --- END" << endl;
+ //cout << __PRETTY_FUNCTION__ << " --- END" << endl;
}
void
diff --git a/tests/libsample/derived.cpp b/tests/libsample/derived.cpp
index 9a86a9c9..18cd514e 100644
--- a/tests/libsample/derived.cpp
+++ b/tests/libsample/derived.cpp
@@ -5,16 +5,16 @@ using namespace std;
Derived::Derived(int id) : Abstract(id)
{
- cout << __PRETTY_FUNCTION__;
- show();
- cout << endl;
+ //cout << __PRETTY_FUNCTION__;
+ //show();
+ //cout << endl;
}
Derived::~Derived()
{
- cout << __PRETTY_FUNCTION__;
- show();
- cout << endl;
+ //cout << __PRETTY_FUNCTION__;
+ //show();
+ //cout << endl;
}
Abstract*
@@ -27,54 +27,54 @@ Derived::createObject()
void
Derived::pureVirtual()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
}
void
Derived::unpureVirtual()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
}
bool
Derived::singleArgument(bool b)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return !b;
}
double
Derived::defaultValue(int n)
{
- cout << __PRETTY_FUNCTION__ << "[n = 0]" << endl;
+ //cout << __PRETTY_FUNCTION__ << "[n = 0]" << endl;
return ((double) n) + 0.1;
}
PolymorphicFuncEnum
Derived::polymorphic(int i, int d)
{
- cout << __PRETTY_FUNCTION__ << "[i = 0, d = 0]" << endl;
+ //cout << __PRETTY_FUNCTION__ << "[i = 0, d = 0]" << endl;
return PolymorphicFunc_ii;
}
PolymorphicFuncEnum
Derived::polymorphic(double n)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return PolymorphicFunc_d;
}
Derived::OtherPolymorphicFuncEnum
Derived::otherPolymorphic(int a, int b, bool c, double d)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return OtherPolymorphicFunc_iibd;
}
Derived::OtherPolymorphicFuncEnum
Derived::otherPolymorphic(int a, double b)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return OtherPolymorphicFunc_id;
}
diff --git a/tests/libsample/kindergarten.cpp b/tests/libsample/kindergarten.cpp
index 8332e4fe..e2238668 100644
--- a/tests/libsample/kindergarten.cpp
+++ b/tests/libsample/kindergarten.cpp
@@ -5,9 +5,9 @@ using namespace std;
KinderGarten::~KinderGarten()
{
- cout << __PRETTY_FUNCTION__ << " ---- BEGIN" << endl;
+ //cout << __PRETTY_FUNCTION__ << " ---- BEGIN" << endl;
killChildren();
- cout << __PRETTY_FUNCTION__ << " ---- END" << endl;
+ //cout << __PRETTY_FUNCTION__ << " ---- END" << endl;
}
void
@@ -19,10 +19,10 @@ KinderGarten::addChild(Abstract* child)
void
KinderGarten::killChildren()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
while (!m_children.empty()) {
- m_children.back()->show();
- cout << endl;
+ //m_children.back()->show();
+ //cout << endl;
delete m_children.back();
m_children.pop_back();
}
@@ -31,7 +31,7 @@ KinderGarten::killChildren()
void
KinderGarten::killChild(Abstract* child)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
if (child) {
m_children.remove(child);
// delete child;
@@ -62,3 +62,4 @@ KinderGarten::show()
}
cout << "]";
}
+
diff --git a/tests/libsample/listuser.cpp b/tests/libsample/listuser.cpp
index 0b9a14ff..c315a898 100644
--- a/tests/libsample/listuser.cpp
+++ b/tests/libsample/listuser.cpp
@@ -8,14 +8,14 @@ using namespace std;
std::list<int>
ListUser::callCreateList()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return createList();
}
std::list<int>
ListUser::createList()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
std::list<int> retval;
for (int i = 0; i < 4; i++)
retval.push_front(rand());
@@ -25,7 +25,7 @@ ListUser::createList()
std::list<Complex>
ListUser::createComplexList(Complex cpx0, Complex cpx1)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
std::list<Complex> retval;
retval.push_back(cpx0);
retval.push_back(cpx1);
@@ -44,4 +44,3 @@ ListUser::sumList(std::list<double> vallist)
return std::accumulate(vallist.begin(), vallist.end(), 0.0);
}
-
diff --git a/tests/libsample/pairuser.cpp b/tests/libsample/pairuser.cpp
index 8983630e..b86164ac 100644
--- a/tests/libsample/pairuser.cpp
+++ b/tests/libsample/pairuser.cpp
@@ -6,21 +6,21 @@ using namespace std;
std::pair<int, int>
PairUser::callCreatePair()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return createPair();
}
std::pair<int, int>
PairUser::createPair()
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return std::pair<int, int>(10, 20);
}
std::pair<Complex, Complex>
PairUser::createComplexPair(Complex cpx0, Complex cpx1)
{
- cout << __PRETTY_FUNCTION__ << endl;
+ //cout << __PRETTY_FUNCTION__ << endl;
return std::pair<Complex, Complex>(cpx0, cpx1);
}