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.h;h=8cb592286daf04b2b02c7f67d44d8aa182475755;hp=76316309f4087cad7daee83ef9aa90f4884b9680;hb=HEAD;hpb=5bc22f12881a16d7c5143c5e220fc0075aef6061 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 7631630..c2d0a49 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 @@ -2,7 +2,7 @@ #define TEST_TRACE_CALL_STACK_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -121,6 +121,25 @@ public: } } + const std::ostringstream& operator[](std::string name) const + { + static std::ostringstream empty; + auto iter = mParams.begin(); + for(; iter != mParams.end(); ++iter) + { + if(!iter->parameterName.compare(name)) + { + break; + } + } + + if(iter != mParams.end()) + { + return iter->value; + } + return empty; + } + std::string str() const { std::ostringstream out; @@ -188,6 +207,14 @@ public: bool FindMethodAndGetParameters(std::string method, std::string& params) const; /** + * Search for a method in the stack and return its parameters if found + * @param[in] method The name of the method + * @param[out] params of the method + * @return true if the method was in the stack + */ + bool FindMethodAndGetParameters(std::string method, NamedParams& params) const; + + /** * Count how many times a method was called * @param[in] method The name of the method * @return The number of times it was called