Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: src/platform/vboot_reference/cgptlib/tests/cgpt_test.h

Issue 1729006: Add helper functions and files for gpt tests. (Closed)
Patch Set: fix for code review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #ifndef VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_ 5 #ifndef VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_
6 #define VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_ 6 #define VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #define TEST_FAIL -1 10 enum {
11 TEST_FAIL = -1,
12 TEST_OK = 0,
13 };
11 14
12 /* ANSI Color coding sequences. */ 15 /* ANSI Color coding sequences. */
13 #define COL_GREEN "\e[1;32m" 16 #define COL_GREEN "\e[1;32m"
14 #define COL_RED "\e[0;31m" 17 #define COL_RED "\e[0;31m"
15 #define COL_STOP "\e[m" 18 #define COL_STOP "\e[m"
16 19
17 #define EXPECT(expr) \ 20 #define EXPECT(expr) \
18 if (!expr) { \ 21 if (!expr) { \
19 printf(COL_RED " fail " COL_STOP "in expression %s in %s() line %d\n",\ 22 printf(COL_RED " fail " COL_STOP "in expression %s in %s() line %d\n",\
20 #expr, __FUNCTION__, __LINE__); \ 23 #expr, __FUNCTION__, __LINE__); \
21 return TEST_FAIL; \ 24 return TEST_FAIL; \
22 } 25 }
23 26
24 #endif /* VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_ */ 27 #endif /* VBOOT_REFERENCE_CGPTLIB_TESTS_CGPT_TEST_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/cgptlib/tests/Makefile ('k') | src/platform/vboot_reference/cgptlib/tests/cgpt_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698