#include <test_timeout_listener.h>
Definition at line 20 of file test_timeout_listener.h.
◆ TestTimeoutListener()
flutter::testing::TestTimeoutListener::TestTimeoutListener |
( |
fml::TimeDelta |
timeout | ) |
|
|
explicit |
Definition at line 71 of file test_timeout_listener.cc.
72 : timeout_(timeout),
73 listener_thread_("test_timeout_listener"),
77 << " seconds per test case will be enforced.";
78}
static std::shared_ptr< PendingTests > Create(fml::RefPtr< fml::TaskRunner > host_task_runner, fml::TimeDelta timeout)
fml::RefPtr< fml::TaskRunner > GetTaskRunner() const
constexpr int64_t ToSeconds() const
#define FML_LOG(severity)
◆ ~TestTimeoutListener()
flutter::testing::TestTimeoutListener::~TestTimeoutListener |
( |
| ) |
|
Definition at line 80 of file test_timeout_listener.cc.
80 {
82 [
tests = std::move(pending_tests_)]()
mutable {
tests.reset(); });
84}
virtual void PostTask(const fml::closure &task) override
#define FML_CHECK(condition)
◆ OnTestEnd()
void flutter::testing::TestTimeoutListener::OnTestEnd |
( |
const ::testing::TestInfo & |
test_info | ) |
|
|
overrideprivate |
Definition at line 113 of file test_timeout_listener.cc.
113 {
115 [weak_tests =
WeakPtr(pending_tests_),
117 if (
auto tests = weak_tests.lock()) {
118 tests->OnTestEnd(name);
119 }
120 });
121}
static void test_info(skiatest::Reporter *r, Codec *codec, const SkImageInfo &info, SkCodec::Result expectedResult, const SkMD5::Digest *goodDigest)
auto WeakPtr(std::shared_ptr< T > pointer)
static std::string GetTestNameFromTestInfo(const ::testing::TestInfo &test_info)
DEF_SWITCHES_START aot vmservice shared library name
◆ OnTestStart()
void flutter::testing::TestTimeoutListener::OnTestStart |
( |
const ::testing::TestInfo & |
test_info | ) |
|
|
overrideprivate |
Definition at line 102 of file test_timeout_listener.cc.
102 {
103 listener_thread_runner_->
PostTask([weak_tests =
WeakPtr(pending_tests_),
106 if (
auto tests = weak_tests.lock()) {
107 tests->OnTestBegin(name, now);
108 }
109 });
110}
The documentation for this class was generated from the following files: