Skip to content

Commit

Permalink
Docs: move rnd API to proper location
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Dec 15, 2024
1 parent 0d82b10 commit 9bdfa64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
14 changes: 7 additions & 7 deletions web/docs/api/03-rnd.md → web/docs/api/03-generators/01-rnd.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ toc_max_heading_level: 4

---

### `nextInt(minNum, maxNum)`
### `.nextInt(minNum, maxNum)`

```cpp
int nextInt(int minNum, int maxNum);
Expand All @@ -19,47 +19,47 @@ int nextInt(int minNum, int maxNum);
Returns a uniformly distributed random integer (int) between **minNum** and **maxNum**, inclusive.
### `nextInt(maxNumEx)`
### `.nextInt(maxNumEx)`
```cpp
int nextInt(int maxNumEx);
```

Returns a uniformly distributed random integer (int) between 0 and **maxNumEx** - 1, inclusive.

### `nextLongLong(minNum, maxNum)`
### `.nextLongLong(minNum, maxNum)`

```cpp
long long nextLongLong(long long minNum, long long maxNum);
```
Returns a uniformly distributed random integer (long long) between **minNum** and **maxNum**, inclusive.
### `nextLongLong(maxNumEx)`
### `.nextLongLong(maxNumEx)`
```cpp
long long nextLongLong(long long maxNumEx);
```

Returns a uniformly distributed random integer (long long) between 0 and **maxNumEx** - 1, inclusive.

### `nextDouble(minNum, maxNum)`
### `.nextDouble(minNum, maxNum)`

```cpp
double nextDouble(double minNum, double maxNum);
```
Returns a uniformly distributed random real number (double) between **minNum** and **maxNum**, inclusive.
### `nextDouble(maxNum)`
### `.nextDouble(maxNum)`
```cpp
double nextDouble(double maxNum);
```

Returns a uniformly distributed random real number (double) between 0 and **maxNum**, inclusive.

### `shuffle(first, last)`
### `.shuffle(first, last)`

```cpp
void shuffle(std::RandomAccessIterator first, std::RandomAccessIterator last);
Expand Down
5 changes: 5 additions & 0 deletions web/docs/api/03-generators/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
label: Generators
link:
type: generated-index
slug: /api/generators
description: TCFrame provides several generators, which can be used to generate the I/O variables in test spec.
2 changes: 1 addition & 1 deletion web/docs/topic-guides/07-test-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void randomArray() {
}
```

For more details, consult the [API reference for random number generator](../api/rnd).
For more details, consult the [API reference for random number generator](../api/generators/rnd).

## Test case lifecycle

Expand Down

0 comments on commit 9bdfa64

Please sign in to comment.