Skip to content

Commit ded22fe

Browse files
committed
Make memory handling optional in fixtures
1 parent 37a0f71 commit ded22fe

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

extras/fixture/rakefile_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def run_tests
148148
load_configuration($cfg_file)
149149
test_defines = ['TEST']
150150
$cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil?
151+
$cfg['compiler']['defines']['items'] << "UNITY_FIXTURE_NO_EXTRAS"
151152

152153
# Get a list of all source files needed
153154
src_files = Dir["#{__dir__}/src/*.c"]

extras/fixture/src/unity_fixture.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#include "unity_internals.h"
1313
#include "unity_fixture_internals.h"
1414

15+
#ifndef UNITY_FIXTURE_NO_EXTRAS
16+
#include "unity_memory.h"
17+
#endif
18+
1519
int UnityMain(int argc, const char* argv[], void (*runAllTests)(void));
1620

1721

extras/fixture/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ifeq ($(shell uname -s), Darwin)
33
CC = clang
44
endif
55
#DEBUG = -O0 -g
6-
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
6+
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -DUNITY_FIXTURE_NO_EXTRAS
77
CFLAGS += $(DEBUG)
88
SRC = ../src/unity_fixture.c \
99
../../../src/unity.c \

0 commit comments

Comments
 (0)