FOSSology  4.4.0
Open Source License Compliance by Open Source Software
test_accuracy.cc File Reference

Checks the accuracy of agent results. More...

#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <string>
#include "copyscan.hpp"
#include "regTypes.hpp"
#include "regscan.hpp"
Include dependency graph for test_accuracy.cc:

Go to the source code of this file.

Classes

class  TestDataCheck
 Unit test driver. More...
 
class  overlappingMatch
 Helper to check overlapping results. More...
 

Macros

#define NUMTESTS   142
 

Functions

void HtmlEscapedOutput (ostream &out, const char *s)
 Escape HTML special characters. More...
 
void GetReferenceResults (const string &fileName, list< match > &results)
 
void Display (ostream &out, ifstream &data, list< match > &l, list< match > &lcmp, const char *prein, const char *postin, const char *prenn, const char *postnn)
 Print results to out.
 
bool cmpMatches (const match &a, const match &b)
 Compare matches. More...
 
 CPPUNIT_TEST_SUITE_REGISTRATION (TestDataCheck)
 

Detailed Description

Checks the accuracy of agent results.

Definition in file test_accuracy.cc.

Macro Definition Documentation

◆ NUMTESTS

#define NUMTESTS   142

Number of test cases (numbered from 0 to NUMTESTS-1)

Definition at line 24 of file test_accuracy.cc.

Function Documentation

◆ cmpMatches()

bool cmpMatches ( const match a,
const match b 
)

Compare matches.

Parameters
a
b
Returns
True if a < b, false otherwise

Definition at line 131 of file test_accuracy.cc.

◆ HtmlEscapedOutput()

void HtmlEscapedOutput ( ostream &  out,
const char *  s 
)

Escape HTML special characters.

Parameters
[out]outOutput stream
[in]sString to escape

Definition at line 46 of file test_accuracy.cc.