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
+49-47Lines changed: 49 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,37 @@ Getting Started
2
2
===============
3
3
This `demo` directory contains a demonstration project with
4
4
5
-
* Stub types and functions in the `src` subdirectory and
6
-
* Tests for the stubs in the `test` subdirectory.
5
+
* Stub types and functions in the `src` subdirectory,
6
+
* Tests for the stubs in the `test` subdirectory,
7
+
* A Fortran Package Manager (`fpm`) build/test system in `fpm.toml`.
7
8
8
9
Please try [running the demonstration tests] and [generating test scaffolding].
9
10
10
11
Writing tests
11
12
-------------
12
-
Testing centers around Julienne's `test_t` abstract derived type.
13
-
Users define non-abstract `test_t` child types to capture groups of tests.
14
-
Doing so requires defining the inherited deferred bindings: `subject` and `results`.
15
-
The `subject` function defines a `character` string result describing what is being tested.
16
-
The `results` function defines a `test_result_t` array result by invoking the inherited `run` procedure on an instance of the child type.
17
-
The `run` function accepts a `test_descripton_t` array argument and constructs the `test_result_t` array.
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.
18
16
19
-
Users construct the `test_description_t` array by invoking a `test_description_t` constructor for each array element and passing each constructor invocation two arguments:
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
20
21
-
* A `character` test description typically beginning with a gerund: a word ending in `-ing` and
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
22
24
* The name of a function conforming to Julienne's `diagnosis_function_i` abstract interface.
23
25
24
-
Users define functions conforming to the `diagnosis_function_i` interface: functions with no arguments and with a `test_diagnosis_t` result.
25
-
Constructing a the function result involves either
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
29
+
* Invoking the `test_diagnosis_t` constructor if no convenient idiom exists.
26
30
27
-
* Invoking the `test_diagnosis_t` constructor or
28
-
* Writing an expression in a Julienne idiom using Julienne's defined operations.
31
+
The `test_diagnosis_t` constructor has two arguments:
29
32
30
-
The `test_diagnosis_t` constructor takes two arguments.
31
-
The first is usually a `logical` expression defining the test condition.
32
-
The second is a diagnostics string of type `string_t` or `character`.
33
+
*`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].
35
+
33
36
Please see the `test` subdirectory for code examples.
34
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.
35
38
Users invoke constructor functions via generic names matching the type of the constructed object result.
0 commit comments