Configure Test Code for Isolator++ |
Top Previous Next |
Test Project Setup:
In your test code:
In the test code add before any standard header inclusion:
#define _GLIBCXX_USE_CXX11_ABI 0
Include 'Isolator.h':
#include "Isolator.h"
In your Makefile:
Compile:
ISOLATOR_INCDIR = /usr/include/typemock -I$(ISOLATOR_INCDIR)
Isolator++ requires these compilation flags:
C_FLAGS := -w -O0 -g3 CXX_FLAGS := -w -O0 -g3
Link:
There are 2 options to link with Typemock library:
ISOLATOR_LIBDIR = /usr/lib64/typemock
Note: When linking with the static library, libisolator.so must be in LD_LIBRARY_PATH or use -rpath=/usr/lib64/typemock
ifdef SO LIBS += -L$(ISOLATOR_LIBDIR) -l:libisolator.so else LIBS += $(ISOLATOR_LIBDIR)/libisolator.a
Note: Link order might cause different results. Link Isolator++ as first as possible.
Run The Tests
Once everything is set, in order to run the tests, Isolator++ requires setting environment variable LD_BIND_NOW to 1.
export LD_BIND_NOW=1 |
Copyright © Typemock Ltd. 2009-2018. All Rights Reserved.