Revision aa3b4b4d deps/openssl/openssl/ssl/heartbeat_test.c

View differences:

deps/openssl/openssl/ssl/heartbeat_test.c
38 38
 * http://mike-bland.com/tags/heartbleed.html
39 39
 */
40 40

  
41
#define OPENSSL_UNIT_TEST
42

  
43
#include "../test/testutil.h"
44

  
41 45
#include "../ssl/ssl_locl.h"
42 46
#include <ctype.h>
43 47
#include <stdio.h>
44 48
#include <stdlib.h>
45 49
#include <string.h>
46 50

  
47
#if !defined(OPENSSL_NO_HEARTBEATS) && !defined(OPENSSL_SYS_WINDOWS)
51
#if !defined(OPENSSL_NO_HEARTBEATS) && !defined(OPENSSL_NO_UNIT_TEST)
48 52

  
49 53
/* As per https://tools.ietf.org/html/rfc6520#section-4 */
50 54
#define MIN_PADDING_SIZE	16
......
263 267
	}
264 268

  
265 269
#define SETUP_HEARTBEAT_TEST_FIXTURE(type)\
266
	HEARTBEAT_TEST_FIXTURE fixture = set_up_##type(__func__);\
267
	int result = 0
270
  SETUP_TEST_FIXTURE(HEARTBEAT_TEST_FIXTURE, set_up_##type)
268 271

  
269 272
#define EXECUTE_HEARTBEAT_TEST()\
270
	if (execute_heartbeat(fixture) != 0) result = 1;\
271
	tear_down(fixture);\
272
	return result
273
  EXECUTE_TEST(execute_heartbeat, tear_down)
273 274

  
274 275
static int test_dtls1_not_bleeding()
275 276
	{

Also available in: Unified diff