Fixed unit tests.
#ifndef SQUID_HTTPHEADER_H
#define SQUID_HTTPHEADER_H
-
/* because we pass a spec by value */
#include "HttpHeaderRange.h"
/* HttpHeader holds a HttpHeaderMask */
#include "HttpHeaderMask.h"
+
+/* class forward declarations */
+class HttpVersion;
+class HttpHdrContRange;
+class HttpHdrCc;
+class HttpHdrSc;
+class HttpHdrRange;
+class String;
+
+
/* constant attributes of http header fields */
/** recognized or "known" header fields; @?@ add more! */
field_type type;
};
-class HttpVersion;
-
-class HttpHdrContRange;
-
-class HttpHdrCc;
-
-class HttpHdrSc;
/** Iteration for headers; use HttpHeaderPos as opaque type, do not interpret */
typedef ssize_t HttpHeaderPos;
$(SWAP_TEST_GEN_SOURCES)
tests_testDiskIO_LDADD = \
ip/libip.la \
+ libsquid.la \
@DISK_LIBS@ \
$(SWAP_TEST_LDADD) \
SquidConfig.o
#define SQUID_STRING_H
#include "config.h"
-#include "TextException.h"
-
/** todo checks to wrap this include properly */
#include <ostream>
_SQUID_INLINE_ size_type size() const;
/// variant of size() suited to be used for printf-alikes.
/// throws when size() > MAXINT
- _SQUID_INLINE_ int psize() const;
+ int psize() const;
_SQUID_INLINE_ char const * unsafeBuf() const;
/**
#include "squid.h"
#include "Store.h"
+#include "TextException.h"
+
+int
+String::psize() const
+{
+ Must(size() < INT_MAX);
+ return size();
+}
+
// low-level buffer allocation,
// does not free old buffer and does not adjust or look at len_
return len_;
}
-int
-String::psize() const
-{
- Must(size() < INT_MAX);
- return size();
-}
-
char const *
String::unsafeBuf() const
{
SQUIDCEXTERN void ftpStart(FwdState *);
class HttpRequest;
+class HttpReply;
/// \ingroup ServerProtocolFTPAPI
SQUIDCEXTERN const char *ftpUrlWith2f(HttpRequest *);
/* loop over the strings, showing exactly where they differ (if at all) */
printf("Actual Text:\n");
/* TODO: these should really be just [] lookups, but String doesn't have those here yet. */
- for ( int i = 0; i < anEntry->_appended_text.size(); i++) {
+ for ( unsigned int i = 0; i < anEntry->_appended_text.size(); i++) {
CPPUNIT_ASSERT( expect[i] );
CPPUNIT_ASSERT( anEntry->_appended_text[i] );
String s("0123456789");
String check=s.substr(3,5);
String ref("34");
- CPPUNIT_ASSERT(s1 == ref);
+ CPPUNIT_ASSERT(check == ref);
}