Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d3061ab7 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Use dynamic event factory in dispatcher tests

This factory allows us to obtain ownership of the returned events. At
the same time, remove LOG(FATAL) from the tests.

Technically, the new factory approach isn't necessary. We could have
simply switched to returning raw unowned pointers instead of references,
and added the null check like in this CL. This would have been
sufficient to remove the fatal log statements. However, since this code is
already being touched here, might as well improve it further by changing
to the owned pointer model.

Without LOG(FATAL) in the tests, tests are allowed to run to completion
when there's a bug in the code. This allows the developer to understand
how many tests are failing, thus providing better signal about the work
in progress CL.

Bug: 308531018
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: Iee88b35e871ef391aac0d68aa8322486287524e9
parent 9d386604
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment