libabigail
Loading...
Searching...
No Matches
test-read-common.cc File Reference

This file implements the common functionality for the tests in CTF and DWARF readers, it does the abstraction in the `act` test stage. More...

#include <fstream>
#include <cstring>
#include "test-read-common.h"
Include dependency graph for test-read-common.cc:

Go to the source code of this file.

Namespaces

namespace  abigail
 Toplevel namespace for libabigail.
 

Functions

void display_usage (const string &prog_name, ostream &out)
 Write the usage message to out stream object.
 
bool parse_command_line (int argc, char *argv[], options &opts)
 Parse and process test options.
 
bool run_tests (const size_t num_tests, const InOutSpec *specs, const options &opts, create_new_test new_test)
 The main entry point to execute the testsuite.
 

Detailed Description

This file implements the common functionality for the tests in CTF and DWARF readers, it does the abstraction in the `act` test stage.

Definition in file test-read-common.cc.

Function Documentation

◆ display_usage()

void display_usage ( const string & prog_name,
ostream & out )

Write the usage message to out stream object.

Parameters
prog_namethe program name.
outthe stream object to which want to write.

Definition at line 152 of file test-read-common.cc.

◆ parse_command_line()

bool parse_command_line ( int argc,
char * argv[],
options & opts )

Parse and process test options.

Parameters
argcthe arguments number.
argvthe pointer to the arguments.
optsthe valid options to be processed/parsed.
Returns
true if options was processed/parsed successfully. It returns false when help is requested or an invalid option is supplied.

Definition at line 173 of file test-read-common.cc.

◆ run_tests()

bool run_tests ( const size_t num_tests,
const InOutSpec * specs,
const options & opts,
create_new_test new_test )

The main entry point to execute the testsuite.

Parameters
num_teststhe number of tests to be executed.
specsthe abigail::tests::read_common::InOutSpec tests container.
optsthe test execution abigail::tests::read_common::options.
new_testthe create_new_test callback function to create a new test task object.
Returns
true if `all` tests were performed successfully. Otherwise false is returned.

Definition at line 208 of file test-read-common.cc.