]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
stub-ified tunnel.cc and StoreMeta.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 5 Nov 2013 22:04:30 +0000 (23:04 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 5 Nov 2013 22:04:30 +0000 (23:04 +0100)
src/Makefile.am
src/tests/Stub.list
src/tests/stub_StoreMeta.cc [new file with mode: 0644]
src/tests/stub_tunnel.cc [new file with mode: 0644]

index e96b0580c86d694eaeadc629d2a666972b83a144..35e143256e27936fd819916b3d50501ab536d169 100644 (file)
@@ -724,13 +724,8 @@ ufsdump_SOURCES = \
        Parsing.h \
        store_key_md5.h \
        store_key_md5.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        String.cc \
        SquidNew.cc \
        tests/stub_time.cc \
@@ -1263,13 +1258,8 @@ tests_testACLMaxUserIP_SOURCES= \
        String.cc \
        store_dir.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
@@ -1550,17 +1540,12 @@ tests_testCacheManager_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        tests/stub_SwapDir.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
@@ -1688,13 +1673,8 @@ tests_testDiskIO_SOURCES = \
        stmem.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
@@ -1971,13 +1951,8 @@ tests_testEvent_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        tests/stub_SwapDir.cc \
@@ -1994,7 +1969,7 @@ tests_testEvent_SOURCES = \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
@@ -2219,13 +2194,8 @@ tests_testEventLoop_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
@@ -2243,7 +2213,7 @@ tests_testEventLoop_SOURCES = \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
@@ -2463,13 +2433,8 @@ tests_test_http_range_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
@@ -2485,7 +2450,7 @@ tests_test_http_range_SOURCES = \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        $(UNLINKDSOURCE) \
        url.cc \
        URLScheme.cc \
@@ -2753,20 +2718,15 @@ tests_testHttpRequest_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        StrList.h \
        StrList.cc \
        event.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        tests/stub_SwapDir.cc \
        MemStore.cc \
        url.cc \
@@ -2888,13 +2848,8 @@ tests_testStore_SOURCES= \
        store_io.cc \
        store_swapout.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
@@ -3566,13 +3521,8 @@ tests_testURL_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
@@ -3594,7 +3544,7 @@ tests_testURL_SOURCES = \
        tests/stub_time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        url.cc \
        URLScheme.cc \
        urn.h \
index 21b8966feed53cbbecb9f9474f8235fa0efc9a5f..6ba831640d12ac5411a75b6e7186e56ce13876e4 100644 (file)
@@ -54,6 +54,7 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_SwapDir.cc \
        tests/stub_stmem.cc \
        tests/stub_store.cc \
+       tests/stub_StoreMeta.cc \
        tests/stub_store_client.cc \
        tests/stub_store_digest.cc \
        tests/stub_store_rebuild.cc \
@@ -61,6 +62,7 @@ STUB_SOURCE= tests/STUB.h \
        tests/stub_store_swapout.cc \
        tests/stub_time.cc \
        tests/stub_tools.cc \
+       tests/stub_tunnel.cc \
        tests/stub_wccp2.cc \
        tests/stub_whois.cc \
        tests/stub_wordlist.cc 
diff --git a/src/tests/stub_StoreMeta.cc b/src/tests/stub_StoreMeta.cc
new file mode 100644 (file)
index 0000000..36304f8
--- /dev/null
@@ -0,0 +1,14 @@
+#include "squid.h"
+
+#define STUB_API "StoreMeta.cc"
+#include "tests/STUB.h"
+
+#include "StoreMeta.h"
+
+bool StoreMeta::validType(char) STUB_RETVAL(false)
+bool StoreMeta::validLength(int) const STUB_RETVAL(false)
+StoreMeta * StoreMeta::Factory (char, size_t, void const *) STUB_RETVAL(NULL)
+void StoreMeta::FreeList(StoreMeta **) STUB
+StoreMeta ** StoreMeta::Add(StoreMeta **, StoreMeta *) STUB_RETVAL(NULL)
+bool StoreMeta::checkConsistency(StoreEntry *) const STUB_RETVAL(false)
+
diff --git a/src/tests/stub_tunnel.cc b/src/tests/stub_tunnel.cc
new file mode 100644 (file)
index 0000000..8a0a56e
--- /dev/null
@@ -0,0 +1,10 @@
+#include "squid.h"
+
+#define STUB_API "tunnel.cc"
+#include "tests/STUB.h"
+
+#include "FwdState.h"
+class ClientHttpRequest;
+
+void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntryPointer &al) STUB
+