]>
git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/debug.cc
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 19 Store Memory Primitives */
19 std::ostream
&serialise(std::ostream
&);
21 char const *getACString() const;
24 std::ostream
&operator << (std::ostream
&aStream
, StreamTest
&anObject
)
26 return anObject
.serialise(aStream
);
30 StreamTest::serialise(std::ostream
&aStream
)
32 aStream
<< "stream test";
37 StreamTest::getAnInt() const
43 StreamTest::getACString() const
45 return "ThisIsAStreamTest";
49 main(int argc
, char **argv
)
52 debugs (1,1,"test" << "string");
53 debugs (1,9,"dont show this" << "string");
54 debugs (1,1,"test" << "string");
55 debugs (1,1,"test" << "string");
57 debugs(1,9,"this won't compile if the macro is broken.");
59 debugs(1, DBG_IMPORTANT
,"bar");
60 StreamTest aStreamObject
;
61 StreamTest
*streamPointer (&aStreamObject
);
62 debugs(1, DBG_IMPORTANT
,aStreamObject
);
63 debugs(1, DBG_IMPORTANT
,streamPointer
->getAnInt() << " " << aStreamObject
.getACString());