2023-09-04 12:21:37 +02:00
|
|
|
/* Unit test helpers.
|
2023-08-31 11:25:01 +02:00
|
|
|
*
|
|
|
|
* Author: Steffen Vogel <post@steffenvogel.de>
|
2020-01-26 16:17:59 +01:00
|
|
|
* SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
2023-08-31 11:25:01 +02:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2020-01-26 16:17:59 +01:00
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
#include <criterion/criterion.h>
|
|
|
|
|
|
|
|
#include "helpers.hpp"
|
|
|
|
|
2023-09-07 11:46:39 +02:00
|
|
|
char *cr_strdup(const char *str) {
|
|
|
|
char *ptr = (char *)cr_malloc(strlen(str) + 1);
|
|
|
|
if (ptr)
|
|
|
|
strcpy(ptr, str);
|
|
|
|
return ptr;
|
2020-01-26 16:17:59 +01:00
|
|
|
}
|