~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/tests/testString.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "config.h"
 
2
 
2
3
#include "testString.h"
 
4
#include "SquidString.h"
 
5
#include "Mem.h"
3
6
#include "event.h"
4
 
#include "Mem.h"
5
 
#include "SquidString.h"
6
7
 
7
8
CPPUNIT_TEST_SUITE_REGISTRATION( testString );
8
9
 
58
59
    CPPUNIT_ASSERT(right.cmp("foo") < 0);
59
60
    CPPUNIT_ASSERT(right.cmp("foo", 1) < 0);
60
61
}
 
62
 
 
63
void testString::testSubstr()
 
64
{
 
65
    String s("0123456789");
 
66
    String check=s.substr(3,5);
 
67
    String ref("34");
 
68
    CPPUNIT_ASSERT(check == ref);
 
69
}