forked from embeddedmz/socket-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_utils.h
More file actions
56 lines (43 loc) · 1.14 KB
/
test_utils.h
File metadata and controls
56 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef INCLUDE_TEST_UTILS_H_
#define INCLUDE_TEST_UTILS_H_
#include <algorithm>
#include <cerrno>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <future>
#include <functional>
#include <iostream>
#include <iterator>
#include <memory>
#include <mutex>
#include <streambuf>
#include <string>
#include <sstream>
#include <sys/stat.h>
#include <thread>
#include <vector>
#ifdef WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#ifdef _DEBUG
#ifdef _USE_VLD_
#include <vld.h>
#endif
#endif
#else
#include <unistd.h>
#endif
#include "SimpleIni.h"
bool GlobalTestInit(const std::string& strConfFile);
void GlobalTestCleanUp(void);
void TimeStampTest(std::ostringstream& ssTimestamp);
int TestDLProgressCallback(void* ptr, double dTotalToDownload, double dNowDownloaded, double dTotalToUpload, double dNowUploaded);
int TestUPProgressCallback(void* ptr, double dTotalToDownload, double dNowDownloaded, double dTotalToUpload, double dNowUploaded);
long GetGMTOffset();
bool GetFileTime(const char* const & pszFilePath, time_t& tLastModificationTime);
void SleepMs(int iMilisec);
#endif