Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
Function
TestApplyLanguage_ScanTemplate_AllOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:429
Function
TestApplyLanguage_ScanTemplate_NilOptionalTasks
(t *testing.T)
internal/config/template/template_test.go:462
Function
TestApplyLanguage_SkipsNonSystemMessages
(t *testing.T)
internal/config/template/template_test.go:477
Function
TestApplyManualConfigNormalizesAuthHeader
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2709
Function
TestApplyManualConfig_DoubleWritesProtocolAndUseAnthropic
TestApplyManualConfig_DoubleWritesProtocolAndUseAnthropic verifies the dual write: cfg.Llm.Protocol always gets the canonical name, and UseAnthropic i
cmd/opencodereview/provider_tui_test.go:2902
Function
TestApplyManualConfig_MissingModel
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:278
Function
TestApplyManualConfig_MissingURL
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:271
Function
TestApplyModelDeleteToEntry
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:39
Function
TestApplyOfficialProviderConfig_APIKeyCmdSatisfiesRequirement
A provider configured with only api_key_cmd must survive a trip through the TUI: picking a model returns an empty apiKey, which must not be mistaken f
cmd/opencodereview/provider_cmd_test.go:360
Function
TestApplyOfficialProviderConfig_EmptyKeyClearsSavedAPIKey
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:321
Function
TestApplyOfficialProviderConfig_IgnoresURLFromResult
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:557
Function
TestApplyOfficialProviderConfig_MissingFields
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:314
Function
TestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL
TestApplyOfficialProviderConfig_PreservesURLWhenWizardOmitsURL verifies that the URL configured through `ocr config set` survives a later provider wiz
cmd/opencodereview/provider_cmd_test.go:532
Function
TestApplyOfficialProviderConfig_UsesSessionModelPick
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:450
Function
TestApplyOfficialProviderConfig_Validation
TestApplyOfficialProviderConfig_Validation covers the pre-save validation branches (empty provider, empty model, missing API key) that reject the requ
cmd/opencodereview/provider_config_apply_test.go:15
Function
TestApplyProviderConfig_TestsWrittenConfigPath
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:229
Function
TestApplyProviderDeletions
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:126
Function
TestApplyProviderDeletions_ActiveCleared
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:160
Function
TestApplyProviderDeletions_SkipsNotFound
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:183
Function
TestApplyProviderField
TestApplyProviderField exercises every field branch of applyProviderField, including the JSON/parse error paths and the unknown-field default.
cmd/opencodereview/apply_provider_field_test.go:12
Function
TestApplyResumeLine_InvalidJSON
(t *testing.T)
internal/session/resume_test.go:386
Function
TestApplyResumeLine_OrphanLLMRequestIsNoOp
TestApplyResumeLine_OrphanLLMRequestIsNoOp is the same guarantee at the unit level: the line must change nothing at all, not merely avoid an error.
internal/session/resume_orphan_request_test.go:63
Function
TestApplyResumeLine_ReviewItemDone
(t *testing.T)
internal/session/resume_test.go:284
Function
TestApplyResumeLine_ReviewItemDone_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:324
Function
TestApplyResumeLine_ReviewItemDone_FallbackToNewPath
(t *testing.T)
internal/session/resume_test.go:307
Function
TestApplyResumeLine_ReviewItemFailed
(t *testing.T)
internal/session/resume_test.go:349
Function
TestApplyResumeLine_ReviewItemFailed_EmptyFingerprint
(t *testing.T)
internal/session/resume_test.go:363
Function
TestApplyResumeLine_ReviewItemReused
(t *testing.T)
internal/session/resume_test.go:336
Function
TestApplyResumeLine_SessionStart
--- applyResumeLine ---
internal/session/resume_test.go:260
Function
TestApplyResumeLine_UnknownType
(t *testing.T)
internal/session/resume_test.go:377
Function
TestApplyResumeReusesCompletedItemsAcrossModels
(t *testing.T)
internal/agent/agent_test.go:759
Function
TestApplyResumeWorkspaceReusesCompletedItems
(t *testing.T)
internal/agent/agent_test.go:821
Function
TestApplySessionStart_OverridesRepoDir
(t *testing.T)
internal/session/resume_test.go:406
Function
TestApplySessionStart_PreservesRepoDirWhenCwdEmpty
--- applySessionStart ---
internal/session/resume_test.go:398
Function
TestApplySessionStart_PreservesSessionIDWhenEmpty
(t *testing.T)
internal/session/resume_test.go:414
Function
TestApplySessionStart_SetsAllFields
(t *testing.T)
internal/session/resume_test.go:422
Function
TestApplySessionStart_SetsScanPathScope
(t *testing.T)
internal/session/resume_test.go:860
Function
TestArgCountErrors_AreActionable
TestArgCountErrors_AreActionable verifies that a wrong positional-argument count reports what the command expects instead of Cobra's raw "accepts 2 ar
cmd/opencodereview/arg_errors_test.go:19
Function
TestArgCountErrors_MatchHelpOutput
TestArgCountErrors_MatchHelpOutput guards the property that makes this approach maintainable: the usage line in the error is the command's own UseLine
cmd/opencodereview/arg_errors_test.go:174
Function
TestAuthDefaultsToChatGPT
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:17
Function
TestAuthLoginFlagsAreMutuallyExclusive
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:61
Function
TestAuthRejectsUnsupportedProviderWithoutAccountFlags
(t *testing.T)
cmd/opencodereview/auth_cmd_test.go:52
Function
TestAuthorizationAndCallbacks
(t *testing.T)
internal/chatgptauth/auth_test.go:225
Function
TestAwaitCompletedProcessObservesCancellationWithoutWatcher
(t *testing.T)
acp/internal/orchestrator/termination_test.go:76
Function
TestAwaitFirstObservedCauseSurvivesCleanup
(t *testing.T)
acp/internal/orchestrator/termination_test.go:152
Function
TestAwaitObservedTimeoutIsNotReplacedByCancel
(t *testing.T)
acp/internal/orchestrator/termination_test.go:213
Function
TestAwaitRechecksAfterConsumingCompletion
(t *testing.T)
acp/internal/orchestrator/termination_test.go:119
Function
TestBedrockClientReportsAWSFailureAsError
TestBedrockClientReportsAWSFailureAsError is the guard against the SDK's bedrock.WithLoadDefaultConfig, which panics when AWS config cannot be loaded.
internal/llm/bedrock_test.go:525
Function
TestBedrockContextReportsResolvedRegion
TestBedrockContextReportsResolvedRegion covers what `ocr llm test` prints: bedrock has no configured URL, so the resolved region is the only way to se
internal/llm/bedrock_test.go:506
Function
TestBedrockDoesNotRunAPIKeyCmd
TestBedrockDoesNotRunAPIKeyCmd pins that an ambient-auth provider never executes api_key_cmd. A signed request has no use for the output, and the comm
internal/llm/bedrock_test.go:102
Function
TestBedrockIsRejectedOnTheURLAndTokenPaths
TestBedrockIsRejectedOnTheURLAndTokenPaths covers the two strategies that describe a single HTTP endpoint. Both validated anthropic-bedrock as a proto
internal/llm/bedrock_test.go:205
Function
TestBedrockModelOverrideIsNotGatedByThePresetList
TestBedrockModelOverrideIsNotGatedByThePresetList covers identifiers scoped to an account and region that cannot appear in a list compiled upstream.
internal/llm/bedrock_test.go:300
Function
TestBedrockProtocolIsRecognized
TestBedrockProtocolIsRecognized guards the three-part contract documented in protocol.go: a new protocol needs a constant, a NormalizeProtocol case, a
internal/llm/bedrock_test.go:33
Function
TestBedrockProviderIsRegistered
TestBedrockProviderIsRegistered pins the preset's shape. An api_key or a BaseURL here would be wrong: credentials come from the AWS chain and the host
internal/llm/bedrock_test.go:47
Function
TestBindRawWriter_NilHolderIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:41
Function
TestBindRawWriter_OpenFailureIsNoop
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:81
Function
TestBindRawWriter_OpensSessionRawFile
(t *testing.T)
cmd/opencodereview/shared_raw_test.go:56
Function
TestBlurCPStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:459
Function
TestBlurManualStep_AllSteps
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:573
Function
TestBoundaryCancelDuringBackoffIsCancelled
--- outcome is decided at Finalize, not read off the last attempt --- Cancelling while the SDK sleeps between attempts produces no new attempt, so the
internal/llm/retry_boundary_test.go:381
Function
TestBoundaryCorrectsDecodeFailure
--- blind spot 2: any other decode failure after HTTP 200 --- A 200 whose body is not JSON at all fails in the SDK's post-retry-loop decode and arrive
internal/llm/retry_boundary_test.go:194
Function
TestBoundaryCorrectsMidStreamFailure
--- blind spot 3: a stream that fails after it opened --- The stream opens with HTTP 200 and then ends without any choice reaching a finish_reason. OC
internal/llm/retry_boundary_test.go:230
Function
TestBoundaryCorrectsResponsesStatus
--- blind spot 4: a Responses object that is not a success --- The Responses API answers HTTP 200 with the failure inside the object, so the SDK retur
internal/llm/retry_boundary_test.go:300
Function
TestBoundaryCorrectsTruncatedResponse
--- blind spot 1: truncated body after HTTP 200 --- A body shorter than its Content-Length fails during the read that happens after the SDK's retry lo
internal/llm/retry_boundary_test.go:70
Function
TestBoundaryDeadlineExceededIsFailed
A parent deadline is not a user abort: only context.Canceled reaches parentCancelled, so an expired parent context is failed. Conflating the two would
internal/llm/retry_boundary_test.go:512
Function
TestBoundaryHelpersAreInertWithoutCollectorOrMeta
A nil collector and a context without identity are both no-ops, so no call site in the three clients needs to guard either.
internal/llm/retry_boundary_test.go:718
Function
TestBoundaryKeepsHTTPClassOnCorruptErrorBody
--- the counter-example: corrections must not overwrite an HTTP class --- A 5xx whose error body is corrupt makes the SDK return the raw JSON error in
internal/llm/retry_boundary_test.go:342
Function
TestBoundaryKeepsHTTPClassOnStreamThatNeverOpened
A stream that never opened needs no correction: stream.Err() carries the non-2xx *apierror.Error, the observer already recorded the attempt as an erro
internal/llm/retry_boundary_test.go:270
Function
TestBoundaryKeepsTruncationCorrectionWhenRecallIsCancelled
The truncation correction is applied before the EOF branch consults ctx, so a request that ends cancelled still shows why the 200 was not usable. Noth
internal/llm/retry_boundary_test.go:143
Function
TestBoundaryRetryAfterOutlivingAttemptTimeoutIsFailed
The same backoff wait as the test above, ended by the per-attempt timeout instead of a user abort — the pair that pins the cancelled/failed split. Bo
internal/llm/retry_boundary_test.go:447
Function
TestBoundarySkipsRequestWithoutAttempt
A request that fails before any HTTP attempt (here: unparsable tool call arguments) has no entry to finalize, so it is absent from the report rather t
internal/llm/retry_boundary_test.go:548
Function
TestBoundedStderrKeepsPrefixAndSuffix
boundedStderr must keep the head and tail of a stream while draining all of it: Output's retention stays bounded like exec.Cmd.Output even when a comm
internal/gitcmd/runner_pipe_test.go:184
Function
TestBrowserCandidates
(t *testing.T)
internal/viewer/browser_test.go:12
Function
TestBrowserHelperProcess
TestBrowserHelperProcess is not a real test. It is the child process the tests below exec, standing in for xdg-open/open/rundll32 so exit-status handl
internal/viewer/browser_exec_test.go:31
Function
TestBrowserOpenerUsesExecutableAndWaits
(t *testing.T)
internal/chatgptauth/io_test.go:129
Function
TestBudgetExceededFlag
TestBudgetExceededFlag pins BudgetExceeded() to the actual state of the token budget gate. Before this it was hard-coded false, so a budget stop never
internal/scan/budget_exceeded_test.go:26
Function
TestBudgetGate_PlanThreshold
(t *testing.T)
internal/scan/budget_test.go:127
Function
TestBudgetGate_StopsBeforeExceeding
TestBudgetGate_StopsBeforeExceeding verifies the per-file gate stops dispatch once the running token total + next-file look-ahead would blow the budge
internal/scan/budget_test.go:79
Function
TestBudgetGate_Unlimited
TestBudgetGate_Unlimited verifies MaxTokensBudget=0 runs every file.
internal/scan/budget_test.go:184
Function
TestBuild
(t *testing.T)
acp/internal/testutil/stub_test.go:69
Function
TestBuildAllowedHosts
(t *testing.T)
internal/viewer/hostguard_test.go:51
Function
TestBuildAllowedHosts_BracketedIPv6
(t *testing.T)
internal/viewer/server_extra_test.go:762
Function
TestBuildAnthropicParams_AllRoles
TestBuildAnthropicParams_AllRoles exercises every message-role branch (system, tool-result flushing, assistant with/without tool calls, user string an
internal/llm/client_params_test.go:114
Function
TestBuildAnthropicParams_CacheControl
(t *testing.T)
internal/llm/client_test.go:110
Function
TestBuildAnthropicParams_CacheControl_NoSystem
(t *testing.T)
internal/llm/client_test.go:204
Function
TestBuildAnthropicParams_CacheControl_NoTools
(t *testing.T)
internal/llm/client_test.go:177
Function
TestBuildAnthropicParams_DefaultMaxTokens
TestBuildAnthropicParams_DefaultMaxTokens verifies the fallback to 8192 when the request omits MaxTokens, and that optional fields stay unset.
internal/llm/client_params_test.go:180
Function
TestBuildAnthropicParams_DynamicCacheBreakpoint
(t *testing.T)
internal/llm/client_test.go:232
Function
TestBuildAnthropicParams_InvalidToolArgs
TestBuildAnthropicParams_InvalidToolArgs covers the error branch where an assistant tool call carries malformed JSON arguments.
internal/llm/client_params_test.go:164
Function
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice
TestBuildAnthropicParams_NativeReuseDoesNotAliasOriginalSlice guards the slice-aliasing fix: buildAnthropicParams must not let the dynamic cache_contr
internal/llm/native_turn_test.go:325
Function
TestBuildAnthropicParams_NullToolCallArguments
(t *testing.T)
internal/llm/client_test.go:317
Function
TestBuildAnthropicParams_ToolChoice
TestBuildAnthropicParams_ToolChoice locks the explicit tool_choice mapping. Anthropic has no bare "required" mode — the client must translate ChatRequ
internal/llm/client_params_test.go:208
Function
TestBuildBadge
(t *testing.T)
cmd/opencodereview/output_test.go:14
Function
TestBuildChangeFilesExceptGroup
(t *testing.T)
internal/agent/agent_test.go:925
Function
TestBuildDedupCommentsJSON_IncludesIDsAndKeyFields
(t *testing.T)
internal/scan/dedup_test.go:93
Function
TestBuildDiffLines
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:165
Function
TestBuildFileMetadataTable
(t *testing.T)
internal/agent/grouping_test.go:555
Function
TestBuildGrepArgs_CaseInsensitive
(t *testing.T)
internal/tool/code_search_test.go:81
Function
TestBuildGrepArgs_CaseSensitive
(t *testing.T)
internal/tool/code_search_test.go:74
Function
TestBuildGrepArgs_CommitMode
(t *testing.T)
internal/tool/code_search_test.go:36
← previous
next →
3,301–3,400 of 7,169, ranked by callers