X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-trace-call-stack.h;h=76316309f4087cad7daee83ef9aa90f4884b9680;hb=d6e2f99851ab626fdb78e426498ff9ada6d298b8;hp=6b78c864c15251bd3d99ed3c7688d4f85502115f;hpb=bed9d1fafb2def9ec59d67277a4935a9f7fcbdd1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.h index 6b78c86..7631630 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.h @@ -73,6 +73,8 @@ public: { return !parameterName.compare(rhs.parameterName) && !value.str().compare(rhs.value.str()); } + + bool operator==(int match) const; }; auto find(const std::string& param) const @@ -136,8 +138,10 @@ public: /** * Constructor */ - TraceCallStack(std::string prefix = "gl"); - TraceCallStack(bool logging, std::string prefix = "gl"); + TraceCallStack(bool logging, std::string prefix); + + TraceCallStack(const TraceCallStack&) = delete; + TraceCallStack(TraceCallStack&&) = delete; /** * Destructor @@ -236,6 +240,14 @@ public: int FindIndexFromMethodAndParams(std::string method, const NamedParams& params) const; /** + * Search for the most recent occurrence of the method with the given (partial) parameters. + * @param[in] method The name of the method + * @param[in] params A map of named parameter values to match + * @return The full named parameters of the matching call. + */ + const NamedParams* FindLastMatch(std::string method, const TraceCallStack::NamedParams& params) const; + + /** * Test if the given method and parameters are at a given index in the stack * @param[in] index Index in the call stack * @param[in] method Name of method to test @@ -265,7 +277,7 @@ public: return traceStream.str(); } -private: +public: bool mTraceActive{false}; ///< True if the trace is active bool mLogging{false}; ///< True if the trace is logged to stdout std::string mPrefix;