summaryrefslogtreecommitdiff
path: root/tests/test_common.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-08-31 11:34:29 -0700
committerRandall Spangler <rspangler@chromium.org>2011-09-01 09:05:04 -0700
commit6c6babc51b5a500af4c37a6a691cd2a4b5612345 (patch)
treec5c7b7c2e76f3cec71539bb196ccac51ecec741a /tests/test_common.h
parent9c9606b7a6e2fe7a2d8147c0d61c2d3f5b98956d (diff)
downloadvboot-6c6babc51b5a500af4c37a6a691cd2a4b5612345.tar.gz
Add tests for vboot_firmware.c
Yaay, LoadFirmware() finally has unit tests! Fix minor memory leak in LoadFirmware(). BUG=chromium-os:17564 TEST=make && make runtests Change-Id: I7eabc14484271f488b77f286e846781ccc22b8f2 (cherry picked from commit 2b7c5635d7069c55a1d96d11b99d02291b7e308b) Reviewed-on: http://gerrit.chromium.org/gerrit/7052 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/test_common.h')
-rw-r--r--tests/test_common.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_common.h b/tests/test_common.h
index 7a64ed38..6f594f93 100644
--- a/tests/test_common.h
+++ b/tests/test_common.h
@@ -11,28 +11,28 @@ extern int gTestSuccess;
/* Return 1 if result is equal to expected_result, else return 0.
* Also update the global gTestSuccess flag if test fails. */
-int TEST_EQ(int result, int expected_result, char* testname);
+int TEST_EQ(int result, int expected_result, const char* testname);
/* Return 0 if result is equal to not_expected_result, else return 1.
* Also update the global gTestSuccess flag if test fails. */
-int TEST_NEQ(int result, int not_expected_result, char* testname);
+int TEST_NEQ(int result, int not_expected_result, const char* testname);
/* Return 1 if result pointer is equal to expected_result pointer,
* else return 0. Does not check pointer contents, only the pointer
* itself. Also update the global gTestSuccess flag if test fails. */
int TEST_PTR_EQ(const void* result, const void* expected_result,
- char* testname);
+ const char* testname);
/* Return 1 if result pointer is not equal to expected_result pointer,
* else return 0. Does not check pointer contents, only the pointer
* itself. Also update the global gTestSuccess flag if test fails. */
int TEST_PTR_NEQ(const void* result, const void* expected_result,
- char* testname);
+ const char* testname);
/* Return 1 if result string is equal to expected_result string,
* else return 0. Also update the global gTestSuccess flag if test fails. */
int TEST_STR_EQ(const char* result, const char* expected_result,
- char* testname);
+ const char* testname);
/* ANSI Color coding sequences.
*