-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move mocks to their own interface (#4645)
- Loading branch information
Showing
12 changed files
with
564 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Language: Cpp | ||
|
||
AccessModifierOffset: -4 | ||
AlignEscapedNewlinesLeft: true | ||
AllowShortFunctionsOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLambdasOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: false | ||
AlwaysBreakBeforeMultilineStrings: false | ||
BasedOnStyle: Google | ||
BraceWrapping: | ||
AfterClass: "true" | ||
AfterControlStatement: "true" | ||
AfterFunction: "true" | ||
AfterNamespace: "false" | ||
BeforeCatch: "true" | ||
BeforeElse: "true" | ||
BreakBeforeBraces: Custom | ||
BreakConstructorInitializersBeforeComma: true | ||
ColumnLimit: 80 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
DerivePointerBinding: false | ||
FixNamespaceComments: true | ||
IndentCaseLabels: true | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: true | ||
IndentPPDirectives: AfterHash | ||
SortIncludes: CaseInsensitive | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
# Project includes | ||
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$' | ||
Priority: 1 | ||
# Third party library includes | ||
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>' | ||
Priority: 3 | ||
# Qt includes | ||
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$' | ||
Priority: 3 | ||
CaseSensitive: true | ||
# LibCommuni includes | ||
- Regex: "^<Irc[a-zA-Z]+>$" | ||
Priority: 3 | ||
# Misc libraries | ||
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$' | ||
Priority: 3 | ||
# Standard library includes | ||
- Regex: "^<[a-zA-Z_]+>$" | ||
Priority: 4 | ||
NamespaceIndentation: Inner | ||
PointerBindsToType: false | ||
SpacesBeforeTrailingComments: 2 | ||
Standard: Auto | ||
ReflowComments: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
project(chatterino-mocks) | ||
|
||
add_library(chatterino-mocks INTERFACE) | ||
|
||
target_include_directories(chatterino-mocks INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
|
||
target_link_libraries(${PROJECT_NAME} INTERFACE gmock) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#pragma once | ||
|
||
#include "Application.hpp" | ||
|
||
namespace chatterino::mock { | ||
|
||
class EmptyApplication : public IApplication | ||
{ | ||
public: | ||
Theme *getThemes() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
Fonts *getFonts() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
IEmotes *getEmotes() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
AccountController *getAccounts() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
HotkeyController *getHotkeys() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
WindowManager *getWindows() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
Toasts *getToasts() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
CommandController *getCommands() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
NotificationController *getNotifications() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
HighlightController *getHighlights() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
TwitchIrcServer *getTwitch() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
ChatterinoBadges *getChatterinoBadges() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
FfzBadges *getFfzBadges() override | ||
{ | ||
return nullptr; | ||
} | ||
|
||
IUserDataController *getUserData() override | ||
{ | ||
return nullptr; | ||
} | ||
}; | ||
|
||
} // namespace chatterino::mock |
Oops, something went wrong.