Defines | Typedefs | Functions
test_lang_c.cc File Reference
#include <boost/test/auto_unit_test.hpp>
#include <test/testsuite.hh>
#include <utilmm/configfile/configset.hh>
#include <utilmm/stringtools.hh>
#include <typelib/pluginmanager.hh>
#include <typelib/importer.hh>
#include <typelib/typemodel.hh>
#include <typelib/registry.hh>
#include <typelib/typedisplay.hh>
#include <typesolver.hh>
#include "test_cimport.1"
#include <iostream>
#include <antlr/ANTLRException.hpp>
Include dependency graph for test_lang_c.cc:

Go to the source code of this file.

Defines

#define CHECK_FIELD(compound, field, expected_type, expected_name)
#define CHECK_TYPE(type)   check_type(registry, #type, sizeof(type))

Typedefs

typedef double double_array10 [10]
typedef NS1::Test struct_array10 [10]
typedef std::vector< double > vector_double_array10 [10]
typedef std::vector< NS1::Testvector_struct_array10 [10]

Functions

 BOOST_AUTO_TEST_CASE (test_strict_c_import)
 BOOST_AUTO_TEST_CASE (test_c_import)
 BOOST_AUTO_TEST_CASE (test_std_collections)
 BOOST_AUTO_TEST_CASE (test_string_handling)
 BOOST_AUTO_TEST_CASE (test_c_array_typedefs)
 BOOST_AUTO_TEST_CASE (test_arrays_of_containers)
 BOOST_AUTO_TEST_CASE (test_import_validation)
 BOOST_AUTO_TEST_CASE (test_import_problematic_headers)
 BOOST_AUTO_TEST_CASE (test_import_and_merge)
static void check_field (Registry const &registry, string const &compound_name, string const &field_name, size_t expected_offset, string const &expected_type, size_t expected_size)
static Type const & check_type (Registry const &registry, string const &name, size_t expected_size)
static void import_test_types (Registry &registry)

Define Documentation

#define CHECK_FIELD (   compound,
  field,
  expected_type,
  expected_name 
)
Value:
{ compound v; \
    size_t offset = reinterpret_cast<uint8_t*>(&v.field) - reinterpret_cast<uint8_t*>(&v); \
    check_field(registry, #compound, #field, offset, (expected_name ? expected_name : #expected_type), sizeof(expected_type)); }

Definition at line 88 of file test_lang_c.cc.

#define CHECK_TYPE (   type)    check_type(registry, #type, sizeof(type))

Definition at line 69 of file test_lang_c.cc.


Typedef Documentation

typedef double double_array10[10]

Definition at line 296 of file test_lang_c.cc.

Definition at line 297 of file test_lang_c.cc.

typedef std::vector<double> vector_double_array10[10]

Definition at line 298 of file test_lang_c.cc.

typedef std::vector<NS1::Test> vector_struct_array10[10]

Definition at line 299 of file test_lang_c.cc.


Function Documentation

BOOST_AUTO_TEST_CASE ( test_strict_c_import  )

Definition at line 33 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_c_import  )

Definition at line 93 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_std_collections  )

Definition at line 237 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_string_handling  )

Definition at line 265 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_c_array_typedefs  )

Definition at line 276 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_arrays_of_containers  )

Definition at line 301 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_import_validation  )

Definition at line 324 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_import_problematic_headers  )

Definition at line 335 of file test_lang_c.cc.

BOOST_AUTO_TEST_CASE ( test_import_and_merge  )

Definition at line 351 of file test_lang_c.cc.

static void check_field ( Registry const &  registry,
string const &  compound_name,
string const &  field_name,
size_t  expected_offset,
string const &  expected_type,
size_t  expected_size 
) [static]

Definition at line 71 of file test_lang_c.cc.

static Type const& check_type ( Registry const &  registry,
string const &  name,
size_t  expected_size 
) [static]

Definition at line 59 of file test_lang_c.cc.

static void import_test_types ( Registry registry) [static]

Definition at line 21 of file test_lang_c.cc.



typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Thu Jan 2 2014 11:38:41