SampleValueTest Class Reference

`#include <SampleValueTest.h>`

Inheritance diagram for SampleValueTest:

## Public Member Functions

| SampleValueTest (std::string n, TestSuite *s)
Public Member Functions inherited from UnitTest
| UnitTest (std::string n, TestSuite *s)
| ~UnitTest (void)
virtual void | setup (void)
void | run (void)
virtual void | cleanup (void)
Public Member Functions inherited from Test
| Test (void)
| Test (const std::string &n)
| Test (const std::string &n, TestSuite *s)
virtual | ~Test (void)
const std::string & | getName (void)
TestSuite * | getSuite (void)

## Protected Member Functions

bool | genericTestDistance (SampleValue *s1, SampleValue *s2, UWORD32 dist)
bool | genericTestIsNeighbour (SampleValue *s1, SampleValue *s2, bool res)
bool | genericTestEValue (SampleValue *s, EmbValue ev)
Protected Member Functions inherited from UnitTest
void | addTestCategory (TestCategory *tc)
void | addTestResult (bool r)
char * | strip_test (char *s)

## Constructor & Destructor Documentation

## SampleValueTest()

SampleValueTest::SampleValueTest | ( | std::string | n,
|  | TestSuite * | s
| ) |  |

inline

## Member Function Documentation

## genericTestDistance()

bool SampleValueTest::genericTestDistance | ( | SampleValue * | s1,
|  | SampleValue * | s2,
|  | UWORD32 | dist
| ) |  |

protected

generic distance test

Parameters

  s1 | a sample value
  s2 | another sample value
  dist | this should be the distance between s1 and s2

Returns
  true iff distance is commutative and return dist

## genericTestEValue()

bool SampleValueTest::genericTestEValue | ( | SampleValue * | s,
|  | EmbValue | ev
| ) |  |

protected

generic evalue test

Parameters

  s | a sample value
  ev | an embedded value

Returns
  true iff s->getEmbeddedValue() == ev

## genericTestIsNeighbour()

bool SampleValueTest::genericTestIsNeighbour | ( | SampleValue * | s1,
|  | SampleValue * | s2,
|  | bool | res
| ) |  |

protected

generic neighbourhood test

Parameters

  s1 | a sample value
  s2 | another sample value
  res | true iff they are neighbours

Returns
  true iff calling isNeighbour (with reflexivity) equals res

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

- SampleValueTest.h
- SampleValueTest.cc