]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
implemeted stub_time, more stubs in testConfigParser
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 30 Oct 2013 17:42:48 +0000 (18:42 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 30 Oct 2013 17:42:48 +0000 (18:42 +0100)
src/Makefile.am
src/tests/stub_time.cc [new file with mode: 0644]

index 335231999f60f6e16d625304e9e71ffc274e4100..313458ef88894ce7d060626534b7fc019d44c37d 100644 (file)
@@ -3687,8 +3687,9 @@ tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
 tests_testConfigParser_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
-       MemBuf.cc \
+       tests/stub_mem.cc \
+       tests/stub_MemBuf.cc \
+       tests/stub_time.cc \
        String.cc \
        ConfigParser.cc \
        fatal.h \
@@ -3704,7 +3705,6 @@ tests_testConfigParser_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tools.h \
        tests/stub_tools.cc \
-       time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testConfigParser_SOURCES = \
diff --git a/src/tests/stub_time.cc b/src/tests/stub_time.cc
new file mode 100644 (file)
index 0000000..068b569
--- /dev/null
@@ -0,0 +1,13 @@
+#include "squid.h"
+#include "SquidTime.h"
+
+#define STUB_API "time.cc"
+#include "STUB.h"
+
+struct timeval current_time;
+double current_dtime;
+time_t squid_curtime = 0;
+
+time_t getCurrentTime(void) STUB
+int tvSubMsec(struct timeval, struct timeval) STUB
+