From 9bdfa646fb526b40430c898d3390b16e34d3d096 Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Sun, 15 Dec 2024 14:12:44 +0700 Subject: [PATCH] Docs: move rnd API to proper location --- .../api/{03-rnd.md => 03-generators/01-rnd.md} | 14 +++++++------- web/docs/api/03-generators/_category_.yml | 5 +++++ web/docs/topic-guides/07-test-cases.md | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) rename web/docs/api/{03-rnd.md => 03-generators/01-rnd.md} (86%) create mode 100644 web/docs/api/03-generators/_category_.yml diff --git a/web/docs/api/03-rnd.md b/web/docs/api/03-generators/01-rnd.md similarity index 86% rename from web/docs/api/03-rnd.md rename to web/docs/api/03-generators/01-rnd.md index b485d18..0f0e959 100644 --- a/web/docs/api/03-rnd.md +++ b/web/docs/api/03-generators/01-rnd.md @@ -10,7 +10,7 @@ toc_max_heading_level: 4 --- -### `nextInt(minNum, maxNum)` +### `.nextInt(minNum, maxNum)` ```cpp int nextInt(int minNum, int maxNum); @@ -19,7 +19,7 @@ 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); @@ -27,7 +27,7 @@ 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); @@ -35,7 +35,7 @@ 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); @@ -43,7 +43,7 @@ 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); @@ -51,7 +51,7 @@ 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); @@ -59,7 +59,7 @@ 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); diff --git a/web/docs/api/03-generators/_category_.yml b/web/docs/api/03-generators/_category_.yml new file mode 100644 index 0000000..fd631d1 --- /dev/null +++ b/web/docs/api/03-generators/_category_.yml @@ -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. diff --git a/web/docs/topic-guides/07-test-cases.md b/web/docs/topic-guides/07-test-cases.md index 4f00d79..fb5f0a5 100644 --- a/web/docs/topic-guides/07-test-cases.md +++ b/web/docs/topic-guides/07-test-cases.md @@ -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