summaryrefslogtreecommitdiffstats
path: root/logcat/tests
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-03-21 13:12:16 -0700
committerMark Salyzyn <salyzyn@google.com>2014-03-21 15:43:31 -0700
commit22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa (patch)
tree116a1e1e60ac9bea738373f730205a4613c91c41 /logcat/tests
parentee212d0053c6c8801dbd382d24c776040c4f8f0e (diff)
downloadsystem_core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.zip
system_core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.tar.gz
system_core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.tar.bz2
logcat: white and blacklist failure
- logcat improperly squashes out count - logcat test enhanced to catch failure - logd places entries in ascending sorted order Change-Id: If39d8e2c40852b520c98e7840034ab63c2538e5d
Diffstat (limited to 'logcat/tests')
-rw-r--r--logcat/tests/logcat_test.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/logcat/tests/logcat_test.cpp b/logcat/tests/logcat_test.cpp
index 818a978..0c75695 100644
--- a/logcat/tests/logcat_test.cpp
+++ b/logcat/tests/logcat_test.cpp
@@ -601,7 +601,7 @@ TEST(logcat, white_black_adjust) {
ASSERT_EQ(true, get_white_black(&list));
- static const char adjustment[] = "~! ~1000";
+ static const char adjustment[] = "~! 300/20 300/25 2000 ~1000/5 ~1000/30";
ASSERT_EQ(true, set_white_black(adjustment));
ASSERT_EQ(true, get_white_black(&adjust));
if (strcmp(adjustment, adjust)) {
@@ -611,6 +611,16 @@ TEST(logcat, white_black_adjust) {
free(adjust);
adjust = NULL;
+ static const char adjustment2[] = "300/20 300/21 2000 ~1000";
+ ASSERT_EQ(true, set_white_black(adjustment2));
+ ASSERT_EQ(true, get_white_black(&adjust));
+ if (strcmp(adjustment2, adjust)) {
+ fprintf(stderr, "ERROR: '%s' != '%s'\n", adjustment2, adjust);
+ }
+ ASSERT_STREQ(adjustment2, adjust);
+ free(adjust);
+ adjust = NULL;
+
ASSERT_EQ(true, set_white_black(list));
ASSERT_EQ(true, get_white_black(&adjust));
if (strcmp(list, adjust)) {