Loading...
Searching...
No Matches
GlobalPrintingFixture Class Reference

`#include <common.h>`

## Public Member Functions

| GlobalPrintingFixture (bool redirect=false)
| ~GlobalPrintingFixture ()
void | Redirect ()
virtual bool | setUpWorld ()
virtual bool | tearDownWorld ()
virtual bool | setUp ()
virtual bool | tearDown ()
Public Member Functions inherited from CxxTest::GlobalFixture
| GlobalFixture ()
| ~GlobalFixture ()
GlobalFixture * | nextGlobalFixture ()
GlobalFixture * | prevGlobalFixture ()
Public Member Functions inherited from CxxTest::Link
| Link ()
virtual | ~Link ()
bool | active () const
void | setActive (bool value=true)
Link * | justNext ()
Link * | justPrev ()
Link * | next ()
Link * | prev ()
const Link * | next () const
const Link * | prev () const
void | attach (List &l)
void | detach (List &l)

## Private Attributes

std::ofstream | _ofs
bool | _redirect

## Additional Inherited Members

Static Public Member Functions inherited from CxxTest::GlobalFixture
static GlobalFixture * | firstGlobalFixture ()
static GlobalFixture * | lastGlobalFixture ()

## Detailed Description

Definition at line 90 of file common.h.

## Constructor & Destructor Documentation

## GlobalPrintingFixture()

GlobalPrintingFixture::GlobalPrintingFixture | ( | bool | redirect = false | ) |

inline

Definition at line 95 of file common.h.

: _redirect(redirect){}
GlobalPrintingFixture::_redirect
bool _redirect
Definition common.h:93

## ~GlobalPrintingFixture()

GlobalPrintingFixture::~GlobalPrintingFixture | ( |  | ) |

inline

Definition at line 97 of file common.h.

{
if( _ofs)
_ofs.close();
}
GlobalPrintingFixture::_ofs
std::ofstream _ofs
Definition common.h:92

## Member Function Documentation

## Redirect()

void GlobalPrintingFixture::Redirect | ( |  | ) |

inline

Definition at line 103 of file common.h.

{
const int ll = strlen(argv0);
const int l = 5 + ll;
char* s = (char *)omAlloc0(l);
s = strncpy(s, argv0, ll);
strncpy(s + ll, ".log", 5);
_ofs.open(s); // , ios_base::out)
omFreeSize((ADDRESS)s, l);
std::clog.rdbuf(_ofs.rdbuf());
}
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
l
int l
Definition cfEzgcd.cc:100
argv0
char * argv0
Definition coeffs_test_runner.cpp:14
s
const CanonicalForm int s
Definition facAbsFact.cc:51
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211

## setUp()

virtual bool GlobalPrintingFixture::setUp | ( |  | ) |

inline virtual

Reimplemented from CxxTest::GlobalFixture.

Definition at line 137 of file common.h.

{ std::clog << std::endl << std::endl <<( "<test>" ) << std::endl << std::endl; return true; }

## setUpWorld()

virtual bool GlobalPrintingFixture::setUpWorld | ( |  | ) |

inline virtual

Reimplemented from CxxTest::GlobalFixture.

Reimplemented in MyGlobalPrintingFixture, and MyGlobalPrintingFixture.

Definition at line 116 of file common.h.

{
if( _redirect )
Redirect();
std::clog << std::endl << ( "<world>" ) << std::endl << std::endl;
feInitResources(argv0);
StringSetS("resources in use (as reported by feStringAppendResources(0):\n");
feStringAppendResources(0);
{ char* s = StringEndS(); PrintS(s); omFree(s); }
return true;
}
GlobalPrintingFixture::Redirect
void Redirect()
Definition common.h:103
feInitResources
void feInitResources(const char *argv0)
Definition feResource.cc:160
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
StringSetS
void StringSetS(const char *st)
Definition reporter.cc:128
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
feStringAppendResources
void feStringAppendResources(int warn)
Definition reporter.cc:402
StringEndS
char * StringEndS()
Definition reporter.cc:151

## tearDown()

virtual bool GlobalPrintingFixture::tearDown | ( |  | ) |

inline virtual

Reimplemented from CxxTest::GlobalFixture.

Definition at line 138 of file common.h.

{ std::clog << std::endl << std::endl <<( "</test>" ) << std::endl << std::endl; return true; }

## tearDownWorld()

virtual bool GlobalPrintingFixture::tearDownWorld | ( |  | ) |

inline virtual

Reimplemented from CxxTest::GlobalFixture.

Definition at line 132 of file common.h.

{
std::clog << std::endl << std::endl <<( "</world>" ) << std::endl << std::endl ;
return true;
}

## Field Documentation

## _ofs

std::ofstream GlobalPrintingFixture::_ofs

private

Definition at line 92 of file common.h.

## _redirect

bool GlobalPrintingFixture::_redirect

private

Definition at line 93 of file common.h.

The documentation for this class was generated from the following file:

- libpolys/tests/common.h