Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct typos in comments, test, and CHANGELOG #150

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
- [#93][]: Ignore interfaces that contain type constraints.
- [#101][]: Fix race condition on Controller.Satisfied.
- [#121][]: Fix paths for windows.
- [#127][]: Propogate -mock_names to Recorder and ReturnCall types.
- [#127][]: Propagate -mock_names to Recorder and ReturnCall types.
- [#132][]: Sanitize "any" package names.

[#63]: https://github.com/uber-go/mock/pull/63
Expand Down
2 changes: 1 addition & 1 deletion gomock/call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func TestInOrder(t *testing.T) {
t.Fatalf("expected 0 preReq in c1, found %d", len(c1.preReqs))
}
})
t.Run("panic when the argument isn't a *Call or has one embeded", func(t *testing.T) {
t.Run("panic when the argument isn't a *Call or has one embedded", func(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Error("expected InOrder to panic")
Expand Down
4 changes: 2 additions & 2 deletions gomock/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ func (ctrl *Controller) Call(receiver any, method string, args ...any) []any {
}

// Two things happen here:
// * the matching call no longer needs to check prerequite calls,
// * and the prerequite calls are no longer expected, so remove them.
// * the matching call no longer needs to check prerequisite calls,
// * and the prerequisite calls are no longer expected, so remove them.
preReqCalls := expected.dropPrereqs()
for _, preReqCall := range preReqCalls {
ctrl.expectedCalls.Remove(preReqCall)
Expand Down
2 changes: 1 addition & 1 deletion gomock/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ func TestOrderedCallsWithPreReqMaxUnbounded(t *testing.T) {
ctrl.Call(subjectOne, "FooMethod", "1")
ctrl.Call(subjectOne, "FooMethod", "1")

// But calling something that has it as a prerequite should remove it from
// But calling something that has it as a prerequisite should remove it from
// the expected call set. This allows tests to ensure that FooMethod("1") is
// *not* called after FooMethod("2").
ctrl.Call(subjectTwo, "FooMethod", "2")
Expand Down
Loading