2013-03-21 22:42:41 +00:00
|
|
|
h=$(abs_srcdir)
|
|
|
|
|
|
|
|
TESTS=runtestreadwrite
|
|
|
|
|
|
|
|
noinst_PROGRAMS= $(TESTS)
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = libtestutils.la
|
|
|
|
|
|
|
|
libtestutils_la_SOURCES=\
|
|
|
|
$(h)/test-utils.h \
|
|
|
|
$(h)/test-utils.cc
|
|
|
|
|
|
|
|
libtestutils_la_CXXFLAGS= \
|
|
|
|
-DABIGAIL_SRC_DIR=\"${top_srcdir}\" \
|
|
|
|
-DABIGAIL_BUILD_DIR=\"${top_builddir}\"
|
|
|
|
|
|
|
|
runtestreadwrite_SOURCES=$(h)/test-read-write.cc
|
2013-03-26 11:22:28 +00:00
|
|
|
runtestreadwrite_LDADD=libtestutils.la $(top_builddir)/src/libabigail.la
|
2013-03-21 22:42:41 +00:00
|
|
|
|
|
|
|
AM_CPPFLAGS=-I${top_srcdir}/src
|
|
|
|
|
Debug read-write of a type-decl in a namespace-decl
* abg-ir.{h,cc} (decl_base::decl_base, scope_decl::scope_decl)
(type_decl::type_decl, namespace_decl::namespace_decl): Do not
append a decl to its context from within its constructor. It's
better doing that in a function that takes shared_ptrs to decl and
context. That way we avoid memory management havoc.
(decl_base::set_scope): New private function.
(scope_decl::add_member_decl): Make this private.
(add_decl_to_scope): New function, friend of decl_base and
scope_decl.
* abg-reader.cc (read_context::get_cur_scope): Add a non-const
overload.
(handle_type_decl, handle_namespace_decl): Use add_decl_to_scope.
Adjust to new type_decl and namespace_decl constructor signature.
* src/abg-writer.cc (write_type): Emit 'id', not 'xml:id'.
(write_namespace_decl): Emit "namespace-decl", not
"namespace-decl-name", as the name of namespace element.
* tests/Makefile.am (test0.xml): Rename input0.xml into this.
(test1.xml): New test input.
* tests/data/test-read-write/test0.xml: Update to use 'id' as id
attribute, rather than xml:id.
* tests/data/test-read-write/test1.xml: New test.
* test-read-write.cc (struct InOutSpec): New
(main): Reorganize to give a list of input files to read and to
write to an output file, have the test read the input files, write
them, and diff the two.
2013-03-25 15:56:00 +00:00
|
|
|
EXTRA_DIST= \
|
|
|
|
$(h)/data/test-read-write/test0.xml \
|
2013-03-26 10:16:10 +00:00
|
|
|
$(h)/data/test-read-write/test1.xml \
|
2013-03-27 22:34:07 +00:00
|
|
|
$(h)/data/test-read-write/test2.xml \
|
2013-03-28 14:27:15 +00:00
|
|
|
$(h)/data/test-read-write/test3.xml \
|
2013-03-29 14:30:34 +00:00
|
|
|
$(h)/data/test-read-write/test4.xml \
|
2013-03-28 14:27:15 +00:00
|
|
|
$(h)/data/test-read-write/test4.xml
|