]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Remove duplicate macro
authorSean Anderson <seanga2@gmail.com>
Sun, 23 May 2021 17:00:56 +0000 (13:00 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 26 May 2021 21:26:07 +0000 (17:26 -0400)
ut_asserteq_strn is defined twice. Remove one definition.

Fixes: 33d7edfd5f ("test: Add a way to check part of a console line or skip it")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
include/test/ut.h

index fbbba286ee0e965b892479c66fde46e31914f7b8..656e25fe57406dd97e811863679a9217f28abfe5 100644 (file)
@@ -177,23 +177,6 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
        }                                                               \
 }
 
-/*
- * Assert that two string expressions are equal, up to length of the
- * first
- */
-#define ut_asserteq_strn(expr1, expr2) {                               \
-       const char *_val1 = (expr1), *_val2 = (expr2);                  \
-       int _len = strlen(_val1);                                       \
-                                                                       \
-       if (memcmp(_val1, _val2, _len)) {                               \
-               ut_failf(uts, __FILE__, __LINE__, __func__,             \
-                        #expr1 " = " #expr2,                           \
-                        "Expected \"%.*s\", got \"%.*s\"",             \
-                        _len, _val1, _len, _val2);                     \
-               return CMD_RET_FAILURE;                                 \
-       }                                                               \
-}
-
 /* Assert that two memory areas are equal */
 #define ut_asserteq_mem(expr1, expr2, len) {                           \
        const u8 *_val1 = (u8 *)(expr1), *_val2 = (u8 *)(expr2);        \