Added target fullcheck.
This commit is contained in:
parent
ee4a167439
commit
fa81dc4798
7 changed files with 44 additions and 26 deletions
|
|
@ -234,6 +234,13 @@ PyUnitTests: $(srcdir)/tests/python/PyUnitTests.py
|
||||||
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
||||||
chmod 755 $@
|
chmod 755 $@
|
||||||
|
|
||||||
|
fullcheck: UnitTests
|
||||||
|
MallocGuardEdges=1 \
|
||||||
|
MallocScribble=1 \
|
||||||
|
MallocPreScribble=1 \
|
||||||
|
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
||||||
|
$(top_builddir)/UnitTests --verify
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
DISTCLEANFILES = Doxyfile.gen
|
DISTCLEANFILES = Doxyfile.gen
|
||||||
|
|
|
||||||
|
|
@ -1858,6 +1858,13 @@ PyUnitTests: $(srcdir)/tests/python/PyUnitTests.py
|
||||||
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
||||||
chmod 755 $@
|
chmod 755 $@
|
||||||
|
|
||||||
|
fullcheck: UnitTests
|
||||||
|
MallocGuardEdges=1 \
|
||||||
|
MallocScribble=1 \
|
||||||
|
MallocPreScribble=1 \
|
||||||
|
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
||||||
|
$(top_builddir)/UnitTests --verify
|
||||||
|
|
||||||
alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs
|
alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs
|
||||||
|
|
||||||
$(top_builddir)/Doxyfile.gen: $(srcdir)/docs/Doxyfile
|
$(top_builddir)/Doxyfile.gen: $(srcdir)/docs/Doxyfile
|
||||||
|
|
|
||||||
1
acprep
1
acprep
|
|
@ -63,6 +63,7 @@ while [ -n "$1" ]; do
|
||||||
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
|
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
|
||||||
# LIBS="$LIBS -lstlportstlg"
|
# LIBS="$LIBS -lstlportstlg"
|
||||||
#fi
|
#fi
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" ;;
|
||||||
CXXFLAGS="$CXXFLAGS -g" ;;
|
CXXFLAGS="$CXXFLAGS -g" ;;
|
||||||
|
|
||||||
--prof | --perf)
|
--prof | --perf)
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sign) {
|
if (sign) {
|
||||||
char * newbuf = new char[std::strlen(result ? result : buf) + 1];
|
char * newbuf = new char[std::strlen(result ? result : buf) + 2];
|
||||||
newbuf[0] = '-';
|
newbuf[0] = '-';
|
||||||
std::strcpy(&newbuf[1], result ? result : buf);
|
std::strcpy(&newbuf[1], result ? result : buf);
|
||||||
mpz_set_str(dest, newbuf, 10);
|
mpz_set_str(dest, newbuf, 10);
|
||||||
|
|
|
||||||
12
src/xml.cc
12
src/xml.cc
|
|
@ -51,11 +51,6 @@ const char * document_t::ledger_builtins[] = {
|
||||||
"transaction"
|
"transaction"
|
||||||
};
|
};
|
||||||
|
|
||||||
document_t::document_t(node_t * _top)
|
|
||||||
: stub(this), top(_top ? _top : &stub) {
|
|
||||||
TRACE_CTOR(xml::document_t, "node_t *, const char **, const int");
|
|
||||||
}
|
|
||||||
|
|
||||||
document_t::~document_t()
|
document_t::~document_t()
|
||||||
{
|
{
|
||||||
TRACE_DTOR(xml::document_t);
|
TRACE_DTOR(xml::document_t);
|
||||||
|
|
@ -159,10 +154,9 @@ void document_t::print(std::ostream& out) const
|
||||||
document_t * node_t::document;
|
document_t * node_t::document;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
node_t::node_t(document_t * _document, parent_node_t * _parent,
|
node_t::node_t(document_t * _document, parent_node_t * _parent, flags_t _flags)
|
||||||
flags_t _flags)
|
: supports_flags<>(_flags), name_id(0), parent(_parent),
|
||||||
: supports_flags<>(_flags),
|
next(NULL), prev(NULL), attrs(NULL)
|
||||||
name_id(0), parent(_parent), next(NULL), prev(NULL), attrs(NULL)
|
|
||||||
{
|
{
|
||||||
TRACE_CTOR(node_t, "document_t *, node_t *");
|
TRACE_CTOR(node_t, "document_t *, node_t *");
|
||||||
document = _document;
|
document = _document;
|
||||||
|
|
|
||||||
13
src/xml.h
13
src/xml.h
|
|
@ -236,18 +236,23 @@ private:
|
||||||
|
|
||||||
names_map names_index;
|
names_map names_index;
|
||||||
|
|
||||||
terminal_node_t stub;
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
node_t * top;
|
node_t * top;
|
||||||
|
|
||||||
|
private:
|
||||||
|
terminal_node_t stub;
|
||||||
|
|
||||||
|
public:
|
||||||
// Ids 0-9 are reserved. 10-999 are for "builtin" names. 1000+ are
|
// Ids 0-9 are reserved. 10-999 are for "builtin" names. 1000+ are
|
||||||
// for dynamically registered names.
|
// for dynamically registered names.
|
||||||
enum special_names_t {
|
enum special_names_t {
|
||||||
CURRENT, PARENT, ROOT, ALL
|
CURRENT, PARENT, ROOT, ALL
|
||||||
};
|
};
|
||||||
|
|
||||||
document_t(node_t * _top = NULL);
|
document_t(node_t * _top = NULL)
|
||||||
|
: top(_top ? _top : &stub), stub(this) {
|
||||||
|
TRACE_CTOR(xml::document_t, "node_t *, const char **, const int");
|
||||||
|
}
|
||||||
~document_t();
|
~document_t();
|
||||||
|
|
||||||
void set_top(node_t * _top);
|
void set_top(node_t * _top);
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,7 @@
|
||||||
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("Framework");
|
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("Framework");
|
||||||
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("corelib");
|
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("numerics");
|
||||||
|
|
||||||
CPPUNIT_REGISTRY_ADD("numerics", "corelib");
|
|
||||||
CPPUNIT_REGISTRY_ADD("balances", "corelib");
|
|
||||||
CPPUNIT_REGISTRY_ADD("values", "corelib");
|
|
||||||
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("driver");
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("journal");
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("reports");
|
|
||||||
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("transforms");
|
|
||||||
|
|
||||||
|
|
||||||
// Create a sample test, which acts both as a template, and a
|
// Create a sample test, which acts both as a template, and a
|
||||||
// verification that the basic framework is functioning.
|
// verification that the basic framework is functioning.
|
||||||
|
|
@ -62,9 +52,17 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(UnitTests, "framework");
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
int index = 1;
|
||||||
|
|
||||||
|
if (argc > index && std::string(argv[index]) == "--verify") {
|
||||||
|
ledger::verify_enabled = true;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
// Retreive test path from command line first argument. Default to
|
// Retreive test path from command line first argument. Default to
|
||||||
// "" which resolves to the top level suite.
|
// "" which resolves to the top level suite.
|
||||||
std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
|
std::string testPath = ((argc > index) ? std::string(argv[index]) :
|
||||||
|
std::string(""));
|
||||||
|
|
||||||
// Create the event manager and test controller
|
// Create the event manager and test controller
|
||||||
CPPUNIT_NS::TestResult controller;
|
CPPUNIT_NS::TestResult controller;
|
||||||
|
|
@ -85,8 +83,14 @@ int main(int argc, char* argv[])
|
||||||
CPPUNIT_NS::TestRunner runner;
|
CPPUNIT_NS::TestRunner runner;
|
||||||
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
|
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
|
||||||
try {
|
try {
|
||||||
|
IF_VERIFY()
|
||||||
|
initialize_memory_tracing();
|
||||||
|
|
||||||
runner.run(controller, testPath);
|
runner.run(controller, testPath);
|
||||||
|
|
||||||
|
IF_VERIFY()
|
||||||
|
shutdown_memory_tracing();
|
||||||
|
|
||||||
// Print test in a compiler compatible format.
|
// Print test in a compiler compatible format.
|
||||||
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
|
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
|
||||||
outputter.write();
|
outputter.write();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue