Unit test for queue implementation

BUG=chrome-os-partner:19236
TEST=Pass the test.
BRANCH=None

Change-Id: I575e4a9abfd9431e3b74c36da8c3d69285e5c0fb
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58032
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
This commit is contained in:
Vic Yang
2013-06-09 19:02:02 +08:00
committed by ChromeBot
parent a9541220dc
commit cbee574e64
4 changed files with 197 additions and 1 deletions

View File

@@ -42,6 +42,18 @@
} \
} while (0)
#define TEST_ASSERT_ARRAY_EQ(s, d, n) \
do { \
int i; \
for (i = 0; i < n; ++i) \
if ((s)[i] != (d)[i]) { \
ccprintf("%d: ASSERT_ARRAY_EQ failed at " \
"index=%d: %d != %d\n", __LINE__, i, \
(int)(s)[i], (int)(d)[i]); \
return EC_ERROR_UNKNOWN; \
} \
} while (0)
#define TEST_CHECK(n) \
do { \
if (n) \