mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-19 00:14:33 +00:00
fc27d10cee
* src/abg-ir.cc (namespace_decl::~namespace_decl): Add this missing virtual constructor definition. * src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}): Return a null pointer when the decls stack is empty. (update_read_context): Don't try to de-reference a NULL cur_decl. (read_input): Don't try to poke at file validity here. What was I thinking. Really test for advance_cursor to return 1, expressing success. * src/abg-reader.h (read_file): Fix style. * Makefile.am: Add tests sub-directory. * configure.ac: Build with debugging-friendly options if the ABIGAIL_DEBUG env variable is set. Generate tests/Makefile. * tests/Makefile.am: New file. * tests/test-read-write.cc: Likewise. * tests/test-utils.{h,cc}: Likewise. * tests/data/test-read-write/input0.xml: Likewise.
36 lines
508 B
C++
36 lines
508 B
C++
// -*- Mode: C++ -*-
|
|
|
|
#include "test-utils.h"
|
|
|
|
using std::string;
|
|
|
|
namespace abigail
|
|
{
|
|
namespace tests
|
|
{
|
|
|
|
std::string&
|
|
get_src_dir()
|
|
{
|
|
#ifndef ABIGAIL_SRC_DIR
|
|
#error the macro ABIGAIL_SRC_DIR must be set at compile time
|
|
#endif
|
|
|
|
static string s(ABIGAIL_SRC_DIR);
|
|
return s;
|
|
}
|
|
|
|
std::string&
|
|
get_build_dir()
|
|
{
|
|
#ifndef ABIGAIL_BUILD_DIR
|
|
#error the macro ABIGAIL_BUILD_DIR must be set at compile time
|
|
#endif
|
|
|
|
static string s(ABIGAIL_BUILD_DIR);
|
|
return s;
|
|
}
|
|
|
|
}//end namespace tests
|
|
}//end namespace abigail
|