Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestGameClientCheats.cpp File Reference
#include "GUIUserMessages.h"
#include "ServiceBroker.h"
#include "ServiceManager.h"
#include "URL.h"
#include "addons/AddonEvents.h"
#include "addons/AddonManager.h"
#include "addons/Repository.h"
#include "addons/RepositoryUpdater.h"
#include "addons/addoninfo/AddonInfoBuilder.h"
#include "application/Application.h"
#include "filesystem/File.h"
#include "games/addons/GameClient.h"
#include "games/addons/cheats/GameClientCheats.h"
#include "guilib/GUIComponent.h"
#include "guilib/GUIWindowManager.h"
#include "jobs/JobManager.h"
#include "test/TestUtils.h"
#include "utils/URIUtils.h"
#include "utils/XBMCTinyXML2.h"
#include <algorithm>
#include <deque>
#include <filesystem>
#include <functional>
#include <future>
#include <memory>
#include <string>
#include <system_error>
#include <vector>
#include <gtest/gtest.h>

Classes

class  TestGameClientCheats
 

Functions

 TEST_F (TestGameClientCheats, SuccessfulInstallationFindsCheats)
 
 TEST_F (TestGameClientCheats, SuccessfulInstallationCompletesEmptyLookup)
 
 TEST_F (TestGameClientCheats, FailedOrCancelledInstallationAllowsRetry)
 
 TEST_F (TestGameClientCheats, FailedEnableDoesNotReportAnEmptyPack)
 
 TEST_F (TestGameClientCheats, DatabaseBecomingAvailableBeforeJobRunsIsSuccess)
 
 TEST_F (TestGameClientCheats, ExternalInstallOrEnableReloadsDuringGameplay)
 
 TEST_F (TestGameClientCheats, DuplicateEventsAndInstallPreserveUserChoices)
 
 TEST_F (TestGameClientCheats, UpdatedSourcePreservesUnchangedCheatsAndRemovesMissingCodes)
 
 TEST_F (TestGameClientCheats, DisableOrRemovalDropsAppliedCheats)
 
 TEST_F (TestGameClientCheats, UnrelatedEventsDoNotQueuePackLookups)
 
 TEST_F (TestGameClientCheats, UnsupportedClientsNeverSearchPacks)
 
 TEST_F (TestGameClientCheats, InstallableDatabaseDoesNotCountAsAMatchingPack)
 
 TEST_F (TestGameClientCheats, SupportedClientWithNoMatchStillExposesCheatCapability)
 
 TEST_F (TestGameClientCheats, ExpectedFilenameUsesTheGamePathAndSurvivesAnEmptyLookup)
 
 TEST_F (TestGameClientCheats, PendingReloadAndInstallationCannotReachReplacementGame)
 
 TEST_F (TestGameClientCheats, ClosingDuringLookupDiscardsTheResult)
 
 TEST_F (TestGameClientCheats, PendingJobsDoNotKeepTheClientAlive)
 
 TEST_F (TestGameClientCheats, CallbackDoesNotWaitForTheClientLock)
 
 TEST_F (TestGameClientCheats, SuccessfulEnableLoadsCheats)
 
 TEST_F (TestGameClientCheats, AlreadyAvailableDatabaseDoesNotReloadAnUnchangedPack)
 
 TEST_F (TestGameClientCheats, ReplacementDuringInstallationDiscardsTheOldLookup)
 
 TEST_F (TestGameClientCheats, ReplacementDuringLookupDiscardsTheOldResult)
 
 TEST_F (TestGameClientCheats, DifferentSourceDoesNotInheritEnabledChoices)
 
 TEST_F (TestGameClientCheats, RepositoryEventsInvalidateAvailabilityWithoutLoadingPacks)
 
 TEST_F (TestGameClientCheats, IgnoredEventDuringDiscoveryDoesNotDiscardThePack)
 
 TEST_F (TestGameClientCheats, UnrelatedStateEventsDuringDiscoveryDoNotDiscardOrReloadThePack)
 
 TEST_F (TestGameClientCheats, RemovedSourceDuringInitialDiscoveryRejectsStaleCandidates)
 
 TEST_F (TestGameClientCheats, NewResourceDuringDiscoveryRejectsIncompleteCandidates)
 
 TEST_F (TestGameClientCheats, RepositoryUpdateInvalidatesUnavailableDatabaseAndRefreshesDialog)
 
 TEST_F (TestGameClientCheats, RepositoryUpdateDoesNotDiscardOrReloadDiscovery)
 
 TEST_F (TestGameClientCheats, RepositoryCallbackDoesNotWaitForTheClientLock)
 
 TEST_F (TestGameClientCheats, ClosingUnsubscribesWhileRepositoryCallbackIsRunning)
 
 TEST_F (TestGameClientCheats, ExternalReloadQueuesDialogRefreshOnGuiThread)
 
 TEST_F (TestGameClientCheats, ClosingUnsubscribesWhileCallbackIsStillScheduling)
 
 TEST_F (TestGameClientCheats, DuplicateCheatsKeepTheirIndividualEnabledStates)
 
 TEST_F (TestGameClientCheats, RemovedResourceIsRecognizedFromPreviousSources)
 
 TEST_F (TestGameClientCheats, GuiInfoQueriesDoNotRunQueuedPackLookups)
 
 TEST_F (TestGameClientCheats, InstallationSendsOneRefreshIncludingWhenItFails)
 
 TEST_F (TestGameClientCheats, RemovedDatabaseDuringLookupDoesNotReportAnEmptyPack)
 
 TEST_F (TestGameClientCheats, StaleDialogCannotEnableADifferentCheatAfterReload)
 
 TEST_F (TestGameClientCheats, SystemLabelsKeepRawDirectoryAndArchiveIdentities)
 
 TEST_F (TestGameClientCheats, MissingAddonNameFallsBackToRedactedIdentifier)
 
 TEST_F (TestGameClientCheats, CustomSystemLabelsUseConfiguredRoot)
 
 TEST_F (TestGameClientCheats, CustomVfsRootRedactsCredentials)
 
 TEST_F (TestGameClientCheats, DuplicateVisibleRowsDisambiguateOnlyCollisionsAndKeepSelection)
 
 TEST_F (TestGameClientCheats, SameSourceDirectoryAndArchiveRowsRemainDistinct)
 
 TEST_F (TestGameClientCheats, MultipleInstalledPacksWithOnlyOneMatchingFilenameLoadAutomatically)
 
 TEST_F (TestGameClientCheats, MatchingSystemFoldersRequireAnExplicitChoice)
 
 TEST_F (TestGameClientCheats, MatchesAcrossAddonsRequireSelectionRegardlessOfOrder)
 
 TEST_F (TestGameClientCheats, CustomFolderAndDirectFileKeepPrecedence)
 
 TEST_F (TestGameClientCheats, CustomFolderWithoutMatchFallsBackToAddons)
 
 TEST_F (TestGameClientCheats, ChoiceSurvivesReopeningAndANewEmulatorInstance)
 
 TEST_F (TestGameClientCheats, CancelledChooserDoesNotChangeSelectionOrEnabledCheats)
 
 TEST_F (TestGameClientCheats, RemovedSelectionRequiresChoiceThenLoadsSoleRemainingMatch)
 
 TEST_F (TestGameClientCheats, SwitchingPacksResetsAppliedCheatsWithoutTransferringStates)
 
 TEST_F (TestGameClientCheats, SelectionRevalidatesRemovedCandidatesBeforeCommitting)
 
 TEST_F (TestGameClientCheats, StaleChooserCannotSelectForAReplacementSession)
 
 TEST_F (TestGameClientCheats, ClosingDuringSelectionDiscardsThePackAndPreference)
 
 TEST_F (TestGameClientCheats, AddonChangeDuringSelectionDiscardsTheStaleResult)
 
 TEST_F (TestGameClientCheats, TwoSystemArchivesInOneAddonAreDistinctPacks)
 
 TEST_F (TestGameClientCheats, UnusableCustomFileKeepsFallbackToAddon)
 
 TEST_F (TestGameClientCheats, MatchingPackDoesNotRequireUsableCheatEntries)
 
 TEST_F (TestGameClientCheats, EmptyMatchingArchivesRemainAmbiguousUntilSelected)
 
 TEST_F (TestGameClientCheats, ReplacementDuringAmbiguousDiscoveryDiscardsCandidates)
 
 TEST_F (TestGameClientCheats, RememberedCustomSelectionRemainsValidWhenItsCheatsBecomeEmpty)
 

Function Documentation

◆ TEST_F() [1/65]

TEST_F ( TestGameClientCheats ,
AddonChangeDuringSelectionDiscardsTheStaleResult  )

◆ TEST_F() [2/65]

TEST_F ( TestGameClientCheats ,
AlreadyAvailableDatabaseDoesNotReloadAnUnchangedPack  )

◆ TEST_F() [3/65]

TEST_F ( TestGameClientCheats ,
CallbackDoesNotWaitForTheClientLock  )

◆ TEST_F() [4/65]

TEST_F ( TestGameClientCheats ,
CancelledChooserDoesNotChangeSelectionOrEnabledCheats  )

◆ TEST_F() [5/65]

TEST_F ( TestGameClientCheats ,
ChoiceSurvivesReopeningAndANewEmulatorInstance  )

◆ TEST_F() [6/65]

TEST_F ( TestGameClientCheats ,
ClosingDuringLookupDiscardsTheResult  )

◆ TEST_F() [7/65]

TEST_F ( TestGameClientCheats ,
ClosingDuringSelectionDiscardsThePackAndPreference  )

◆ TEST_F() [8/65]

TEST_F ( TestGameClientCheats ,
ClosingUnsubscribesWhileCallbackIsStillScheduling  )

◆ TEST_F() [9/65]

TEST_F ( TestGameClientCheats ,
ClosingUnsubscribesWhileRepositoryCallbackIsRunning  )

◆ TEST_F() [10/65]

TEST_F ( TestGameClientCheats ,
CustomFolderAndDirectFileKeepPrecedence  )

◆ TEST_F() [11/65]

TEST_F ( TestGameClientCheats ,
CustomFolderWithoutMatchFallsBackToAddons  )

◆ TEST_F() [12/65]

TEST_F ( TestGameClientCheats ,
CustomSystemLabelsUseConfiguredRoot  )

◆ TEST_F() [13/65]

TEST_F ( TestGameClientCheats ,
CustomVfsRootRedactsCredentials  )

◆ TEST_F() [14/65]

TEST_F ( TestGameClientCheats ,
DatabaseBecomingAvailableBeforeJobRunsIsSuccess  )

◆ TEST_F() [15/65]

TEST_F ( TestGameClientCheats ,
DifferentSourceDoesNotInheritEnabledChoices  )

◆ TEST_F() [16/65]

TEST_F ( TestGameClientCheats ,
DisableOrRemovalDropsAppliedCheats  )

◆ TEST_F() [17/65]

TEST_F ( TestGameClientCheats ,
DuplicateCheatsKeepTheirIndividualEnabledStates  )

◆ TEST_F() [18/65]

TEST_F ( TestGameClientCheats ,
DuplicateEventsAndInstallPreserveUserChoices  )

◆ TEST_F() [19/65]

TEST_F ( TestGameClientCheats ,
DuplicateVisibleRowsDisambiguateOnlyCollisionsAndKeepSelection  )

◆ TEST_F() [20/65]

TEST_F ( TestGameClientCheats ,
EmptyMatchingArchivesRemainAmbiguousUntilSelected  )

◆ TEST_F() [21/65]

TEST_F ( TestGameClientCheats ,
ExpectedFilenameUsesTheGamePathAndSurvivesAnEmptyLookup  )

◆ TEST_F() [22/65]

TEST_F ( TestGameClientCheats ,
ExternalInstallOrEnableReloadsDuringGameplay  )

◆ TEST_F() [23/65]

TEST_F ( TestGameClientCheats ,
ExternalReloadQueuesDialogRefreshOnGuiThread  )

◆ TEST_F() [24/65]

TEST_F ( TestGameClientCheats ,
FailedEnableDoesNotReportAnEmptyPack  )

◆ TEST_F() [25/65]

TEST_F ( TestGameClientCheats ,
FailedOrCancelledInstallationAllowsRetry  )

◆ TEST_F() [26/65]

TEST_F ( TestGameClientCheats ,
GuiInfoQueriesDoNotRunQueuedPackLookups  )

◆ TEST_F() [27/65]

TEST_F ( TestGameClientCheats ,
IgnoredEventDuringDiscoveryDoesNotDiscardThePack  )

◆ TEST_F() [28/65]

TEST_F ( TestGameClientCheats ,
InstallableDatabaseDoesNotCountAsAMatchingPack  )

◆ TEST_F() [29/65]

TEST_F ( TestGameClientCheats ,
InstallationSendsOneRefreshIncludingWhenItFails  )

◆ TEST_F() [30/65]

TEST_F ( TestGameClientCheats ,
MatchesAcrossAddonsRequireSelectionRegardlessOfOrder  )

◆ TEST_F() [31/65]

TEST_F ( TestGameClientCheats ,
MatchingPackDoesNotRequireUsableCheatEntries  )

◆ TEST_F() [32/65]

TEST_F ( TestGameClientCheats ,
MatchingSystemFoldersRequireAnExplicitChoice  )

◆ TEST_F() [33/65]

TEST_F ( TestGameClientCheats ,
MissingAddonNameFallsBackToRedactedIdentifier  )

◆ TEST_F() [34/65]

TEST_F ( TestGameClientCheats ,
MultipleInstalledPacksWithOnlyOneMatchingFilenameLoadAutomatically  )

◆ TEST_F() [35/65]

TEST_F ( TestGameClientCheats ,
NewResourceDuringDiscoveryRejectsIncompleteCandidates  )

◆ TEST_F() [36/65]

TEST_F ( TestGameClientCheats ,
PendingJobsDoNotKeepTheClientAlive  )

◆ TEST_F() [37/65]

TEST_F ( TestGameClientCheats ,
PendingReloadAndInstallationCannotReachReplacementGame  )

◆ TEST_F() [38/65]

TEST_F ( TestGameClientCheats ,
RememberedCustomSelectionRemainsValidWhenItsCheatsBecomeEmpty  )

◆ TEST_F() [39/65]

TEST_F ( TestGameClientCheats ,
RemovedDatabaseDuringLookupDoesNotReportAnEmptyPack  )

◆ TEST_F() [40/65]

TEST_F ( TestGameClientCheats ,
RemovedResourceIsRecognizedFromPreviousSources  )

◆ TEST_F() [41/65]

TEST_F ( TestGameClientCheats ,
RemovedSelectionRequiresChoiceThenLoadsSoleRemainingMatch  )

◆ TEST_F() [42/65]

TEST_F ( TestGameClientCheats ,
RemovedSourceDuringInitialDiscoveryRejectsStaleCandidates  )

◆ TEST_F() [43/65]

TEST_F ( TestGameClientCheats ,
ReplacementDuringAmbiguousDiscoveryDiscardsCandidates  )

◆ TEST_F() [44/65]

TEST_F ( TestGameClientCheats ,
ReplacementDuringInstallationDiscardsTheOldLookup  )

◆ TEST_F() [45/65]

TEST_F ( TestGameClientCheats ,
ReplacementDuringLookupDiscardsTheOldResult  )

◆ TEST_F() [46/65]

TEST_F ( TestGameClientCheats ,
RepositoryCallbackDoesNotWaitForTheClientLock  )

◆ TEST_F() [47/65]

TEST_F ( TestGameClientCheats ,
RepositoryEventsInvalidateAvailabilityWithoutLoadingPacks  )

◆ TEST_F() [48/65]

TEST_F ( TestGameClientCheats ,
RepositoryUpdateDoesNotDiscardOrReloadDiscovery  )

◆ TEST_F() [49/65]

TEST_F ( TestGameClientCheats ,
RepositoryUpdateInvalidatesUnavailableDatabaseAndRefreshesDialog  )

◆ TEST_F() [50/65]

TEST_F ( TestGameClientCheats ,
SameSourceDirectoryAndArchiveRowsRemainDistinct  )

◆ TEST_F() [51/65]

TEST_F ( TestGameClientCheats ,
SelectionRevalidatesRemovedCandidatesBeforeCommitting  )

◆ TEST_F() [52/65]

TEST_F ( TestGameClientCheats ,
StaleChooserCannotSelectForAReplacementSession  )

◆ TEST_F() [53/65]

TEST_F ( TestGameClientCheats ,
StaleDialogCannotEnableADifferentCheatAfterReload  )

◆ TEST_F() [54/65]

TEST_F ( TestGameClientCheats ,
SuccessfulEnableLoadsCheats  )

◆ TEST_F() [55/65]

TEST_F ( TestGameClientCheats ,
SuccessfulInstallationCompletesEmptyLookup  )

◆ TEST_F() [56/65]

TEST_F ( TestGameClientCheats ,
SuccessfulInstallationFindsCheats  )

◆ TEST_F() [57/65]

TEST_F ( TestGameClientCheats ,
SupportedClientWithNoMatchStillExposesCheatCapability  )

◆ TEST_F() [58/65]

TEST_F ( TestGameClientCheats ,
SwitchingPacksResetsAppliedCheatsWithoutTransferringStates  )

◆ TEST_F() [59/65]

TEST_F ( TestGameClientCheats ,
SystemLabelsKeepRawDirectoryAndArchiveIdentities  )

◆ TEST_F() [60/65]

TEST_F ( TestGameClientCheats ,
TwoSystemArchivesInOneAddonAreDistinctPacks  )

◆ TEST_F() [61/65]

TEST_F ( TestGameClientCheats ,
UnrelatedEventsDoNotQueuePackLookups  )

◆ TEST_F() [62/65]

TEST_F ( TestGameClientCheats ,
UnrelatedStateEventsDuringDiscoveryDoNotDiscardOrReloadThePack  )

◆ TEST_F() [63/65]

TEST_F ( TestGameClientCheats ,
UnsupportedClientsNeverSearchPacks  )

◆ TEST_F() [64/65]

TEST_F ( TestGameClientCheats ,
UnusableCustomFileKeepsFallbackToAddon  )

◆ TEST_F() [65/65]

TEST_F ( TestGameClientCheats ,
UpdatedSourcePreservesUnchangedCheatsAndRemovesMissingCodes  )