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

Side by Side Diff: src/platform/vboot_reference/tests/test_common.c

Issue 1241002: VBoot Reference: Add version checking to for preventing rollbacks. (Closed)
Patch Set: . Created 10 years, 9 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
(Empty)
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
3 * found in the LICENSE file.
4 *
5 * Common functions used by tests.
6 */
7
8 #include "test_common.h"
9
10 #include <stdio.h>
11
12 /* ANSI Color coding sequences. */
13 #define COL_GREEN "\e[1;32m"
14 #define COL_RED "\e[0;31m]"
15 #define COL_STOP "\e[m"
16
17 /* Global test success flag. */
18 int gTestSuccess = 1;
19
20 int TEST_EQ(int result, int expected_result, char* testname) {
21 if (result == expected_result) {
22 fprintf(stderr, "%s Test " COL_GREEN " PASSED\n" COL_STOP, testname);
23 return 1;
24 }
25 else {
26 fprintf(stderr, "%s Test " COL_RED " FAILED\n" COL_STOP, testname);
27 gTestSuccess = 0;
28 return 0;
29 }
30 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/test_common.h ('k') | src/platform/vboot_reference/utils/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698