Skip to content

Commit 7e2187e

Browse files
author
Patryk Małek
committed
Fixing typos in docs/
1 parent 6a065dd commit 7e2187e

6 files changed

Lines changed: 15 additions & 15 deletions

File tree

doc/boost_test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RC_BOOST_PROP(MyTestCase,
1818
}
1919
```
2020

21-
The parenthesis around the argument list are required because of how the preprocessor works and can not be omitted. This also means that if you don't want any arguments generated, you need to include an empty set of paranthesis:
21+
The parenthesis around the argument list are required because of how the preprocessor works and can not be omitted. This also means that if you don't want any arguments generated, you need to include an empty set of parenthesis:
2222

2323
```C++
2424
// If you don't have any arguments, you have to have an empty paren

doc/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RC_PARAMS="seed=12776003016957408636" ./my_test
2424
```
2525

2626
### Reproduce mode ###
27-
If the bug occured after large number of test cases, waiting for test cases that are known to be successful to run before the failing test case is run can be time consuming. For example, if the bug occured after 2000 tests and 200 shrinks, it is not interesting to run the 1999 (successful) test cases before that and it is not really necessary to try all the shrunk versions of the failure that were tried byt could not reproduce the bug.
27+
If the bug occurred after large number of test cases, waiting for test cases that are known to be successful to run before the failing test case is run can be time consuming. For example, if the bug occurred after 2000 tests and 200 shrinks, it is not interesting to run the 1999 (successful) test cases before that and it is not really necessary to try all the shrunk versions of the failure that were tried but could not reproduce the bug.
2828

2929
Fortunately, RapidCheck will print a string that encodes the necessary information to avoid this to the console if there are failures:
3030

@@ -60,7 +60,7 @@ When passed a string argument it will instead immediately log the message follow
6060
RC_LOG("It's all broken!");
6161
```
6262

63-
As stated above, none of this will have any effect on the sucess or failure of the test case. The information will only be printed when the test case fails otherwise. For example:
63+
As stated above, none of this will have any effect on the success or failure of the test case. The information will only be printed when the test case fails otherwise. For example:
6464

6565
```
6666
Falsifiable after 38 tests and 2 shrinks

doc/generators_ref.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const auto integer = *gen::cast<float>(gen::arbitrary<int>());
164164
## Text ##
165165

166166
#### `Gen<T> character()` ####
167-
Generates text characters. Common occuring characters have a higher probability of being generated.
167+
Generates text characters. Commonly occurring characters have a higher probability of being generated.
168168

169169
```C++
170170
// Example:
@@ -220,7 +220,7 @@ const auto x = *gen::positive<int>();
220220
## Containers ##
221221

222222
#### `Gen<Container> container(Gen<Ts>... gens)` ####
223-
Generates an STL container containing elements generated by the given generator(s). For most containers you should only specify one generator but for containers that have both keys and values (i.e. maps), you need to supply two separate generators. The `Container` type parameter must be sepcified explicitly.
223+
Generates an STL container containing elements generated by the given generator(s). For most containers you should only specify one generator but for containers that have both keys and values (i.e. maps), you need to supply two separate generators. The `Container` type parameter must be specified explicitly.
224224

225225
```C++
226226
// Example:
@@ -231,15 +231,15 @@ const auto smallInts = *gen::container<std::vector<int>>(gen::inRange(0, 100));
231231
Like `container(Gen<Ts>... gens)` but generates containers of a fixed size `count.`
232232

233233
#### `Gen<Container> unique(Gen<T> gen)` ####
234-
Generates a container of unique `T`. The `Container` type parameter must be sepcified explicitly.
234+
Generates a container of unique `T`. The `Container` type parameter must be specified explicitly.
235235

236236
```C++
237237
// Example:
238238
const auto uniqueInts = gen::unique<std::vector<int>>(gen::arbitrary<int>());
239239
```
240240

241241
#### `Gen<Container> uniqueBy(Gen<T> gen, F f)` ####
242-
Generates a container of `T` such that for every element `e` in the container, `f(e)` is unique. The `Container` type parameter must be sepcified explicitly.
242+
Generates a container of `T` such that for every element `e` in the container, `f(e)` is unique. The `Container` type parameter must be specified explicitly.
243243

244244
```C++
245245
// Example:

doc/gtest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RC_GTEST_PROP(MyTestCase,
1818
}
1919
```
2020

21-
The parenthesis around the argument list are required because of how the preprocessor works and can not be omitted. This also means that if you don't want any arguments generated, you need to include an empty set of paranthesis:
21+
The parenthesis around the argument list are required because of how the preprocessor works and can not be omitted. This also means that if you don't want any arguments generated, you need to include an empty set of parenthesis:
2222

2323
```C++
2424
// If you don't have any arguments, you have to have an empty paren

doc/state.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RapidCheck provides a framework that takes exactly this approach in the `rapidch
2222
- Implementations of the operations that can be performed on the System Under Test.
2323
- A model of the state of the System Under Test.
2424
25-
The operations are represented as subclasses of the `rc::state::Command<Model, Sut>` template and the model is usually just a simple struct containg enough information to model the expected behavior of the system.
25+
The operations are represented as subclasses of the `rc::state::Command<Model, Sut>` template and the model is usually just a simple struct containing enough information to model the expected behavior of the system.
2626
2727
The need for a model might require some explanation. First, a system does not always provide enough public information to be able to know the expected behavior. Systems typically have lots of hidden state that we cannot see but still want to test. More importantly, the model allows RapidCheck to generate valid sequences of commands without even running the actual System Under Test. This is especially important while shrinking a test case since we do not want to try a shrunk sequence only to find out that it was not valid. This could lead to very slow shrinking.
2828
@@ -112,7 +112,7 @@ The state that is passed to the command generator function in `rc::state::check`
112112

113113
## Tips ##
114114
### Generate initialization parameters ###
115-
Since the `rc::state::check` call is part of a regular RapidCheck property, you are free to also generate the initalization data for the model and state. If we for example modify the above example a bit:
115+
Since the `rc::state::check` call is part of a regular RapidCheck property, you are free to also generate the initialization data for the model and state. If we for example modify the above example a bit:
116116

117117
```C++
118118
rc::check([](const std::map<std::string, std::string> &data) {
@@ -126,4 +126,4 @@ rc::check([](const std::map<std::string, std::string> &data) {
126126
```
127127
128128
### Non-copyable models ###
129-
The state testing framework supports models that not have copy constructors and/or copy-assignment operators. For a lot of [calls to the API](state_ref.md) (i.e. `rc::state::check`), you have to use an overload that takes a callable that returns a model state instead of passing the model state directly. Since testing process is destroys the model state, fresh new model states have to be created. For a model which is not copyable, RapidCheck can obivously not store a copy to use as a template.
129+
The state testing framework supports models that not have copy constructors and/or copy-assignment operators. For a lot of [calls to the API](state_ref.md) (i.e. `rc::state::check`), you have to use an overload that takes a callable that returns a model state instead of passing the model state directly. Since testing process is destroys the model state, fresh new model states have to be created. For a model which is not copyable, RapidCheck can obviously not store a copy to use as a template.

doc/state_ref.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ There are two overloads, one that takes the initial state as an immediate value
1010
This function must be used inside a property, it cannot be used standalone.
1111

1212
## `Command<Model, Sut>` ##
13-
Represents an operation in the state testing framework. The `Model` type parameter is the type of the model that models `Sut` which is the actual System Under Test. These can also be accessed through the `Model` and `Sut` member type alises.
13+
Represents an operation in the state testing framework. The `Model` type parameter is the type of the model that models `Sut` which is the actual System Under Test. These can also be accessed through the `Model` and `Sut` member type aliases.
1414

1515
#### `virtual void checkPreconditions(const Model &s0) const` ####
16-
If your command is not valid for all states, you must implement this method to assert preconditions. Preconditions can be asserted using any of the discarding macros such as `RC_PRE` or `RC_DISCARD`. If the command is discarded, RapidCheck will simply try to generate a new one. This method is intended to be overriden but has a default implementation that does nothing which is what you want if your command has no preconditions.
16+
If your command is not valid for all states, you must implement this method to assert preconditions. Preconditions can be asserted using any of the discarding macros such as `RC_PRE` or `RC_DISCARD`. If the command is discarded, RapidCheck will simply try to generate a new one. This method is intended to be overridden but has a default implementation that does nothing which is what you want if your command has no preconditions.
1717

1818
While the model state is passed as `const`, this doesn't prevent modification of the model if it, for example, is a `shared_ptr` or similar. Regardless, modifying the model state in this method leads to undefined behavior.
1919

2020
#### `virtual void apply(Model &s0) const` ####
21-
Applies this command to the given state. The effect of this command on the model should be equivalent to this commands effect on the System Under Test. This method is intended to be overriden but has a default implementation that does nothing, something that can be useful for commands that do not modify state.
21+
Applies this command to the given state. The effect of this command on the model should be equivalent to this commands effect on the System Under Test. This method is intended to be overridden but has a default implementation that does nothing, something that can be useful for commands that do not modify state.
2222

2323
#### `virtual void run(const Model &s0, Sut &sut) const` ####
24-
Applies this command to the given System Under Test. The state before this command has been applied is also passed in. If you need the post state, you can get this using the `nextState` convenience method. This is the method in which to place your assertions (`RC_ASSERT` et al.). This method is intended to be overriden but has a default implementation that does nothing.
24+
Applies this command to the given System Under Test. The state before this command has been applied is also passed in. If you need the post state, you can get this using the `nextState` convenience method. This is the method in which to place your assertions (`RC_ASSERT` et al.). This method is intended to be overridden but has a default implementation that does nothing.
2525

2626
While the model state is passed as `const`, this doesn't prevent modification of the model if it, for example, is a `shared_ptr` or similar. Regardless, modifying the model state in this method leads to undefined behavior.
2727

0 commit comments

Comments
 (0)