google / google/googletest

[Bug]: Possible error in Documentation

Open
#4,631 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.5k
Forks
10.9k
Avg merge
6d 13h
Merged PRs (30d)
1

Description

### Describe the issue

At the [http://google.github.io/googletest/gmock_for_dummies.html#StickyExpectations](url) at one place the for loop looks like this:

**for (int i = n; i > 0; i--)**

and later like this:

**for (int i = 1; i <= n; i++)**

Is this an error or do I not understand something. If this is a wrong place to post this, please forward me somewhere else. Cheers.

### Steps to reproduce the problem

Go to: [http://google.github.io/googletest/gmock_for_dummies.html#StickyExpectations](url) and see if the for loops should look like this.

### What version of GoogleTest are you using?

no version, just docs

### What operating system and version are you using?

web browser

### What compiler and version are you using?

web browser

### What build system are you using?

web browser

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the Sticky Expectations section at the linked gMock for Dummies page and compare the two highlighted for loops with their surrounding examples. Determine which loop expresses the intended behavior, then correct or clarify the documentation and verify both examples remain consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.