summaryrefslogtreecommitdiffstats
path: root/libs/utils/tests
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-10-05 15:35:37 -0700
committerJeff Brown <jeffbrown@google.com>2010-10-07 13:26:39 -0700
commit415d8c38199e258dfce92cdb0c69e056b3b51ef8 (patch)
tree5bf6d167a19b272f2a153df6010a7dd6f58a274f /libs/utils/tests
parent930d6c3cd5ad387489eb1d35a38beeafe54166b6 (diff)
downloadframeworks_base-415d8c38199e258dfce92cdb0c69e056b3b51ef8.zip
frameworks_base-415d8c38199e258dfce92cdb0c69e056b3b51ef8.tar.gz
frameworks_base-415d8c38199e258dfce92cdb0c69e056b3b51ef8.tar.bz2
Switch Looper back to using poll() instead of epoll().
Added a couple of micro-optimizations to avoid calling wake() unnecessarily and reduce JNI overhead slightly. Fixed a minor issue where we were not clearing the "next" field of Messages returned by the MessageQueue so the Message would hold on to its successor and potentially prevent the GC from collecting it if the message were leaked somehow. Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
Diffstat (limited to 'libs/utils/tests')
-rw-r--r--libs/utils/tests/Looper_test.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/libs/utils/tests/Looper_test.cpp b/libs/utils/tests/Looper_test.cpp
index afc92f8..cea1313 100644
--- a/libs/utils/tests/Looper_test.cpp
+++ b/libs/utils/tests/Looper_test.cpp
@@ -354,14 +354,6 @@ TEST_F(LooperTest, AddFd_WhenCallbackAdded_ReturnsOne) {
<< "addFd should return 1 because FD was added";
}
-TEST_F(LooperTest, AddFd_WhenEventsIsZero_ReturnsError) {
- Pipe pipe;
- int result = mLooper->addFd(pipe.receiveFd, 0, 0, NULL, NULL);
-
- EXPECT_EQ(-1, result)
- << "addFd should return -1 because arguments were invalid";
-}
-
TEST_F(LooperTest, AddFd_WhenIdentIsNegativeAndCallbackIsNull_ReturnsError) {
Pipe pipe;
int result = mLooper->addFd(pipe.receiveFd, -1, ALOOPER_EVENT_INPUT, NULL, NULL);