Skip to content

Commit 531f7c5

Browse files
committed
add testing example output
1 parent 7540b27 commit 531f7c5

1 file changed

Lines changed: 197 additions & 0 deletions

File tree

docs/testing.md

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<!-- markdownlint-disable MD012 MD013 MD024 MD033 -->
2+
# Testing
3+
4+
...
5+
6+
## Examples
7+
8+
**Notation:** List of values are represented via square brackets. Example: `[first, second]` represents a list of two values "first" and "second".
9+
10+
---
11+
12+
### Example from Geometric mean: 1
13+
14+
* Weights: [1, 2, 1]
15+
* Input values: [0.0, 0.0, 0.0]
16+
* Returns: `0.0`
17+
18+
!!! example "Example from Geometric mean: 1"
19+
20+
| ... | ... |
21+
|------------------------:| :--------- |
22+
| Weights: | `[1, 2, 1]` |
23+
| Input values: | `[0.0, 0.0, 0.0]` |
24+
| Returns: | `0.0` |
25+
26+
!!! example "Example from Geometric mean: 1"
27+
28+
=== "Weights"
29+
30+
``` json
31+
[1, 2, 1]
32+
```
33+
34+
=== "Input Values"
35+
36+
``` json
37+
[0.0, 0.0, 0.0]
38+
```
39+
40+
=== "Returns"
41+
42+
``` json
43+
0.0
44+
```
45+
46+
47+
### Example from Handle missing values: Outputs the default score, if no input score is provided
48+
49+
* Parameters
50+
* *defaultValue*: `1.0`
51+
52+
* Input values: [(none)]
53+
* Returns: `1.0`
54+
55+
!!! example "Outputs the default score, if no input score is provided"
56+
57+
=== "Parameters"
58+
59+
``` json title="defaultValue"
60+
1.0
61+
```
62+
63+
=== "Input Values"
64+
65+
``` json
66+
[(none)]
67+
```
68+
69+
=== "Returns"
70+
71+
``` json
72+
1.0
73+
```
74+
75+
### Example from Date: Returns 0 if both dates are equal
76+
77+
* Input values:
78+
* Source: `[2003-03-01]`
79+
* Target: `[2003-03-01]`
80+
81+
* Returns: → `0.0`
82+
83+
!!! example "Returns 0 if both dates are equal"
84+
85+
=== "Input values"
86+
87+
``` json title="Source"
88+
[2003-03-01]
89+
```
90+
``` json title="Target"
91+
[2003-03-01]
92+
```
93+
94+
=== "Returns"
95+
96+
``` json
97+
0.0
98+
```
99+
100+
### Example from Camel Case: A sentence with several words is converted to a single word written in UpperCamelCase
101+
102+
* Parameters
103+
* *isDromedary*: `false`
104+
105+
* Input values:
106+
1. `[hello world]`
107+
108+
* Returns:
109+
110+
`[HelloWorld]`
111+
112+
113+
### Example from Coalesce: 5
114+
115+
* Input values:
116+
1. `[]`
117+
2. `[first A, first B]`
118+
3. `[second]`
119+
120+
* Returns:
121+
122+
`[first A, first B]`
123+
124+
!!! example "Example 5"
125+
126+
=== "Input values"
127+
128+
``` json title="1."
129+
[]
130+
```
131+
``` json title="2."
132+
[first A, first B]
133+
```
134+
``` json title="3."
135+
[second]
136+
```
137+
138+
=== "Returns"
139+
140+
``` json
141+
[first A, first B]
142+
```
143+
144+
145+
### Example of Concatenate: 4
146+
147+
* Parameters
148+
* *glue*: `-`
149+
150+
* Input values:
151+
1. `[First]`
152+
2. `[Last]`
153+
154+
* Returns:
155+
156+
`[First-Last]`
157+
158+
159+
### Example of Concatenate multiple values: 6
160+
161+
* Parameters
162+
* *glue*: `\n\t\\`
163+
164+
* Input values:
165+
1. `[a
166+
\b, c]`
167+
168+
* Returns:
169+
170+
→ `[a
171+
\b
172+
\c]`
173+
174+
175+
!!! example "Example 5"
176+
177+
=== "Parameters"
178+
179+
``` json title="glue"
180+
\n\t\\
181+
```
182+
183+
=== "Input values"
184+
185+
``` json title="1."
186+
[a
187+
\b, c]
188+
```
189+
190+
=== "Returns"
191+
192+
``` json
193+
[a
194+
\b
195+
\c]
196+
```
197+

0 commit comments

Comments
 (0)