|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <dialogs/git/git_credentials_prompt.h>#include <dialogs/git/git_status_entries.h>#include <dialogs/git/git_transfer.h>#include <dialogs/git/git_ui_utils.h>#include <git/kicad_git_common.h>#include <git/kicad_git_memory.h>#include <git/project_git_utils.h>#include <git/git_branch_handler.h>#include <git/git_push_handler.h>#include <qa_utils/file_utils.h>#include <qa_utils/git_test_fixture.h>#include <git2.h>#include <git2/sys/repository.h>#include <wx/app.h>#include <wx/file.h>#include <wx/filename.h>#include <wx/log.h>#include <wx/string.h>#include <wx/stdpaths.h>#include <chrono>#include <algorithm>#include <fstream>#include <future>#include <iterator>#include <memory>#include <set>#include <stdexcept>#include <thread>#include <unistd.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (GitRootDirectoryReturnsWorkdir) | |
| BOOST_AUTO_TEST_CASE (HasPushAndPullRemoteAcceptsNonOriginName) | |
| BOOST_AUTO_TEST_CASE (HasPushAndPullRemoteFindsOrigin) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFilesEmptyWithoutUpstream) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFilesHandlesUnrelatedHistories) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFilesReportsOnlyTouchedFilesWhenAhead) | |
| BOOST_AUTO_TEST_CASE (PrivateKeyEncryptionOpenSSHFormat) | |
| BOOST_AUTO_TEST_CASE (PrivateKeyEncryptionClassicPEMFormat) | |
| BOOST_AUTO_TEST_CASE (PrivateKeyEncryptionPKCS8Format) | |
| BOOST_AUTO_TEST_CASE (PrivateKeyEncryptionRejectsNonKeys) | |
| BOOST_AUTO_TEST_CASE (GetDifferentFilesReportsRemoteOnlyFilesWhenBehind) | |
| BOOST_AUTO_TEST_CASE (RefreshListenersFireOnNotify) | |
| BOOST_AUTO_TEST_CASE (RemovedRefreshListenerDoesNotFire) | |
| BOOST_AUTO_TEST_CASE (RefreshListenerCanUnregisterDuringNotify) | |
| BOOST_AUTO_TEST_CASE (RefreshListenerRemovedByAnotherDoesNotFire) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsEmptyWithoutRepo) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsHonorsAnAlreadyCancelledOperation) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsReturnsNewestFirst) | |
| BOOST_AUTO_TEST_CASE (IdentityEmailMustLookLikeAnAddress) | |
| BOOST_AUTO_TEST_CASE (SessionWithoutARepositoryAnswersQuietly) | |
| BOOST_AUTO_TEST_CASE (BranchNameErrorNamesTheMistake) | |
| BOOST_AUTO_TEST_CASE (CreateBranchRefusesAnInvalidName) | |
| BOOST_AUTO_TEST_CASE (CommitTextThatIsNotUtf8StillReads) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsFiltersByBranchAndSearch) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsNamesRefsOnEachCommit) | |
| BOOST_AUTO_TEST_CASE (StartUnbornBranchNamesTheBranchTheFirstCommitWillCreate) | |
| BOOST_AUTO_TEST_CASE (GetCommitDetailCarriesTheWholeMessage) | |
| BOOST_AUTO_TEST_CASE (GetCommitDetailCountsLinesPerFile) | |
| BOOST_AUTO_TEST_CASE (WorkingTreeLineStatsCountOnlyTheFilesGiven) | |
| BOOST_AUTO_TEST_CASE (SymlinkedProjectFolderStillFindsItsPrefix) | |
| BOOST_AUTO_TEST_CASE (WriteBlobToFileExtractsCommittedContent) | |
| BOOST_AUTO_TEST_CASE (DiffWorkspaceKeepsExtractionsSeparateAndRemovesThem) | |
| BOOST_AUTO_TEST_CASE (GetTagsResolvesTagToCommit) | |
| BOOST_AUTO_TEST_CASE (GetStashesListsStash) | |
| BOOST_AUTO_TEST_CASE (StashIdStaysWithItsStashWhenAnotherIsAdded) | |
| BOOST_AUTO_TEST_CASE (StashSaveRoundTrip) | |
| BOOST_AUTO_TEST_CASE (CreateAndDeleteBranch) | |
| BOOST_AUTO_TEST_CASE (CreateAndDeleteTag) | |
| BOOST_AUTO_TEST_CASE (SetUserConfigPersists) | |
| BOOST_AUTO_TEST_CASE (GitIdentityUsesRepositoryValuesBeforeCustomDefaults) | |
| BOOST_AUTO_TEST_CASE (StashDropRemovesStash) | |
| BOOST_AUTO_TEST_CASE (StashApplyKeepsAndStashPopRemoves) | |
| BOOST_AUTO_TEST_CASE (StashPopKeepsStashWhenItConflicts) | |
| BOOST_AUTO_TEST_CASE (PullRebaseConfigIsReadAsGitReadsIt) | |
| BOOST_AUTO_TEST_CASE (DetachedHeadHasNoLocalCommits) | |
| BOOST_AUTO_TEST_CASE (CheckoutTagDetachesHead) | |
| BOOST_AUTO_TEST_CASE (UnmergedCommitCountIsWhatHeadDoesNotContain) | |
| BOOST_AUTO_TEST_CASE (RemoteRoundTripAndUserinfoStripped) | |
| BOOST_AUTO_TEST_CASE (GetBranchesKeepsBranchesSharingACommitTime) | |
| BOOST_AUTO_TEST_CASE (GetBranchesCarriesTipAndCurrent) | |
| BOOST_AUTO_TEST_CASE (GetBranchesDistinguishesRemoteNamesAndSkipsSymbolicAliases) | |
| BOOST_AUTO_TEST_CASE (SortBranchesForDisplayGroupsBranchesAndBreaksTimeTies) | |
| BOOST_AUTO_TEST_CASE (GetBranchDetailReportsTipAndUpstream) | |
| BOOST_AUTO_TEST_CASE (BranchComparisonsUseTheSelectedBranchAndItsOwnUpstream) | |
| BOOST_AUTO_TEST_CASE (BranchComparisonsStayUnknownWhenReferencesCannotBeRead) | |
| BOOST_AUTO_TEST_CASE (CreateBranchStartsAtTheGivenBranch) | |
| BOOST_AUTO_TEST_CASE (GetLastFetchTimeReadsFetchHead) | |
| BOOST_AUTO_TEST_CASE (GetWorkingTreeLineStatsCountsEditsAndNewFiles) | |
| BOOST_AUTO_TEST_CASE (GetStashDetailNamesBranchCommitAndFiles) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitsFiltersByPath) | |
| BOOST_AUTO_TEST_CASE (ProjectUsesGitLfsFindsAFilteredFile) | |
| BOOST_AUTO_TEST_CASE (ProjectUsesGitLfsStaysWithinTheSessionProject) | |
| BOOST_AUTO_TEST_CASE (GetTagDetailDatesALightweightTagByCommitterTime) | |
| BOOST_AUTO_TEST_CASE (GetTagDetailReadsAnnotatedAndLightweightTags) | |
| BOOST_AUTO_TEST_CASE (GetTagsListsNewestFirstAndKeepsTagsWithoutCommits) | |
| BOOST_AUTO_TEST_CASE (GetRecentCommitMessagesListsDistinctMessagesNewestFirst) | |
| BOOST_AUTO_TEST_CASE (ComposeAndSplitCommitMessage) | |
| BOOST_AUTO_TEST_CASE (SwitchToBranchAtHeadKeepsUncommittedChanges) | |
| BOOST_AUTO_TEST_CASE (SetRemoteStripsUrlUserinfo) | |
| BOOST_AUTO_TEST_CASE (SetRemoteStripsUserinfoContainingAtSign) | |
| BOOST_AUTO_TEST_CASE (ParseRemoteURLPreservesSSHAddress) | |
| BOOST_AUTO_TEST_CASE (ParseRemoteURLKeepsPortWhenExtractingCredentials) | |
| BOOST_AUTO_TEST_CASE (ParseRemoteURLKeepsLocalPaths) | |
| BOOST_AUTO_TEST_CASE (SetRemotePreservesSSHAddressAndAcceptsLocalReplacement) | |
| BOOST_AUTO_TEST_CASE (UpdateCurrentBranchInfoRefreshesChangedRemoteUrl) | |
| BOOST_AUTO_TEST_CASE (SetSSHKeyIgnoresEmptyKey) | |
| BOOST_AUTO_TEST_CASE (IsWithinProjectPathHandlesMixedSeparators) | |
| BOOST_AUTO_TEST_CASE (HasUncommittedTrackedChangesIgnoresUntracked) | |
| BOOST_AUTO_TEST_CASE (WorktreeRefusalPrioritizesUnsavedDocumentAndLibraryEditors) | |
| BOOST_AUTO_TEST_CASE (WorktreeStatusRefusesUnavailableAndFailedReads) | |
| BOOST_AUTO_TEST_CASE (WorktreeStatusAllowsCleanAndUntrackedFiles) | |
| BOOST_AUTO_TEST_CASE (WorktreeStatusExplainsTrackedChangesInsideAndOutsideTheProject) | |
| BOOST_AUTO_TEST_CASE (WorktreeStatusDistinguishesGitLfsFromUncommittedChanges) | |
| BOOST_AUTO_TEST_CASE (DiscardingAConflictedPathSettlesIt) | |
| BOOST_AUTO_TEST_CASE (ForcePushRejectsAChangedConfirmedTarget) | |
| BOOST_AUTO_TEST_CASE (PushWaitsForQueryLockAndHonorsCancellation) | |
| BOOST_AUTO_TEST_CASE (TransferCompletionCapturesStayOnUiThread) | |
| BOOST_AUTO_TEST_CASE (QuerySerializesAndKeepsOnlyTheLatestRequest) | |
| BOOST_AUTO_TEST_CASE (QueryCancelDropsPendingWorkAndQueuedCompletion) | |
| BOOST_AUTO_TEST_CASE (QueryDestructionDoesNotWaitAndPinsTheSession) | |
| BOOST_AUTO_TEST_CASE (QuerySkipsUnavailableSessionsAndCompletesOnUi) | |
| BOOST_AUTO_TEST_CASE (QueryExceptionStillCompletesAndCompletionCanDestroyOwner) | |
| BOOST_AUTO_TEST_CASE (QueryExceptionStillStartsThePendingRequest) | |
| BOOST_AUTO_TEST_CASE | ( | BranchComparisonsStayUnknownWhenReferencesCannotBeRead | ) |
Definition at line 2056 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), config, KIGIT_BRANCH_DETAIL::divergence, KIGIT_COMMON::GetBranchDetail(), KIGIT_COMMON::GetUnmergedCommitCount(), KIGIT_COMMON::HasLocalCommits(), and KIGIT_COMMON::HasUpstreamCommits().
| BOOST_AUTO_TEST_CASE | ( | BranchComparisonsUseTheSelectedBranchAndItsOwnUpstream | ) |
Definition at line 1991 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_BRANCH_DETAIL::divergence, KIGIT_BRANCH_DETAIL::found, KIGIT_COMMON::GetBranchDetail(), KIGIT_COMMON::GetUnmergedCommitCount(), KIGIT_COMMON::HasLocalCommits(), KIGIT_COMMON::HasUpstreamCommits(), main(), and KIGIT_BRANCH_DETAIL::upstream.
| BOOST_AUTO_TEST_CASE | ( | BranchNameErrorNamesTheMistake | ) |
Definition at line 860 of file test_kigit_common.cpp.
References KIGIT::BranchNameError().
| BOOST_AUTO_TEST_CASE | ( | CheckoutTagDetachesHead | ) |
Definition at line 1697 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CheckoutTag(), KIGIT_COMMON::CreateTag(), git_repository, and KIGIT_COMMON::IsHeadDetached().
| BOOST_AUTO_TEST_CASE | ( | CommitTextThatIsNotUtf8StillReads | ) |
Definition at line 893 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetCommitDetail(), KIGIT_COMMON::GetRecentCommits(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | ComposeAndSplitCommitMessage | ) |
Definition at line 2500 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT::ComposeCommitMessage(), and KIGIT::SplitCommitMessage().
| BOOST_AUTO_TEST_CASE | ( | CreateAndDeleteBranch | ) |
Definition at line 1437 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::CreateBranch(), KIGIT_COMMON::DeleteBranch(), KIGIT_COMMON::GetBranches(), git_repository, and name.
| BOOST_AUTO_TEST_CASE | ( | CreateAndDeleteTag | ) |
Definition at line 1465 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::CreateTag(), KIGIT_COMMON::DeleteTag(), KIGIT_COMMON::GetTags(), git_repository, and name.
| BOOST_AUTO_TEST_CASE | ( | CreateBranchRefusesAnInvalidName | ) |
Definition at line 879 of file test_kigit_common.cpp.
References KIGIT_COMMON::CreateBranch(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | CreateBranchStartsAtTheGivenBranch | ) |
Definition at line 2086 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_BRANCH_DETAIL::found, KIGIT_COMMON::GetBranchDetail(), git_repository, and KIGIT_BRANCH_DETAIL::tipHash.
| BOOST_AUTO_TEST_CASE | ( | DetachedHeadHasNoLocalCommits | ) |
Definition at line 1672 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CheckoutTag(), KIGIT_COMMON::CreateTag(), KIGIT_COMMON::GetUnmergedCommitCount(), git_repository, KIGIT_COMMON::HasLocalCommits(), KIGIT_COMMON::HasUpstreamCommits(), and KIGIT_COMMON::IsHeadDetached().
| BOOST_AUTO_TEST_CASE | ( | DiffWorkspaceKeepsExtractionsSeparateAndRemovesThem | ) |
Definition at line 1261 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), GIT_DIFF_WORKSPACE::IsOk(), GIT_DIFF_WORKSPACE::Materialize(), KICAD_DIFF::PCB, GIT_DIFF_WORKSPACE::Root(), and KICAD_DIFF::SCH.
| BOOST_AUTO_TEST_CASE | ( | DiscardingAConflictedPathSettlesIt | ) |
Definition at line 2964 of file test_kigit_common.cpp.
References KIGIT_COMMON::DiscardChanges(), git_repository, index, and KIGIT_COMMON::IsPathConflicted().
| BOOST_AUTO_TEST_CASE | ( | ForcePushRejectsAChangedConfirmedTarget | ) |
Definition at line 3000 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), Error, KIGIT_COMMON::GetCurrentBranchName(), KIGIT_ERRORS::GetErrorString(), GIT_PUSH_HANDLER::PerformPush(), and GIT_PUSH_HANDLER::SetExpectedTarget().
| BOOST_AUTO_TEST_CASE | ( | GetBranchDetailReportsTipAndUpstream | ) |
Definition at line 1952 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_BRANCH_DETAIL::divergence, KIGIT_BRANCH_DETAIL::found, KIGIT_COMMON::GetBranchDetail(), KIGIT_COMMON::GetRecentCommits(), git_repository, main(), KIGIT_BRANCH_DETAIL::message, and KIGIT_BRANCH_DETAIL::upstream.
| BOOST_AUTO_TEST_CASE | ( | GetBranchesCarriesTipAndCurrent | ) |
Definition at line 1809 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_COMMON::GetBranches(), KIGIT_COMMON::GetRecentCommits(), git_repository, and message.
| BOOST_AUTO_TEST_CASE | ( | GetBranchesDistinguishesRemoteNamesAndSkipsSymbolicAliases | ) |
Definition at line 1860 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), and KIGIT_COMMON::GetBranches().
| BOOST_AUTO_TEST_CASE | ( | GetBranchesKeepsBranchesSharingACommitTime | ) |
Definition at line 1782 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_COMMON::GetBranches(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetCommitDetailCarriesTheWholeMessage | ) |
Definition at line 1083 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetCommitDetail(), KIGIT_COMMON::GetRecentCommits(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetCommitDetailCountsLinesPerFile | ) |
Definition at line 1099 of file test_kigit_common.cpp.
References KIGIT::ADDED, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMIT_DETAIL::files, KIGIT_COMMIT_DETAIL::found, KIGIT_COMMON::GetCommitDetail(), KIGIT_COMMON::GetRecentCommits(), git_repository, index, KIGIT::MODIFIED, and KIGIT_COMMIT_DETAIL::parents.
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFilesEmptyWithoutUpstream | ) |
Definition at line 276 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetDifferentFiles(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFilesHandlesUnrelatedHistories | ) |
Definition at line 295 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetDifferentFiles(), git_repository, and index.
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFilesReportsOnlyTouchedFilesWhenAhead | ) |
Definition at line 395 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetDifferentFiles(), git_repository, and index.
| BOOST_AUTO_TEST_CASE | ( | GetDifferentFilesReportsRemoteOnlyFilesWhenBehind | ) |
Definition at line 541 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetDifferentFiles(), git_repository, and index.
| BOOST_AUTO_TEST_CASE | ( | GetLastFetchTimeReadsFetchHead | ) |
Definition at line 2110 of file test_kigit_common.cpp.
References BOOST_REQUIRE(), KIGIT_COMMON::GetLastFetchTime(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitMessagesListsDistinctMessagesNewestFirst | ) |
Definition at line 2463 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), empty(), KIGIT_COMMON::GetRecentCommitMessages(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsEmptyWithoutRepo | ) |
Definition at line 735 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetRecentCommits().
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsFiltersByBranchAndSearch | ) |
Definition at line 938 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_HISTORY_FILTER::branch, KIGIT_COMMON::GetRecentCommits(), git_repository, and KIGIT_HISTORY_FILTER::search.
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsFiltersByPath | ) |
Definition at line 2208 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), filter, KIGIT_COMMON::GetRecentCommits(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsHonorsAnAlreadyCancelledOperation | ) |
Definition at line 742 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRecentCommits(), KIGIT_COMMON::LockAction(), and KIGIT_COMMON::NewCancelToken().
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsNamesRefsOnEachCommit | ) |
Definition at line 1006 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRecentCommits(), git_repository, and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | GetRecentCommitsReturnsNewestFirst | ) |
Definition at line 765 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRecentCommits(), git_repository, and index.
| BOOST_AUTO_TEST_CASE | ( | GetStashDetailNamesBranchCommitAndFiles | ) |
Definition at line 2159 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetRecentCommits(), KIGIT_COMMON::GetStashDetail(), KIGIT_COMMON::GetStashes(), git_repository, index, and KIGIT_COMMON::StashSave().
| BOOST_AUTO_TEST_CASE | ( | GetStashesListsStash | ) |
Definition at line 1341 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetStashes(), git_repository, index, and message.
| BOOST_AUTO_TEST_CASE | ( | GetTagDetailDatesALightweightTagByCommitterTime | ) |
Definition at line 2337 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetRecentCommits(), KIGIT_COMMON::GetTagDetail(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GetTagDetailReadsAnnotatedAndLightweightTags | ) |
Definition at line 2383 of file test_kigit_common.cpp.
References KIGIT_TAG_DETAIL::author, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateTag(), KIGIT_TAG_DETAIL::email, KIGIT_TAG_DETAIL::found, KIGIT_COMMON::GetRecentCommits(), KIGIT_COMMON::GetTagDetail(), git_repository, KIGIT_TAG_DETAIL::hash, KIGIT_TAG_DETAIL::message, KIGIT_TAG_DETAIL::name, KIGIT_COMMON::SetUserConfig(), and KIGIT_TAG_DETAIL::when.
| BOOST_AUTO_TEST_CASE | ( | GetTagsListsNewestFirstAndKeepsTagsWithoutCommits | ) |
Definition at line 2423 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateTag(), KIGIT_COMMON::GetTags(), git_repository, and name.
| BOOST_AUTO_TEST_CASE | ( | GetTagsResolvesTagToCommit | ) |
Definition at line 1314 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRecentCommits(), KIGIT_COMMON::GetTags(), git_repository, and name.
| BOOST_AUTO_TEST_CASE | ( | GetWorkingTreeLineStatsCountsEditsAndNewFiles | ) |
Definition at line 2137 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetWorkingTreeLineStats(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | GitIdentityUsesRepositoryValuesBeforeCustomDefaults | ) |
Definition at line 1509 of file test_kigit_common.cpp.
References GitUserConfig::authorEmail, GitUserConfig::authorName, BOOST_CHECK_EQUAL(), config, KIGIT::GIT_IDENTITY::configured, KI_TEST::InitGitRepository(), KIGIT_COMMON::LockAction(), KIGIT::ReadGitIdentity(), KIGIT::ResolveGitIdentity(), and COMMON_SETTINGS::GIT::useDefaultAuthor.
| BOOST_AUTO_TEST_CASE | ( | GitRootDirectoryReturnsWorkdir | ) |
Definition at line 213 of file test_kigit_common.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetGitRootDirectory(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | HasPushAndPullRemoteAcceptsNonOriginName | ) |
Definition at line 238 of file test_kigit_common.cpp.
References git_repository, and KIGIT_COMMON::HasPushAndPullRemote().
| BOOST_AUTO_TEST_CASE | ( | HasPushAndPullRemoteFindsOrigin | ) |
Definition at line 258 of file test_kigit_common.cpp.
References git_repository, and KIGIT_COMMON::HasPushAndPullRemote().
| BOOST_AUTO_TEST_CASE | ( | HasUncommittedTrackedChangesIgnoresUntracked | ) |
Definition at line 2787 of file test_kigit_common.cpp.
References git_repository, and KIGIT_COMMON::HasUncommittedTrackedChanges().
| BOOST_AUTO_TEST_CASE | ( | IdentityEmailMustLookLikeAnAddress | ) |
Definition at line 827 of file test_kigit_common.cpp.
References KIGIT::ValidateIdentity().
| BOOST_AUTO_TEST_CASE | ( | IsWithinProjectPathHandlesMixedSeparators | ) |
Definition at line 2766 of file test_kigit_common.cpp.
| BOOST_AUTO_TEST_CASE | ( | ParseRemoteURLKeepsLocalPaths | ) |
Definition at line 2676 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), KIGIT_COMMON::REMOTE_URL::connType, KIGIT_COMMON::GIT_CONN_LOCAL, KIGIT_COMMON::REMOTE_URL::hostname, KIGIT_COMMON::ParseRemoteURL(), KIGIT_COMMON::REMOTE_URL::password, path, KIGIT_COMMON::REMOTE_URL::url, and KIGIT_COMMON::REMOTE_URL::username.
| BOOST_AUTO_TEST_CASE | ( | ParseRemoteURLKeepsPortWhenExtractingCredentials | ) |
Definition at line 2638 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), KIGIT_COMMON::REMOTE_URL::connType, KIGIT_COMMON::GIT_CONN_HTTPS, KIGIT_COMMON::GIT_CONN_SSH, KIGIT_COMMON::REMOTE_URL::hostname, KIGIT_COMMON::ParseRemoteURL(), KIGIT_COMMON::REMOTE_URL::password, KIGIT_COMMON::REMOTE_URL::url, and KIGIT_COMMON::REMOTE_URL::username.
| BOOST_AUTO_TEST_CASE | ( | ParseRemoteURLPreservesSSHAddress | ) |
Definition at line 2602 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_CONTEXT(), KIGIT_COMMON::REMOTE_URL::connType, KIGIT_COMMON::GIT_CONN_SSH, KIGIT_COMMON::REMOTE_URL::hostname, KIGIT_COMMON::ParseRemoteURL(), KIGIT_COMMON::REMOTE_URL::password, KIGIT_COMMON::REMOTE_URL::url, and KIGIT_COMMON::REMOTE_URL::username.
| BOOST_AUTO_TEST_CASE | ( | PrivateKeyEncryptionClassicPEMFormat | ) |
Definition at line 513 of file test_kigit_common.cpp.
References KIGIT::IsPrivateKeyEncrypted().
| BOOST_AUTO_TEST_CASE | ( | PrivateKeyEncryptionOpenSSHFormat | ) |
Definition at line 500 of file test_kigit_common.cpp.
References KIGIT::IsPrivateKeyEncrypted().
| BOOST_AUTO_TEST_CASE | ( | PrivateKeyEncryptionPKCS8Format | ) |
Definition at line 523 of file test_kigit_common.cpp.
References KIGIT::IsPrivateKeyEncrypted().
| BOOST_AUTO_TEST_CASE | ( | PrivateKeyEncryptionRejectsNonKeys | ) |
Definition at line 530 of file test_kigit_common.cpp.
References KIGIT::IsPrivateKeyEncrypted().
| BOOST_AUTO_TEST_CASE | ( | ProjectUsesGitLfsFindsAFilteredFile | ) |
Definition at line 2253 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | ProjectUsesGitLfsStaysWithinTheSessionProject | ) |
Definition at line 2306 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), and KI_TEST::InitGitRepository().
| BOOST_AUTO_TEST_CASE | ( | PullRebaseConfigIsReadAsGitReadsIt | ) |
Definition at line 1638 of file test_kigit_common.cpp.
References git_repository, and KIGIT_COMMON::IsPullRebaseConfigured().
| BOOST_AUTO_TEST_CASE | ( | PushWaitsForQueryLockAndHonorsCancellation | ) |
Definition at line 3042 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), Error, KIGIT_ERRORS::GetErrorStrings(), KIGIT_COMMON::GetRecentCommits(), KIGIT_REPO_MIXIN::IsThisOperationCancelled(), KIGIT_COMMON::LockAction(), KIGIT_COMMON::NewCancelToken(), GIT_PUSH_HANDLER::PerformPush(), result, KIGIT_REPO_MIXIN::SetCancelToken(), and KIGIT_REPO_MIXIN::SetWaitForActionLock().
| BOOST_AUTO_TEST_CASE | ( | QueryCancelDropsPendingWorkAndQueuedCompletion | ) |
Definition at line 3203 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_QUERY::Cancel(), KIGIT_QUERY::IsBusy(), and KIGIT_QUERY::Run().
| BOOST_AUTO_TEST_CASE | ( | QueryDestructionDoesNotWaitAndPinsTheSession | ) |
Definition at line 3254 of file test_kigit_common.cpp.
References BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | QueryExceptionStillCompletesAndCompletionCanDestroyOwner | ) |
Definition at line 3351 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), and BOOST_REQUIRE().
| BOOST_AUTO_TEST_CASE | ( | QueryExceptionStillStartsThePendingRequest | ) |
Definition at line 3379 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_QUERY::IsBusy(), and KIGIT_QUERY::Run().
| BOOST_AUTO_TEST_CASE | ( | QuerySerializesAndKeepsOnlyTheLatestRequest | ) |
Definition at line 3139 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_QUERY::IsBusy(), and KIGIT_QUERY::Run().
| BOOST_AUTO_TEST_CASE | ( | QuerySkipsUnavailableSessionsAndCompletesOnUi | ) |
Definition at line 3297 of file test_kigit_common.cpp.
References BOOST_REQUIRE(), KIGIT_QUERY::IsBusy(), and KIGIT_QUERY::Run().
| BOOST_AUTO_TEST_CASE | ( | RefreshListenerCanUnregisterDuringNotify | ) |
Definition at line 674 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRefreshListener(), BOOST_CHECK_EQUAL(), KIGIT_COMMON::NotifyRefreshListeners(), and KIGIT_COMMON::RemoveRefreshListener().
| BOOST_AUTO_TEST_CASE | ( | RefreshListenerRemovedByAnotherDoesNotFire | ) |
Definition at line 706 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRefreshListener(), BOOST_CHECK_EQUAL(), KIGIT_COMMON::NotifyRefreshListeners(), and KIGIT_COMMON::RemoveRefreshListener().
| BOOST_AUTO_TEST_CASE | ( | RefreshListenersFireOnNotify | ) |
Definition at line 614 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRefreshListener(), BOOST_CHECK_EQUAL(), and KIGIT_COMMON::NotifyRefreshListeners().
| BOOST_AUTO_TEST_CASE | ( | RemoteRoundTripAndUserinfoStripped | ) |
Definition at line 1756 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRemote(), BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRemotes(), git_repository, KIGIT_COMMON::RemoveRemote(), and KIGIT_COMMON::SetRemoteUrl().
| BOOST_AUTO_TEST_CASE | ( | RemovedRefreshListenerDoesNotFire | ) |
Definition at line 645 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRefreshListener(), BOOST_CHECK_EQUAL(), KIGIT_COMMON::NotifyRefreshListeners(), and KIGIT_COMMON::RemoveRefreshListener().
| BOOST_AUTO_TEST_CASE | ( | SessionWithoutARepositoryAnswersQuietly | ) |
Definition at line 846 of file test_kigit_common.cpp.
References KIGIT_COMMON::GetCurrentBranchName(), KIGIT_COMMON::GetProjectDirs(), KIGIT_COMMON::GetRemotename(), KIGIT_COMMON::HasPushAndPullRemote(), and KIGIT_COMMON::UpdateCurrentBranchInfo().
| BOOST_AUTO_TEST_CASE | ( | SetRemotePreservesSSHAddressAndAcceptsLocalReplacement | ) |
Definition at line 2702 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetConnType(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), KIGIT_COMMON::GIT_CONN_LOCAL, KIGIT_COMMON::GIT_CONN_SSH, KIGIT_COMMON::SetRemote(), and KIGIT_COMMON::SetUsername().
| BOOST_AUTO_TEST_CASE | ( | SetRemoteStripsUrlUserinfo | ) |
Definition at line 2572 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetRemote(), and KIGIT_COMMON::SetRemote().
| BOOST_AUTO_TEST_CASE | ( | SetRemoteStripsUserinfoContainingAtSign | ) |
Definition at line 2585 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetPassword(), KIGIT_COMMON::GetRemote(), KIGIT_COMMON::GetUsername(), and KIGIT_COMMON::SetRemote().
| BOOST_AUTO_TEST_CASE | ( | SetSSHKeyIgnoresEmptyKey | ) |
Definition at line 2746 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), KIGIT_COMMON::GetNextPublicKey(), KIGIT_COMMON::ResetNextKey(), KIGIT_COMMON::SetSSHKey(), and KI_TEST::WriteGitFile().
| BOOST_AUTO_TEST_CASE | ( | SetUserConfigPersists | ) |
Definition at line 1484 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), config, git_repository, and KIGIT_COMMON::SetUserConfig().
| BOOST_AUTO_TEST_CASE | ( | SortBranchesForDisplayGroupsBranchesAndBreaksTimeTies | ) |
Definition at line 1917 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), expected, info, name, and KIGIT::SortBranchesForDisplay().
| BOOST_AUTO_TEST_CASE | ( | StartUnbornBranchNamesTheBranchTheFirstCommitWillCreate | ) |
Definition at line 1042 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_BRANCH_DETAIL::divergence, KIGIT_COMMON::GetBranchDetail(), KIGIT_COMMON::GetBranches(), KIGIT_COMMON::GetUnmergedCommitCount(), git_repository, KIGIT_COMMON::HasLocalCommits(), KIGIT_COMMON::HasUpstreamCommits(), KIGIT_COMMON::IsHeadUnborn(), and KIGIT_COMMON::StartUnbornBranch().
| BOOST_AUTO_TEST_CASE | ( | StashApplyKeepsAndStashPopRemoves | ) |
Definition at line 1583 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::DiscardChanges(), KIGIT_COMMON::GetStashes(), git_repository, KIGIT_COMMON::StashApply(), KIGIT_COMMON::StashPop(), and KIGIT_COMMON::StashSave().
| BOOST_AUTO_TEST_CASE | ( | StashDropRemovesStash | ) |
Definition at line 1566 of file test_kigit_common.cpp.
References BOOST_REQUIRE(), KIGIT_COMMON::GetStashes(), git_repository, KIGIT_COMMON::StashDrop(), and KIGIT_COMMON::StashSave().
| BOOST_AUTO_TEST_CASE | ( | StashIdStaysWithItsStashWhenAnotherIsAdded | ) |
Definition at line 1372 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetStashes(), git_repository, KIGIT_COMMON::StashSave(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | StashPopKeepsStashWhenItConflicts | ) |
Definition at line 1609 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetStashes(), git_repository, index, KIGIT_COMMON::StashPop(), and KIGIT_COMMON::StashSave().
| BOOST_AUTO_TEST_CASE | ( | StashSaveRoundTrip | ) |
Definition at line 1413 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetStashes(), git_repository, message, KIGIT_COMMON::StashPop(), and KIGIT_COMMON::StashSave().
| BOOST_AUTO_TEST_CASE | ( | SwitchToBranchAtHeadKeepsUncommittedChanges | ) |
Definition at line 2551 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_COMMON::GetCurrentBranchName(), KIGIT_ERRORS::GetErrorString(), git_repository, KIGIT_COMMON::HasUncommittedTrackedChanges(), Success, and GIT_BRANCH_HANDLER::SwitchToBranch().
| BOOST_AUTO_TEST_CASE | ( | SymlinkedProjectFolderStillFindsItsPrefix | ) |
Definition at line 1202 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT::PROJECT_GIT_UTILS::ComputeSymlinkPreservingWorkDir(), KIGIT::PROJECT_GIT_UTILS::IsWithinProjectPath(), KIGIT::PROJECT_GIT_UTILS::ProjectPrefix(), and ToStdString().
| BOOST_AUTO_TEST_CASE | ( | TransferCompletionCapturesStayOnUiThread | ) |
Definition at line 3080 of file test_kigit_common.cpp.
References BOOST_REQUIRE(), KIGIT_TRANSFER::IsBusy(), and KIGIT_TRANSFER::Start().
| BOOST_AUTO_TEST_CASE | ( | UnmergedCommitCountIsWhatHeadDoesNotContain | ) |
Definition at line 1723 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::CreateBranch(), KIGIT_COMMON::GetUnmergedCommitCount(), and git_repository.
| BOOST_AUTO_TEST_CASE | ( | UpdateCurrentBranchInfoRefreshesChangedRemoteUrl | ) |
Definition at line 2722 of file test_kigit_common.cpp.
References KIGIT_COMMON::AddRemote(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetRemote(), git_repository, KIGIT_COMMON::SetRemoteUrl(), and KIGIT_COMMON::UpdateCurrentBranchInfo().
| BOOST_AUTO_TEST_CASE | ( | WorkingTreeLineStatsCountOnlyTheFilesGiven | ) |
Definition at line 1159 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGIT_COMMON::GetWorkingTreeLineStats(), git_repository, and index.
| BOOST_AUTO_TEST_CASE | ( | WorktreeRefusalPrioritizesUnsavedDocumentAndLibraryEditors | ) |
Definition at line 2815 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), GIT_WORKTREE_STATUS::checked, GIT_WORKTREE_STATUS::hasTrackedChanges, GIT_WORKTREE_STATUS::lfsMessage, message, GIT_WORKTREE_STATUS::outsideProject, and GIT_WORKTREE_STATUS::RefusalMessage().
| BOOST_AUTO_TEST_CASE | ( | WorktreeStatusAllowsCleanAndUntrackedFiles | ) |
Definition at line 2872 of file test_kigit_common.cpp.
References GIT_WORKTREE_STATUS::checked, GIT_WORKTREE_STATUS::hasTrackedChanges, KIGIT_COMMON::LockAction(), GIT_WORKTREE_STATUS::outsideProject, ReadGitWorktreeStatus(), and GIT_WORKTREE_STATUS::RefusalMessage().
| BOOST_AUTO_TEST_CASE | ( | WorktreeStatusDistinguishesGitLfsFromUncommittedChanges | ) |
Definition at line 2933 of file test_kigit_common.cpp.
References GIT_WORKTREE_STATUS::checked, GIT_WORKTREE_STATUS::hasTrackedChanges, KIGIT_COMMON::LockAction(), ReadGitWorktreeStatus(), and GIT_WORKTREE_STATUS::RefusalMessage().
| BOOST_AUTO_TEST_CASE | ( | WorktreeStatusExplainsTrackedChangesInsideAndOutsideTheProject | ) |
Definition at line 2893 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), GIT_WORKTREE_STATUS::checked, GIT_WORKTREE_STATUS::hasTrackedChanges, KIGIT_COMMON::LockAction(), message, GIT_WORKTREE_STATUS::outsideProject, ReadGitWorktreeStatus(), and GIT_WORKTREE_STATUS::RefusalMessage().
| BOOST_AUTO_TEST_CASE | ( | WorktreeStatusRefusesUnavailableAndFailedReads | ) |
Definition at line 2846 of file test_kigit_common.cpp.
References GIT_WORKTREE_STATUS::checked, git_repository, KIGIT_COMMON::LockAction(), ReadGitWorktreeStatus(), and GIT_WORKTREE_STATUS::RefusalMessage().
| BOOST_AUTO_TEST_CASE | ( | WriteBlobToFileExtractsCommittedContent | ) |
Definition at line 1240 of file test_kigit_common.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), git_repository, and KIGIT::PROJECT_GIT_UTILS::WriteBlobToFile().