mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:15:07 +00:00
Tests: Fix structure.
This commit is contained in:
parent
4c94096bfc
commit
28d596a8f9
@ -1,10 +1,5 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/common/fortconf.c \
|
||||
$$PWD/common/fortlog.c \
|
||||
$$PWD/common/fortprov.c
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/common/common.h \
|
||||
$$PWD/common/fortconf.h \
|
||||
|
85
src/driver/_clang-format
Normal file
85
src/driver/_clang-format
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
# Webkit style was loosely based on the Qt style
|
||||
BasedOnStyle: WebKit
|
||||
|
||||
Standard: Cpp11
|
||||
|
||||
# Column width is limited to 100 in accordance with Qt Coding Style.
|
||||
# https://wiki.qt.io/Qt_Coding_Style
|
||||
# Note that this may be changed at some point in the future.
|
||||
ColumnLimit: 100
|
||||
|
||||
# How much weight do extra characters after the line length limit have.
|
||||
# PenaltyExcessCharacter: 4
|
||||
|
||||
# Disable reflow of qdoc comments: indentation rules are different.
|
||||
# Translation comments are also excluded.
|
||||
CommentPragmas: "^!|^:"
|
||||
|
||||
# We want a space between the type and the star for pointer types.
|
||||
PointerBindsToType: false
|
||||
|
||||
# We use template< without space.
|
||||
SpaceAfterTemplateKeyword: false
|
||||
|
||||
# We want to break before the operators, but not before a '='.
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
|
||||
# Braces are usually attached, but not after functions or class declarations.
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
|
||||
# When constructor initializers do not fit on one line, put them each on a new line.
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
|
||||
# Indent initializers by 2 spaces
|
||||
ConstructorInitializerIndentWidth: 2
|
||||
|
||||
# Indent width for line continuations.
|
||||
ContinuationIndentWidth: 4
|
||||
|
||||
# No indentation for namespaces.
|
||||
NamespaceIndentation: None
|
||||
|
||||
# Allow indentation for preprocessing directives (if/ifdef/endif). https://reviews.llvm.org/rL312125
|
||||
IndentPPDirectives: AfterHash
|
||||
|
||||
# Don't horizontally align arguments after an open bracket.
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
|
||||
# Ideally we should also allow less short function in a single line, but
|
||||
# clang-format does not handle that.
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
|
||||
# The coding style specifies some include order categories, but also tells to
|
||||
# separate categories with an empty line. It does not specify the order within
|
||||
# the categories. Since the SortInclude feature of clang-format does not
|
||||
# re-order includes separated by empty lines, the feature is not used.
|
||||
SortIncludes: false
|
||||
|
||||
# Sort each #include block separately.
|
||||
IncludeBlocks: Preserve
|
||||
|
||||
# macros for which the opening brace stays attached.
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
|
||||
|
||||
# Break constructor initializers before the colon and after the commas.
|
||||
BreakConstructorInitializers: AfterColon
|
||||
|
||||
# Align C/C++ preprocessor macros of consecutive lines.
|
||||
AlignConsecutiveMacros: true
|
||||
|
||||
# Space is inserted after C style casts.
|
||||
SpaceAfterCStyleCast: true
|
@ -6,7 +6,7 @@ CONFIG -= app_bundle
|
||||
TARGET = test
|
||||
TEMPLATE = app
|
||||
|
||||
UIPATH = $$PWD/../..
|
||||
UIPATH = $$PWD/../../ui
|
||||
INCLUDEPATH += $$UIPATH
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
@ -20,7 +20,7 @@ HEADERS += \
|
||||
test.h
|
||||
|
||||
# Driver integration
|
||||
include(../../../driver/Driver.pri)
|
||||
include($$UIPATH/../driver/Driver.pri)
|
||||
|
||||
# Windows
|
||||
LIBS += -lfwpuclnt -lkernel32 -luser32 -luuid -lws2_32
|
@ -13,13 +13,15 @@ SOURCES += \
|
||||
$$UIPATH/util/net/ip4range.cpp \
|
||||
$$UIPATH/util/net/netutil.cpp \
|
||||
$$UIPATH/util/osutil.cpp \
|
||||
$$UIPATH/util/processinfo.cpp
|
||||
$$UIPATH/util/processinfo.cpp \
|
||||
$$UIPATH/util/stringutil.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$UIPATH/conf/addressgroup.h \
|
||||
$$UIPATH/conf/appgroup.h \
|
||||
$$UIPATH/conf/firewallconf.h \
|
||||
$$UIPATH/fortcommon.h \
|
||||
$$UIPATH/fortcompat.h \
|
||||
$$UIPATH/util/conf/addressrange.h \
|
||||
$$UIPATH/util/conf/confappswalker.h \
|
||||
$$UIPATH/util/conf/confutil.h \
|
||||
@ -29,4 +31,5 @@ HEADERS += \
|
||||
$$UIPATH/util/net/ip4range.h \
|
||||
$$UIPATH/util/net/netutil.h \
|
||||
$$UIPATH/util/osutil.h \
|
||||
$$UIPATH/util/processinfo.h
|
||||
$$UIPATH/util/processinfo.h \
|
||||
$$UIPATH/util/stringutil.h
|
@ -11,10 +11,12 @@ SOURCES += \
|
||||
$$UIPATH/util/fileutil.cpp \
|
||||
$$UIPATH/util/net/netutil.cpp \
|
||||
$$UIPATH/util/osutil.cpp \
|
||||
$$UIPATH/util/processinfo.cpp
|
||||
$$UIPATH/util/processinfo.cpp \
|
||||
$$UIPATH/util/stringutil.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$UIPATH/fortcommon.h \
|
||||
$$UIPATH/fortcompat.h \
|
||||
$$UIPATH/log/logbuffer.h \
|
||||
$$UIPATH/log/logentry.h \
|
||||
$$UIPATH/log/logentryblocked.h \
|
||||
@ -24,4 +26,5 @@ HEADERS += \
|
||||
$$UIPATH/util/fileutil.h \
|
||||
$$UIPATH/util/net/netutil.h \
|
||||
$$UIPATH/util/osutil.h \
|
||||
$$UIPATH/util/processinfo.h
|
||||
$$UIPATH/util/processinfo.h \
|
||||
$$UIPATH/util/stringutil.h
|
@ -19,13 +19,15 @@ SOURCES += \
|
||||
$$UIPATH/util/net/ip4range.cpp \
|
||||
$$UIPATH/util/net/netutil.cpp \
|
||||
$$UIPATH/util/osutil.cpp \
|
||||
$$UIPATH/util/processinfo.cpp
|
||||
$$UIPATH/util/processinfo.cpp \
|
||||
$$UIPATH/util/stringutil.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$UIPATH/conf/addressgroup.h \
|
||||
$$UIPATH/conf/appgroup.h \
|
||||
$$UIPATH/conf/firewallconf.h \
|
||||
$$UIPATH/fortcommon.h \
|
||||
$$UIPATH/fortcompat.h \
|
||||
$$UIPATH/log/logbuffer.h \
|
||||
$$UIPATH/log/logentry.h \
|
||||
$$UIPATH/log/logentryblocked.h \
|
||||
@ -41,4 +43,5 @@ HEADERS += \
|
||||
$$UIPATH/util/net/ip4range.h \
|
||||
$$UIPATH/util/net/netutil.h \
|
||||
$$UIPATH/util/osutil.h \
|
||||
$$UIPATH/util/processinfo.h
|
||||
$$UIPATH/util/processinfo.h \
|
||||
$$UIPATH/util/stringutil.h
|
@ -17,13 +17,15 @@ SOURCES += \
|
||||
$$UIPATH/util/net/netdownloader.cpp \
|
||||
$$UIPATH/util/net/netutil.cpp \
|
||||
$$UIPATH/util/osutil.cpp \
|
||||
$$UIPATH/util/processinfo.cpp
|
||||
$$UIPATH/util/processinfo.cpp \
|
||||
$$UIPATH/util/stringutil.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$UIPATH/conf/addressgroup.h \
|
||||
$$UIPATH/conf/appgroup.h \
|
||||
$$UIPATH/conf/firewallconf.h \
|
||||
$$UIPATH/fortcommon.h \
|
||||
$$UIPATH/fortcompat.h \
|
||||
$$UIPATH/task/taskdownloader.h \
|
||||
$$UIPATH/task/taskzonedownloader.h \
|
||||
$$UIPATH/task/taskworker.h \
|
||||
@ -36,7 +38,8 @@ HEADERS += \
|
||||
$$UIPATH/util/net/netdownloader.h \
|
||||
$$UIPATH/util/net/netutil.h \
|
||||
$$UIPATH/util/osutil.h \
|
||||
$$UIPATH/util/processinfo.h
|
||||
$$UIPATH/util/processinfo.h \
|
||||
$$UIPATH/util/stringutil.h
|
||||
|
||||
DEFINES += \
|
||||
PWD='"$$PWD"'
|
@ -15,13 +15,15 @@ SOURCES += \
|
||||
$$UIPATH/util/fileutil.cpp \
|
||||
$$UIPATH/util/net/netutil.cpp \
|
||||
$$UIPATH/util/osutil.cpp \
|
||||
$$UIPATH/util/processinfo.cpp
|
||||
$$UIPATH/util/processinfo.cpp \
|
||||
$$UIPATH/util/stringutil.cpp
|
||||
|
||||
HEADERS += \
|
||||
$$UIPATH/conf/addressgroup.h \
|
||||
$$UIPATH/conf/appgroup.h \
|
||||
$$UIPATH/conf/firewallconf.h \
|
||||
$$UIPATH/fortcommon.h \
|
||||
$$UIPATH/fortcompat.h \
|
||||
$$UIPATH/fortsettings.h \
|
||||
$$UIPATH/stat/quotamanager.h \
|
||||
$$UIPATH/stat/statmanager.h \
|
||||
@ -30,7 +32,8 @@ HEADERS += \
|
||||
$$UIPATH/util/fileutil.h \
|
||||
$$UIPATH/util/net/netutil.h \
|
||||
$$UIPATH/util/osutil.h \
|
||||
$$UIPATH/util/processinfo.h
|
||||
$$UIPATH/util/processinfo.h \
|
||||
$$UIPATH/util/stringutil.h
|
||||
|
||||
# Test Data
|
||||
RESOURCES += data.qrc
|
@ -136,7 +136,7 @@ void Test::debugStatTrafStep(SqliteDb *sqliteDb, const char *name,
|
||||
void Test::monthStart()
|
||||
{
|
||||
const QDate d1(2018, 1, 8);
|
||||
const QDateTime dt1(d1);
|
||||
const QDateTime dt1(d1, QTime());
|
||||
|
||||
const qint32 unixHour = DateUtil::getUnixMonth(dt1.toSecsSinceEpoch(), 10);
|
||||
|
Loading…
Reference in New Issue
Block a user