1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Make memory handling optional in fixtures

This commit is contained in:
mvandervoord
2019-10-30 09:50:22 -04:00
parent 37a0f7184c
commit ded22fef63
3 changed files with 6 additions and 1 deletions

View File

@@ -148,6 +148,7 @@ def run_tests
load_configuration($cfg_file)
test_defines = ['TEST']
$cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil?
$cfg['compiler']['defines']['items'] << "UNITY_FIXTURE_NO_EXTRAS"
# Get a list of all source files needed
src_files = Dir["#{__dir__}/src/*.c"]

View File

@@ -12,6 +12,10 @@
#include "unity_internals.h"
#include "unity_fixture_internals.h"
#ifndef UNITY_FIXTURE_NO_EXTRAS
#include "unity_memory.h"
#endif
int UnityMain(int argc, const char* argv[], void (*runAllTests)(void));

View File

@@ -3,7 +3,7 @@ ifeq ($(shell uname -s), Darwin)
CC = clang
endif
#DEBUG = -O0 -g
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -DUNITY_FIXTURE_NO_EXTRAS
CFLAGS += $(DEBUG)
SRC = ../src/unity_fixture.c \
../../../src/unity.c \