mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
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:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user