summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger_client
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-05-17 20:08:22 -0700
committerMathias Agopian <mathias@google.com>2010-05-17 20:08:22 -0700
commit3fbd902c9eba50a9c5eb2aac938898fb7ba65786 (patch)
tree6993687d0c39d4fe3303d40166c0ad7450e9e969 /libs/surfaceflinger_client
parentcd45552c57f12475cd23a761781c456150fba90a (diff)
downloadframeworks_native-3fbd902c9eba50a9c5eb2aac938898fb7ba65786.zip
frameworks_native-3fbd902c9eba50a9c5eb2aac938898fb7ba65786.tar.gz
frameworks_native-3fbd902c9eba50a9c5eb2aac938898fb7ba65786.tar.bz2
add a few tests to SharedBufferStackTest
Change-Id: I1c46c07aa1483aee4d4ebd8745638a2c462cc1b3
Diffstat (limited to 'libs/surfaceflinger_client')
-rw-r--r--libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp b/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp
index a50f4ae..f490a65 100644
--- a/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp
+++ b/libs/surfaceflinger_client/tests/SharedBufferStack/SharedBufferStackTest.cpp
@@ -43,11 +43,21 @@ int main(int argc, char** argv)
int list1[4] = {2, 1, 0, 3};
test0(s, c, 4, list1);
+ int b = c.dequeue();
+ c.lock(b);
+ c.queue(b);
+ s.retireAndLock();
+
+ printf("basic test 2\n");
+ int list2[4] = {1, 2, 3, 0};
+ test0(s, c, 4, list2);
+
+
printf("resize test\n");
- s.resize(5);
- c.setBufferCount(5);
- int list2[5] = {0, 1, 2, 4, 3};
- test0(s, c, 5, list2);
+ s.resize(6);
+ c.setBufferCount(6);
+ int list3[6] = {3, 2, 1, 4, 5, 0};
+ test0(s, c, 6, list3);
return 0;
}