You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/README.md
+57-39Lines changed: 57 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,31 +10,43 @@ Please try [running the demonstration tests] and [generating test scaffolding].
10
10
11
11
Writing tests
12
12
-------------
13
-
Testing with Julienne centers around the `test_t` abstract derived type.
14
-
Users extend `test_t`, definoing non-abstract child types capturing groups of tests.
15
-
Doing so requires defining the inherited deferred bindings: the `subject` and `results` functions.
16
-
17
-
*`subject` has no argumetns and defines a `character` string result describing what is being tested,
18
-
*`results` has no arguments defines a `test_result_t` array result by invoking the inherited `run` function on a child instance, and
19
-
*`run` uses a `test_descripton_t` array argument to construct a `test_result_t` array result.
20
-
21
-
Users construct each `test_description_t` array element by invoking a `test_description_t` constructor function, which has two arguments:
22
-
23
-
* A `character` string describing whata the test does, typically beginning with a gerund: a word ending in `-ing`, and
24
-
* The name of a function conforming to Julienne's `diagnosis_function_i` abstract interface.
25
-
26
-
The `diagnosis_function_i` function implementations have no arguments and construct a `test_diagnosis_t` result by
27
-
28
-
* Writing an expression in a Julienne idiom with defined operations (.e.g, `.all.(['a','b','c'] .isBefore. 'efg')`) or
13
+
Testing with Julienne centers around the `test_t` abstract derived type. Users
14
+
extend `test_t`, defining non-abstract child types capturing groups of tests.
15
+
Doing so requires defining the inherited deferred bindings: the `subject` and
16
+
`results` functions.
17
+
18
+
*`subject` has no arguments and defines a `character` string result describing
19
+
what is being tested,
20
+
*`results` has no arguments defines a `test_result_t` array result by invoking
21
+
the inherited `run` function on a child instance, and
22
+
*`run` uses its `test_description_t` array argument to construct a
23
+
`test_result_t` array result.
24
+
25
+
Users construct each `test_description_t` array element by invoking a
26
+
`test_description_t` constructor function, which has two arguments:
27
+
28
+
* A `character` string describing what the test does, typically beginning with a
29
+
gerund: a word ending in `-ing`, and
30
+
* The name of a function conforming to Julienne's `diagnosis_function_i`
31
+
abstract interface.
32
+
33
+
The `diagnosis_function_i` function implementations have no arguments and
34
+
construct a `test_diagnosis_t` result by
35
+
36
+
* Writing an expression in a Julienne idiom with defined operations (.e.g,
37
+
`.all.(['a','b','c'] .isBefore. 'efg')`) or
29
38
* Invoking the `test_diagnosis_t` constructor if no convenient idiom exists.
30
39
31
40
The `test_diagnosis_t` constructor has two arguments:
32
41
33
42
*`test_passed`: `logical` expression defining the test condition (.e.g, `
34
-
*`diagnostics_string`: a `string_t` or `character`. Please see [Forming Diagnostics Strings] and [String-Handling Functions].
43
+
*`diagnostics_string`: a `string_t` or `character`. Please see
44
+
[Forming Diagnostics Strings] and [String-Handling Functions].
35
45
36
-
Please see the `test` subdirectory for code examples.
37
-
Also, please see the following Unified Modeling Language ([UML]) class diagram for a summary of user-facing derived types, including type relationships and object constructors.
46
+
47
+
Please see the `test` subdirectory for code examples. Also, please see the
48
+
following Unified Modeling Language ([UML]) class diagram for a summary of
49
+
user-facing derived types, including type relationships and object constructors.
38
50
Users invoke constructor functions via generic names matching the type of the constructed object result.
39
51
40
52
```mermaid
@@ -73,21 +85,23 @@ class string_t{
73
85
74
86
Running the demonstration tests
75
87
-------------------------------
76
-
With the Fortran Package Manager (`fpm`) installed, please set the `demo` subdirectory as your present working directory in a shell.
77
-
Then run the demonstration test suite using the command below for your compiler.
88
+
With the Fortran Package Manager (`fpm`) installed, please set the `demo`
89
+
subdirectory as your present working directory in a shell. Then run the
90
+
demonstration test suite using the command below for your compiler.
78
91
79
92
|Vendor | Version(s) Tested | Example shell command |
0 commit comments