Gaurav Shah | ce0cc30 | 2010-03-24 13:48:55 -0700 | [diff] [blame] | 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 | */ |
| 6 | |
| 7 | #ifndef VBOOT_REFERENCE_TEST_COMMON_H_ |
| 8 | #define VBOOT_REFERENCE_TEST_COMMON_H_ |
| 9 | |
Gaurav Shah | 3199eed | 2010-03-25 13:04:45 -0700 | [diff] [blame] | 10 | #include <stdint.h> |
| 11 | |
Gaurav Shah | ce0cc30 | 2010-03-24 13:48:55 -0700 | [diff] [blame] | 12 | extern int gTestSuccess; |
Gaurav Shah | bcd8f4a | 2010-05-26 13:19:00 -0700 | [diff] [blame] | 13 | |
Gaurav Shah | 3199eed | 2010-03-25 13:04:45 -0700 | [diff] [blame] | 14 | /* Return 1 if result is equal to expected_result, else return 0. |
| 15 | * Also update the global gTestSuccess flag if test fails. */ |
| 16 | int TEST_EQ(int result, int expected_result, char* testname); |
Gaurav Shah | bcd8f4a | 2010-05-26 13:19:00 -0700 | [diff] [blame] | 17 | /* Return 0 if result is equal to not_expected_result, else return 1. |
| 18 | * Also update the global gTestSuccess flag if test fails. */ |
| 19 | int TEST_NEQ(int result, int not_expected_result, char* testname); |
Gaurav Shah | 3199eed | 2010-03-25 13:04:45 -0700 | [diff] [blame] | 20 | |
Gaurav Shah | ce0cc30 | 2010-03-24 13:48:55 -0700 | [diff] [blame] | 21 | #endif /* VBOOT_REFERENCE_TEST_COMMON_H_ */ |