summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2019-08-13 09:47:25 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-15 18:22:49 +0000
commit5acd037d36194ff9e9b7184f00e9e538f9683dce (patch)
treefece3acdd0be20b9a932a39fb4151a4a5b541ad4
parenta3f937bf0e6301c302c050ddd7f7a97dbd9cb4a0 (diff)
downloadchrome-ec-5acd037d36194ff9e9b7184f00e9e538f9683dce.tar.gz
test: Update TEST_EQ to using string format specifier
BRANCH=None BUG=None TEST=builds and all tests pass Change-Id: Idbb288d8f422b4c01fe27c989bdf1188df509a27 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1752204 Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--include/test_util.h12
-rw-r--r--test/usb_sm_framework_h3.c320
2 files changed, 166 insertions, 166 deletions
diff --git a/include/test_util.h b/include/test_util.h
index 78f25ee9b3..55b1849926 100644
--- a/include/test_util.h
+++ b/include/test_util.h
@@ -43,21 +43,21 @@
if (!((a) op (b))) { \
ccprintf("%d: ASSERSION failed: %s " #op " %s\n", \
__LINE__, #a, #b); \
- ccprintf("\t\tEVAL: " #fmt " " #op " " #fmt "\n", \
+ ccprintf("\t\tEVAL: " fmt " " #op " " fmt "\n", \
(a), (b)); \
task_dump_trace(); \
return EC_ERROR_UNKNOWN; \
} \
} while (0)
-#define TEST_EQ(a, b) TEST_OPERATOR(a, b, ==, %d)
-#define TEST_NE(a, b) TEST_OPERATOR(a, b, !=, %d)
-#define TEST_BITS_SET(a, bits) TEST_OPERATOR(a & bits, bits, ==, %u)
-#define TEST_BITS_CLEARED(a, bits) TEST_OPERATOR(a & bits, 0, ==, %u)
+#define TEST_EQ(a, b, fmt) TEST_OPERATOR(a, b, ==, fmt)
+#define TEST_NE(a, b, fmt) TEST_OPERATOR(a, b, !=, fmt)
+#define TEST_BITS_SET(a, bits) TEST_OPERATOR(a & bits, bits, ==, "%u")
+#define TEST_BITS_CLEARED(a, bits) TEST_OPERATOR(a & bits, 0, ==, "%u")
#define __ABS(n) ((n) > 0 ? (n) : -(n))
-#define TEST_ASSERT_ABS_LESS(n, t) TEST_OPERATOR(__ABS(n), t, <, %d)
+#define TEST_ASSERT_ABS_LESS(n, t) TEST_OPERATOR(__ABS(n), t, <, "%d")
#define TEST_ASSERT_ARRAY_EQ(s, d, n) \
do { \
diff --git a/test/usb_sm_framework_h3.c b/test/usb_sm_framework_h3.c
index b4d62aeb40..8976e0b973 100644
--- a/test/usb_sm_framework_h3.c
+++ b/test/usb_sm_framework_h3.c
@@ -665,66 +665,66 @@ static int test_hierarchy_0(void)
sm_init_state(port, TSM_OBJ(port), sm_test_A4);
run_sm();
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A4); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A4); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B4); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B4); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B5); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B6); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_C); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_C); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_C); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A7); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_C, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A7); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A7); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A7, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A6); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A5); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
for (; i < SEQUENCE_SIZE; i++)
- TEST_EQ(sm[port].seq[i], 0);
+ TEST_EQ(sm[port].seq[i], 0, "%d");
return EC_SUCCESS;
}
@@ -741,74 +741,74 @@ static int test_hierarchy_1(void)
sm_init_state(port, TSM_OBJ(port), sm_test_A4);
run_sm();
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B3); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B3, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B5); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B6); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_C); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_C); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_C); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A7); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_C, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A7); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A7); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A7, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A6); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A5); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
for (i = 33; i < SEQUENCE_SIZE; i++)
- TEST_EQ(sm[port].seq[i], 0);
+ TEST_EQ(sm[port].seq[i], 0, "%d");
return EC_SUCCESS;
}
@@ -826,84 +826,84 @@ static int test_hierarchy_2(void)
sm_init_state(port, TSM_OBJ(port), sm_test_A4);
run_sm();
- TEST_EQ(sm[port].seq[i], ENTER_A2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A3); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B2); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B2, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B5); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B2); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B2, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B5); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B6); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_C); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_C); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_C); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A7); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_C, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A7); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A7); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A7, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A6); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A5); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
for (; i < SEQUENCE_SIZE; i++)
- TEST_EQ(sm[port].seq[i], 0);
+ TEST_EQ(sm[port].seq[i], 0, "%d");
return EC_SUCCESS;
}
@@ -920,96 +920,96 @@ static int test_hierarchy_3(void)
sm_init_state(port, TSM_OBJ(port), sm_test_A4);
run_sm();
- TEST_EQ(sm[port].seq[i], ENTER_A1); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A1, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A3); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A2); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_A1); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B1); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A1, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B1, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B4, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B4); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B2); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B4); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B4, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B5); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B2); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B5); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_B6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_B6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_B6); ++i;
- TEST_EQ(sm[port].seq[i], RUN_B1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_B1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_B6); ++i;
- TEST_EQ(sm[port].seq[i], EXIT_B1); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_C); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_B1, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_C); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_C, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_C); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A1); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A7); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_C, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A1, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A7, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A7); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A7, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A7); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A2); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A6); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A7, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A6, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A6); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A6); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A3); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A5); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A6, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A5, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], RUN_A5); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A3); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A2); ++i;
- TEST_EQ(sm[port].seq[i], RUN_A1); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A3, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A2, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], RUN_A1, "%d"); ++i;
run_sm();
- TEST_EQ(sm[port].seq[i], EXIT_A5); ++i;
- TEST_EQ(sm[port].seq[i], ENTER_A4); ++i;
+ TEST_EQ(sm[port].seq[i], EXIT_A5, "%d"); ++i;
+ TEST_EQ(sm[port].seq[i], ENTER_A4, "%d"); ++i;
for (; i < SEQUENCE_SIZE; i++)
- TEST_EQ(sm[port].seq[i], 0);
+ TEST_EQ(sm[port].seq[i], 0, "%d");
return EC_SUCCESS;
}