diff options
Diffstat (limited to 'tests/helpers.c')
-rw-r--r-- | tests/helpers.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/helpers.c b/tests/helpers.c index ab0863f0a..271fb4831 100644 --- a/tests/helpers.c +++ b/tests/helpers.c @@ -1,10 +1,24 @@ +/* + * This file is part of the flashrom project. + * + * Copyright 2020 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + #include <include/test.h> +#include "tests.h" #include "flash.h" #include <stdint.h> -#include <stdlib.h> - void address_to_bits_test_success(void **state) { @@ -31,6 +45,7 @@ void strcat_realloc_test_success(void **state) const char src0[] = "hello"; const char src1[] = " world"; char *dest = calloc(1, 1); + assert_non_null(dest); dest = strcat_realloc(dest, src0); dest = strcat_realloc(dest, src1); assert_string_equal("hello world", dest); |