From 111c59b567bf2c1a61bfad38a7db80aa158ef5a0 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Fri, 6 May 2016 13:53:32 -0700 Subject: test: Add TEST_STR_NEQ TEST_STR_NES can be used to check the returned string is not what it shouldn't be. BUG=none BRANCH=tot TEST=make runtests Change-Id: I09d5a63334e9b8365a44bb96ed31db8155d95e21 Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/343120 Reviewed-by: Randall Spangler --- tests/test_common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_common.h') diff --git a/tests/test_common.h b/tests/test_common.h index 9d6e8eaf..ef21c3b5 100644 --- a/tests/test_common.h +++ b/tests/test_common.h @@ -34,6 +34,11 @@ int TEST_PTR_NEQ(const void* result, const void* expected_result, int TEST_STR_EQ(const char* result, const char* expected_result, const char* testname); +/* Return 1 if result string is not equal to not_expected_result string, + * else return 0. Also update the global gTestSuccess flag if test fails. */ +int TEST_STR_NEQ(const char* result, const char* not_expected_result, + const char* testname); + /* Return 1 if the result is true, else return 0. * Also update the global gTestSuccess flag if test fails. */ int TEST_TRUE(int result, const char* testname); -- cgit v1.2.1