blob: ed3e6039d985dae23efc945b5d44812376249fd8 [file] [log] [blame]
Gaurav Shahce0cc302010-03-24 13:48:55 -07001/* 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 */
6
7#ifndef VBOOT_REFERENCE_TEST_COMMON_H_
8#define VBOOT_REFERENCE_TEST_COMMON_H_
9
Gaurav Shahce0cc302010-03-24 13:48:55 -070010extern int gTestSuccess;
Gaurav Shahbcd8f4a2010-05-26 13:19:00 -070011
Gaurav Shah3199eed2010-03-25 13:04:45 -070012/* Return 1 if result is equal to expected_result, else return 0.
13 * Also update the global gTestSuccess flag if test fails. */
14int TEST_EQ(int result, int expected_result, char* testname);
Gaurav Shahbcd8f4a2010-05-26 13:19:00 -070015/* Return 0 if result is equal to not_expected_result, else return 1.
16 * Also update the global gTestSuccess flag if test fails. */
17int TEST_NEQ(int result, int not_expected_result, char* testname);
Gaurav Shah3199eed2010-03-25 13:04:45 -070018
vbendeb3ecaf772010-06-24 16:19:53 -070019/* ANSI Color coding sequences.
20 *
21 * Don't use \e as MSC does not recognize it as a valid escape sequence.
22 */
23#define COL_GREEN "\x1b[1;32m"
24#define COL_RED "\x1b[0;31m"
25#define COL_STOP "\x1b[m"
26
Gaurav Shahce0cc302010-03-24 13:48:55 -070027#endif /* VBOOT_REFERENCE_TEST_COMMON_H_ */