diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-23 19:17:54 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-23 19:17:54 -0200 |
commit | 94c954319c72fb70ad82255aba0b7314666585d9 (patch) | |
tree | b2b106b761963098e156eceaee871482f067cdb2 | |
parent | c9fb996124de535c1b7e446aa983a0165b60131c (diff) |
Uses __FUNCTION__ instead of __PRETTY_FUNCTION__, which is a GCC extension.
-rw-r--r-- | tests/libsample/abstract.cpp | 7 | ||||
-rw-r--r-- | tests/libsample/complex.cpp | 1 | ||||
-rw-r--r-- | tests/libsample/derived.cpp | 14 | ||||
-rw-r--r-- | tests/libsample/functions.cpp | 4 | ||||
-rw-r--r-- | tests/libsample/modifications.cpp | 2 | ||||
-rw-r--r-- | tests/libsample/pairuser.cpp | 3 |
6 files changed, 3 insertions, 28 deletions
diff --git a/tests/libsample/abstract.cpp b/tests/libsample/abstract.cpp index ad5c4fe6a..9e990b465 100644 --- a/tests/libsample/abstract.cpp +++ b/tests/libsample/abstract.cpp @@ -39,14 +39,12 @@ using namespace std; Abstract::Abstract(int id) : m_id(id) { - //cout << __PRETTY_FUNCTION__; //show(); //cout << endl; } Abstract::~Abstract() { - //cout << __PRETTY_FUNCTION__; //show(); //cout << endl; } @@ -54,24 +52,19 @@ Abstract::~Abstract() void Abstract::unpureVirtual() { - //cout << __PRETTY_FUNCTION__ << endl; } void Abstract::callUnpureVirtual() { - //cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl; this->unpureVirtual(); - //cout << __PRETTY_FUNCTION__ << " --- END" << endl; } void Abstract::callPureVirtual() { - //cout << __PRETTY_FUNCTION__ << " --- BEGIN" << endl; this->pureVirtual(); - //cout << __PRETTY_FUNCTION__ << " --- END" << endl; } void diff --git a/tests/libsample/complex.cpp b/tests/libsample/complex.cpp index 985ce3fb7..120dd8bf9 100644 --- a/tests/libsample/complex.cpp +++ b/tests/libsample/complex.cpp @@ -40,7 +40,6 @@ using namespace std; Complex::Complex(double real, double imag) : m_real(real), m_imag(imag) { - // cout << __PRETTY_FUNCTION__ << "[real=0.0, imag=0.0]" << endl; } Complex diff --git a/tests/libsample/derived.cpp b/tests/libsample/derived.cpp index 5a27a6c2f..0acba8e88 100644 --- a/tests/libsample/derived.cpp +++ b/tests/libsample/derived.cpp @@ -39,16 +39,10 @@ using namespace std; Derived::Derived(int id) : Abstract(id) { - //cout << __PRETTY_FUNCTION__; - //show(); - //cout << endl; } Derived::~Derived() { - //cout << __PRETTY_FUNCTION__; - //show(); - //cout << endl; } Abstract* @@ -61,54 +55,46 @@ Derived::createObject() void Derived::pureVirtual() { - //cout << __PRETTY_FUNCTION__ << endl; } void Derived::unpureVirtual() { - //cout << __PRETTY_FUNCTION__ << endl; } bool Derived::singleArgument(bool b) { - //cout << __PRETTY_FUNCTION__ << endl; return !b; } double Derived::defaultValue(int n) { - //cout << __PRETTY_FUNCTION__ << "[n = 0]" << endl; return ((double) n) + 0.1; } OverloadedFuncEnum Derived::overloaded(int i, int d) { - //cout << __PRETTY_FUNCTION__ << "[i = 0, d = 0]" << endl; return OverloadedFunc_ii; } OverloadedFuncEnum Derived::overloaded(double n) { - //cout << __PRETTY_FUNCTION__ << endl; return OverloadedFunc_d; } Derived::OtherOverloadedFuncEnum Derived::otherOverloaded(int a, int b, bool c, double d) { - //cout << __PRETTY_FUNCTION__ << endl; return OtherOverloadedFunc_iibd; } Derived::OtherOverloadedFuncEnum Derived::otherOverloaded(int a, double b) { - //cout << __PRETTY_FUNCTION__ << endl; return OtherOverloadedFunc_id; } diff --git a/tests/libsample/functions.cpp b/tests/libsample/functions.cpp index d39b76975..15fb6fb14 100644 --- a/tests/libsample/functions.cpp +++ b/tests/libsample/functions.cpp @@ -41,7 +41,7 @@ using namespace std; void printSomething() { - cout << __PRETTY_FUNCTION__ << endl; + cout << __FUNCTION__ << endl; } int @@ -102,7 +102,7 @@ makeCString() const char* returnCString() { - return __PRETTY_FUNCTION__; + return __FUNCTION__; } GlobalOverloadFuncEnum diff --git a/tests/libsample/modifications.cpp b/tests/libsample/modifications.cpp index 7ef8fc690..881aaba8e 100644 --- a/tests/libsample/modifications.cpp +++ b/tests/libsample/modifications.cpp @@ -85,7 +85,7 @@ Modifications::increment(int number) void Modifications::exclusiveCppStuff() { - cout << __PRETTY_FUNCTION__ << endl; + cout << __FUNCTION__ << endl; } int diff --git a/tests/libsample/pairuser.cpp b/tests/libsample/pairuser.cpp index a0a0b5423..f2c884850 100644 --- a/tests/libsample/pairuser.cpp +++ b/tests/libsample/pairuser.cpp @@ -40,21 +40,18 @@ using namespace std; std::pair<int, int> PairUser::callCreatePair() { - //cout << __PRETTY_FUNCTION__ << endl; return createPair(); } std::pair<int, int> PairUser::createPair() { - //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; return std::pair<Complex, Complex>(cpx0, cpx1); } |