ATLAS Offline Software
Loading...
Searching...
No Matches
EL::UnitTestConfig Struct Reference

a class describing how to run the jobs for driver unit tests More...

#include <UnitTestConfig.h>

Collaboration diagram for EL::UnitTestConfig:

Public Member Functions

virtual ~UnitTestConfig () noexcept=default
 virtual destructor for virtual base class
virtual std::unique_ptr< SH::DiskWritermake_file_writer (const std::string &name) const
 create a file write for the given file
virtual void setupJob (Job &job) const
 apply extra job configuration parameters

Public Attributes

std::shared_ptr< Driverm_driver
 the driver being tested

Detailed Description

a class describing how to run the jobs for driver unit tests

This is so that I can write driver unit tests as briefly as possible. The unit tests should derive a class from this class that sets the proper members in the constructor and then pass the object into the parametric unit test.

Definition at line 27 of file UnitTestConfig.h.

Constructor & Destructor Documentation

◆ ~UnitTestConfig()

virtual EL::UnitTestConfig::~UnitTestConfig ( )
virtualdefaultnoexcept

virtual destructor for virtual base class

Guarantee
no-fail

Member Function Documentation

◆ make_file_writer()

std::unique_ptr< SH::DiskWriter > EL::UnitTestConfig::make_file_writer ( const std::string & name) const
virtual

create a file write for the given file

This allows to place the test files into non-standard locations

Guarantee
basic
Failures
i/o errors

Definition at line 23 of file UnitTestConfig.cxx.

25 {
26 return std::unique_ptr<SH::DiskWriterLocal>
27 (new SH::DiskWriterLocal ("data/" + name));
28 }

◆ setupJob()

void EL::UnitTestConfig::setupJob ( Job & job) const
virtual

apply extra job configuration parameters

Guarantee
basic
Failures
config specific

Definition at line 32 of file UnitTestConfig.cxx.

34 {}

Member Data Documentation

◆ m_driver

std::shared_ptr<Driver> EL::UnitTestConfig::m_driver

the driver being tested

This is the only member the derived classes actually have to set. More members will be added over time, but those will meaningful default values

Definition at line 35 of file UnitTestConfig.h.


The documentation for this struct was generated from the following files: