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:
@@ -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"]
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user