testSBuf.cc File Reference
#include "squid.h"
#include "base/CharacterSet.h"
#include "base/TextException.h"
#include "compat/cppunit.h"
#include "event.h"
#include "HttpReply.h"
#include "MemObject.h"
#include "sbuf/Algorithms.h"
#include "sbuf/SBuf.h"
#include "sbuf/Stream.h"
#include "tests/SBufFindTest.h"
#include "unitTestMain.h"
#include <iostream>
#include <stdexcept>
#include <unordered_map>
Include dependency graph for testSBuf.cc:

Go to the source code of this file.

Classes

class  TestSBuf
 
class  SBufSubstrAutoTest
 

Functions

 CPPUNIT_TEST_SUITE_REGISTRATION (TestSBuf)
 
void eventAdd (const char *, EVH *, void *, double, int, bool)
 
static int sign (int v)
 
static void testComparisonStdFull (const char *left, const char *right)
 
static void testComparisonStdN (const char *left, const char *right, const size_t n)
 
static void testComparisonStdOneWay (const char *left, const char *right)
 
static void testComparisonStd (const char *s1, const char *s2)
 
int main (int argc, char *argv[])
 

Variables

static const char fox [] = "The quick brown fox jumped over the lazy dog"
 
static const char fox1 [] = "The quick brown fox "
 
static const char fox2 [] = "jumped over the lazy dog"
 
SBuf empty_sbuf
 
SBuf literal ("The quick brown fox jumped over the lazy dog")
 

Function Documentation

◆ CPPUNIT_TEST_SUITE_REGISTRATION()

CPPUNIT_TEST_SUITE_REGISTRATION ( TestSBuf  )

◆ eventAdd()

void eventAdd ( const char *  name,
EVH func,
void *  arg,
double  when,
int  weight,
bool  cbdata 
)

Definition at line 114 of file testSBuf.cc.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1194 of file testSBuf.cc.

References TestProgram::run().

◆ sign()

static int sign ( int  v)
static

◆ testComparisonStd()

static void testComparisonStd ( const char *  s1,
const char *  s2 
)
static

Definition at line 399 of file testSBuf.cc.

References s1, and testComparisonStdOneWay().

Referenced by TestSBuf::testComparisons().

◆ testComparisonStdFull()

static void testComparisonStdFull ( const char *  left,
const char *  right 
)
static

Definition at line 349 of file testSBuf.cc.

References sign().

Referenced by testComparisonStdOneWay().

◆ testComparisonStdN()

static void testComparisonStdN ( const char *  left,
const char *  right,
const size_t  n 
)
static

Definition at line 369 of file testSBuf.cc.

References sign().

Referenced by testComparisonStdOneWay().

◆ testComparisonStdOneWay()

static void testComparisonStdOneWay ( const char *  left,
const char *  right 
)
static

Definition at line 389 of file testSBuf.cc.

References min(), testComparisonStdFull(), and testComparisonStdN().

Referenced by TestSBuf::testComparisons(), and testComparisonStd().

Variable Documentation

◆ empty_sbuf

SBuf empty_sbuf

Definition at line 129 of file testSBuf.cc.

Referenced by TestSBuf::testSBufConstructDestruct().

◆ fox

const char fox[] = "The quick brown fox jumped over the lazy dog"
static

◆ fox1

◆ fox2

const char fox2[] = "jumped over the lazy dog"
static

◆ literal

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors