X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-trace-call-stack.cpp;h=921088bdd02d046acef28739f96020e2a09c2ae0;hp=9ed53ece90cb59de825d7c1db0b07a774abf1227;hb=0c33391ce2d6825b8207a7561656683a9408b8fd;hpb=db702fb3e9e9603a63c45c456c46b1beb2fe32fc diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp index 9ed53ec..921088b 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp @@ -34,6 +34,8 @@ TraceCallStack::~TraceCallStack() { } */ void TraceCallStack::Enable(bool enable) { mTraceActive = enable; } +bool TraceCallStack::IsEnabled() { return mTraceActive; } + /** * Push a call onto the stack if the trace is active * @param[in] method The name of the method @@ -69,6 +71,20 @@ bool TraceCallStack::FindMethod(std::string method) const return found; } +int TraceCallStack::CountMethod(std::string method) const +{ + int numCalls = 0; + for( size_t i=0; i < mCallStack.size(); i++ ) + { + if( 0 == mCallStack[i][0].compare(method) ) + { + numCalls++; + } + } + return numCalls; +} + + /** * Search for a method in the stack with the given parameter list * @param[in] method The name of the method