Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,390 in github.com/alibaba/open-code-review
⨍
Functions
7,390
◇
Types & classes
806
Function
TestNaturalRequestShape
(t *testing.T)
acp/internal/intent/natural_test.go:521
Function
TestNaturalResponseLanguageContract
(t *testing.T)
acp/internal/intent/natural_test.go:15
Function
TestNaturalReviewMissingSlots
(t *testing.T)
acp/internal/intent/natural_test.go:366
Function
TestNaturalTimeout
(t *testing.T)
acp/internal/intent/natural_test.go:467
Function
TestNaturalTimeoutDiagnostics
(t *testing.T)
acp/internal/intent/natural_test.go:484
Function
TestNew
(t *testing.T)
internal/session/history_test.go:18
Function
TestNewAgent_SetsSessionMode
(t *testing.T)
internal/scan/agent_test.go:371
Function
TestNewAnthropicClient_URLNormalization
(t *testing.T)
internal/llm/client_test.go:67
Function
TestNewClient
(t *testing.T)
acp/internal/intent/llm/client_test.go:67
Function
TestNewClient_Integration
(t *testing.T)
internal/mcp/client_test.go:277
Function
TestNewClient_Stdio
(t *testing.T)
internal/mcp/stdio_test.go:166
Function
TestNewClient_Stdio_BadCommand
(t *testing.T)
internal/mcp/stdio_test.go:238
Function
TestNewClient_Stdio_PaginatedTools
(t *testing.T)
internal/mcp/stdio_test.go:209
Function
TestNewCommandReplacesPending
(t *testing.T)
acp/internal/intent/state_test.go:55
Function
TestNewCommentWorkerPool
(t *testing.T)
internal/agent/coverage_test.go:112
Function
TestNewCommentWorkerPool_Custom
(t *testing.T)
internal/reviewtask/pool_test.go:24
Function
TestNewCommentWorkerPool_Default
(t *testing.T)
internal/reviewtask/pool_test.go:17
Function
TestNewDiffMap_DefensiveCopy
(t *testing.T)
internal/tool/file_read_diff_test.go:12
Function
TestNewJSONToolCalls_FailureByTool
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:465
Function
TestNewKeyCmd_CmdLine
TestNewKeyCmd_CmdLine locks in the two decisions in newKeyCmd that no runtime test can observe: the command reaches cmd.exe through SysProcAttr.CmdLin
internal/llm/keycmd_windows_test.go:21
Function
TestNewLLMClient_DefaultTimeout
(t *testing.T)
internal/llm/resolver_test.go:2070
Function
TestNewLLMClient_Dispatch
(t *testing.T)
internal/llm/client_test.go:2011
Function
TestNewLLMClient_ExpandsSessionKeyInExtraBody
(t *testing.T)
internal/llm/client_test.go:1831
Function
TestNewLLMClient_NoRawHolderMountsNothing
TestNewLLMClient_NoRawHolderMountsNothing asserts the default (switch off) path records nothing and behaves exactly as before.
internal/llm/raw_test.go:828
Function
TestNewLLMClient_OpenAIAliasDispatchesToOpenAIClient
TestNewLLMClient_OpenAIAliasDispatchesToOpenAIClient verifies that the "openai" alias, once normalized by the resolver, lands on the OpenAI Chat Compl
internal/llm/client_test.go:2046
Function
TestNewLLMClient_RawEndToEnd
TestNewLLMClient_RawEndToEnd drives a real OpenAI client built through NewLLMClient against a fake endpoint and asserts one raw record lands in the bo
internal/llm/raw_test.go:689
Function
TestNewLLMClient_RawRecordsEveryRetryAttempt
TestNewLLMClient_RawRecordsEveryRetryAttempt asserts the middleware sits inside the SDK retry loop: a retried request yields one record per real HTTP
internal/llm/raw_test.go:761
Function
TestNewLLMClient_TimeoutForwarded
(t *testing.T)
internal/llm/resolver_test.go:2046
Function
TestNewModelTUI
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:729
Function
TestNewModelTUI_CustomModel
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:765
Function
TestNewModelTUI_WithCurrentModel
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:750
Function
TestNewMux_RouteDispatch
TestNewMux_RouteDispatch exercises the real ServeMux, not the handlers directly: "compare" is a literal segment competing with the {sessionID} wildcar
internal/viewer/compare_test.go:432
Function
TestNewOpenAIClient_URLNormalization
(t *testing.T)
internal/llm/client_test.go:24
Function
TestNewOpenAIResponsesClient_URLNormalization
(t *testing.T)
internal/llm/responses_client_test.go:19
Function
TestNewProviderTUI_ManualProtocolFromConfig
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2824
Function
TestNewProvider_NormalizesPaths
(t *testing.T)
internal/scan/provider_test.go:65
Function
TestNewQuietHandle_JSONHumanKeepsStdoutForDocument
TestNewQuietHandle_JSONHumanKeepsStdoutForDocument guards the invariant the stderr redirect relies on: progress written through stdout.Writer() must n
cmd/opencodereview/shared_test.go:113
Function
TestNewQuietHandle_Routing
TestNewQuietHandle_Routing pins where [ocr] progress lines go for each (format, audience) pair. The machine-readable + human rows are the fix for #928
cmd/opencodereview/shared_test.go:80
Function
TestNewQuietHandle_Sarif
--- newQuietHandle: sarif silences stdout ---
cmd/opencodereview/sarif_test.go:515
Function
TestNewRawFileWriter_CreatesFileUnderRawDir
(t *testing.T)
internal/session/raw_writer_test.go:25
Function
TestNewRemoteClient_ConnectFailure
TestNewRemoteClient_ConnectFailure exercises the success path of header expansion (non-empty value) plus HTTP client / transport construction, then th
internal/mcp/client_test.go:117
Function
TestNewRemoteClient_HeaderExpandsToEmpty
(t *testing.T)
internal/mcp/client_test.go:93
Function
TestNewRemoteClient_HeaderExpandsUnsetVar
(t *testing.T)
internal/mcp/client_test.go:136
Function
TestNewRequestMeta_IsSingleSourceOfProviderAndModel
TestNewRequestMeta_IsSingleSourceOfProviderAndModel guards the reason the helper exists: five request types read provider and model through it, so a c
internal/agent/retry_identity_test.go:173
Function
TestNewResolver_BraceExpansionInProjectRule
(t *testing.T)
internal/config/rules/system_rules_test.go:1418
Function
TestNewResolver_CustomOverridesProject
(t *testing.T)
internal/config/rules/system_rules_test.go:676
Function
TestNewResolver_CustomRuleOverridesDefault
(t *testing.T)
internal/config/rules/system_rules_test.go:464
Function
TestNewResolver_DefaultOnly
(t *testing.T)
internal/config/rules/system_rules_test.go:353
Function
TestNewResolver_EmptyRuleMergeSystemRuleReturnsSystemOnly
(t *testing.T)
internal/config/rules/system_rules_test.go:521
Function
TestNewResolver_EmptyRuleSkippedAndFallsBack
(t *testing.T)
internal/config/rules/system_rules_test.go:488
Function
TestNewResolver_FileFilterFallsToProject
(t *testing.T)
internal/config/rules/system_rules_test.go:899
Function
TestNewResolver_FileFilterMerged
(t *testing.T)
internal/config/rules/system_rules_test.go:817
Function
TestNewResolver_FileFilterNilWhenEmpty
(t *testing.T)
internal/config/rules/system_rules_test.go:846
Function
TestNewResolver_FileFilterPriorityOverride
(t *testing.T)
internal/config/rules/system_rules_test.go:856
Function
TestNewResolver_MergeSystemRuleKeepsRulePriority
(t *testing.T)
internal/config/rules/system_rules_test.go:626
Function
TestNewResolver_ProjectFileMalformed
(t *testing.T)
internal/config/rules/system_rules_test.go:720
Function
TestNewResolver_ProjectFileMissing
(t *testing.T)
internal/config/rules/system_rules_test.go:366
Function
TestNewResolver_ProjectRuleFallsBackToSystem
(t *testing.T)
internal/config/rules/system_rules_test.go:442
Function
TestNewResolver_ProjectRuleFirstMatchWinsWithinFile
(t *testing.T)
internal/config/rules/system_rules_test.go:412
Function
TestNewResolver_ProjectRuleHighestPriority
(t *testing.T)
internal/config/rules/system_rules_test.go:378
Function
TestNewResolver_ProjectRuleMergesSystemRule
(t *testing.T)
internal/config/rules/system_rules_test.go:584
Function
TestNewResolver_ProjectRuleReplacesSystemRuleByDefault
(t *testing.T)
internal/config/rules/system_rules_test.go:554
Function
TestNewResumeLineage
(t *testing.T)
internal/session/resume_identity_test.go:293
Function
TestNewSessionDoesNotNotifyBeforeResponse
(t *testing.T)
acp/internal/adapter/resources_test.go:212
Function
TestNewSessionKey
(t *testing.T)
internal/llm/sessionkey_test.go:15
Function
TestNewStdoutMetricExporter
(t *testing.T)
internal/telemetry/exporter_test.go:59
Function
TestNewStdoutTraceExporter
(t *testing.T)
internal/telemetry/exporter_test.go:49
Function
TestNewTextMessage
(t *testing.T)
internal/llm/message_test.go:12
Function
TestNewToolCallMessage
(t *testing.T)
internal/llm/message_test.go:28
Function
TestNewToolCallMessage_NilCalls
(t *testing.T)
internal/llm/message_test.go:61
Function
TestNewToolResultMessage
(t *testing.T)
internal/llm/message_test.go:68
Function
TestNilCollectorIsInert
Every method tolerates a nil collector. This is the design premise that the reporting path can never fail a review: a call site that has no collector
internal/llm/retry_report_test.go:339
Function
TestNilCollectorMountsNoObserver
A nil collector must leave the request path exactly as it was: no middleware, no observation, and no change in behavior.
internal/llm/retry_observer_test.go:506
Function
TestNonAmbientProviderStillRequiresAPIKey
TestNonAmbientProviderStillRequiresAPIKey makes sure open model lists do not relax credential requirements.
internal/llm/bedrock_test.go:362
Function
TestNormalizeAuthHeader
TestNormalizeAuthHeader covers every branch of NormalizeAuthHeader, including the empty pass-through, the two canonical forms, the "bearer" alias, and
internal/llm/resolver_norm_test.go:13
Function
TestNormalizeLine
(t *testing.T)
internal/diff/resolver_test.go:289
Function
TestNormalizeModelList
(t *testing.T)
cmd/opencodereview/config_cmd_test.go:1514
Function
TestNormalizeProtocol
(t *testing.T)
internal/llm/protocol_test.go:11
Function
TestNumberedCodeLines
TestNumberedCodeLines pins the numbering contract for the Existing Code gutter. The interesting half of the table is the cases where the reported rang
internal/viewer/server_startserver_test.go:275
Function
TestOAuthNoRedirects
(t *testing.T)
internal/chatgptauth/io_test.go:122
Function
TestOTLPSignalURL
(t *testing.T)
internal/telemetry/exporter_test.go:212
Function
TestObservationFailuresPublishOnlyReference
(test *testing.T)
internal/behaviortask/runner_test.go:251
Function
TestObserverClassifiesTerminalStatuses
Statuses the SDK does not retry produce exactly one attempt. 402 is the case that pins the coarse provider bucket: it is told apart by status_code rat
internal/llm/retry_observer_test.go:214
Function
TestObserverConcurrentRequests
--- concurrency --- With --concurrency > 1 several files share one collector. Distinct metas must stay in distinct entries, and the frozen report must
internal/llm/retry_observer_test.go:524
Function
TestObserverDropsRequestsWithoutIdentity
Requests without identity — scan and llm test — are dropped whole. The assertion needs a second, identified request in the same collector: with only u
internal/llm/retry_observer_test.go:392
Function
TestObserverIgnoresOverriddenRetryCountHeader
X-Stainless-Retry-Count is an SDK implementation detail. Overriding it through ExtraHeaders makes the SDK stop maintaining it (it only refreshes the h
internal/llm/retry_observer_test.go:345
Function
TestObserverMountedOnOpenAIClients
--- the other two mount points --- The observer is mounted on all three clients, so the OpenAI Chat Completions and Responses constructors get the sam
internal/llm/retry_observer_test.go:435
Function
TestObserverRecordsExhaustedRetries
Retries exhaust at WithMaxRetries(5), so a permanently overloaded provider produces six attempts under one logical request, numbered without a gap.
internal/llm/retry_observer_test.go:169
Function
TestObserverRecordsRateLimitedThenSuccess
--- attempt-level observation --- The canonical retry: one 429 with a server hint, then success. Everything the observer is responsible for is visible
internal/llm/retry_observer_test.go:86
Function
TestObserverRecordsRetryDirectiveOnSuccess
Both SDKs consult x-should-retry before the status code and do not exclude 2xx, so a server can make them retry a successful response. The extra attem
internal/llm/retry_observer_test.go:262
Function
TestObserverRecordsTransportFailure
A transport failure gives the observer no response at all: no status, no diagnostics, and a class derived from the Go error alone.
internal/llm/retry_observer_test.go:311
Function
TestOf
(t *testing.T)
internal/tool/response_message_test.go:34
Function
TestOfName
(t *testing.T)
internal/tool/definitions_test.go:11
Function
TestOf_Empty
(t *testing.T)
internal/tool/response_message_test.go:47
Function
TestOfficialAPIKeyEnvSetHint
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2068
Function
TestOfficialAPIKeyRequiredError
TestOfficialAPIKeyRequiredError covers every combination of the two hints the message can offer. Both are independently gated, so a provider carrying
cmd/opencodereview/provider_tui_cpinput_test.go:30
Function
TestOfficialProviderActiveModel_DifferentProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:62
Function
TestOfficialProviderActiveModel_EmptyModel
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:92
Function
TestOfficialProviderActiveModel_MatchingProvider
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:77
Function
TestOfficialProviderActiveModel_NilCfg
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:54
← previous
next →
4,701–4,800 of 7,390, ranked by callers