libabigail/tests/data/test-write-read-archive/test2.xml

15 lines
585 B
XML
Raw Normal View History

Initial writing/reading of an ABI corpus to an archive * configure.ac: Support detection of libzip dependency. Define new DEPS_CFLAGS and DEPS_LIBS variables for use in Makefile.am to refer to the dependency headers and libraries. * doc/website/mainpage.txt: Update this to talk about the new libzip dependency. * include/Makefile.am: Add abg-libzip-utils.h to the build system. * include/abg-corpus.h (corps): Hide abigail::corpus's private behind a pimpl idiom. (corpus::{drop_translation_units, get_file_path, set_file_path, write, read}): New methods. * include/abg-libxml-utils.h (new_reader_from_buffer): Declare new function. * include/abg-libzip-utils.h: New file. * src/Makefile.am: Add abg-corpus.cc and abg-libzip-utils.cc to the build system. Refer to the library and headers dependencies via the new DEPS_LIBS and DEPS_CFLAGS variables. * src/abg-corpus.cc: New file. * src/abg-ir.cc (translation::set_path): New method. * src/abg-libxml-utils.cc (new_reader_from_buffer): Define new function. * src/abg-libzip-utils.cc: New file. * src/abg-reader.cc (translation_unit::read): New overload. * src/abg-writer.cc: Inject the names from the std namespace into the abigail namespace, rather than into abigail::writer. (abigail::translation_unit::write): New overload. This can now use ofstream and the other stuff from std that are injected in the abigail:: namespace. * tests/Makefile.am: Add tests/test-write-read-archive.cc to the build system; use that to build runtestwritereadarchive. Also add the input test data from tests/data/test-write-read-archive/test[0-4].xml. * /tests/data/test-write-read-archive/test[0-4].xml: New test input data files. * tests/test-write-read-archive.cc: New test for this archive write/read support. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-08-27 13:18:59 +00:00
<abi-instr version='1.0'>
<namespace-decl name='foo'>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
</namespace-decl>
<namespace-decl name='bar'>
<type-decl name='int32' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
</namespace-decl>
<namespace-decl name='baz'>
<namespace-decl name='barbaz'>
<type-decl name='int64' size-in-bits='64' alignment-in-bits='64' id='type-id-3'/>
</namespace-decl>
</namespace-decl>
<type-decl name='char' size-in-bits='8' alignment-in-bits='8' id='type-id-4'/>
</abi-instr>