Skip to content

Commit 5d857ac

Browse files
committed
update tests
1 parent a7692d2 commit 5d857ac

File tree

6 files changed

+68
-45
lines changed

6 files changed

+68
-45
lines changed

crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ This is an automatically generated file, you'll find links to the contents below
88
| --- | --- |
99
| `Types` | [Describes all available binding types](./lad/types.md) |
1010
| `Global Functions` | [Documents all the global functions present in the bindings](./lad/functions.md) |
11-
| `Globals` | [Documents all global variables present in the bindings](./lad/globals.md) |
11+
| `Globals` | [Documents all global variables present in the bindings](./lad/globals.md) |
12+
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Functions
22

3-
## Functions
3+
## Non\-Associated Functions
4+
5+
Global functions that are not associated with any type and callable from anywhere in the script\.
6+
7+
For function details and documentation, click on the function link\.
48

59
| Function | Summary |
610
| --- | --- |
7-
| `hello_world(arg1)` | [No Documentation 🚧](./functions/hello_world.md) |
11+
| [hello\_world](./functions/hello_world.md) | No Documentation 🚧 |
12+
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
# hello\_world
1+
# `hello_world`
22

33
> No Documentation 🚧
44
55
#### Arguments
66

7-
- **arg1** : `usize` \- No Documentation 🚧
7+
| Name | Type | Documentation |
8+
| --- | --- | --- |
9+
| **arg1** | [usize](parent/lad/functions/../types/usize.md) | No Documentation 🚧 |
810

911
#### Returns
1012

11-
- **arg0** : `usize` \- No Documentation 🚧
13+
| Name | Type | Documentation |
14+
| --- | --- | --- |
15+
| **arg0** | [usize](parent/lad/functions/../types/usize.md) | No Documentation 🚧 |
16+

crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/globals.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ Instances containing actual accessible values\.
1010

1111
| Instance | Type |
1212
| --- | --- |
13-
| `my_non_static_instance` | Vec\<[UnitType](./types/unittype.md)\> |
14-
| `map` | HashMap\<[String](./types/string.md), [String](./types/string.md) \| [String](./types/string.md)\> |
13+
| `my_non_static_instance` | Vec\<[UnitType](/parent/lad/types/unittype.md)\> |
14+
| `map` | HashMap\<[String](/parent/lad/types/string.md), [String](/parent/lad/types/string.md) \| [String](/parent/lad/types/string.md)\> |
1515

1616
### Static Instances
1717

1818
Static type references, existing for the purpose of typed static function calls\.
1919

2020
| Instance | Type |
2121
| --- | --- |
22-
| `my_static_instance` | StructType\<[usize](./types/usize.md)\> |
22+
| `my_static_instance` | StructType\<[usize](/parent/lad/types/usize.md)\> |
23+
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Types
22

3-
## Types
3+
## Available Types
4+
5+
All registered reflect\-able types which can be constructed and directly manipulated by scripts\.
46

57
| Type | Summary |
68
| --- | --- |
7-
| `EnumType` | [No Documentation 🚧](./types/enumtype.md) |
8-
| `StructType<usize>` | [ I am a struct](./types/structtypeusize.md) |
9-
| `TupleStructType` | [ I am a tuple test type](./types/tuplestructtype.md) |
10-
| `UnitType` | [ I am a unit test type](./types/unittype.md) |
9+
| [`StructType<usize>`](/parent/lad/types/structtypeusize.md) | I am a struct |
10+
| [`EnumType`](/parent/lad/types/enumtype.md) | No Documentation 🚧 |
11+
| [`TupleStructType`](/parent/lad/types/tuplestructtype.md) | I am a tuple test type |
12+
| [`UnitType`](/parent/lad/types/unittype.md) | I am a unit test type |
13+

crates/ladfile/test_assets/test.lad.json

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,37 @@
3737
}
3838
},
3939
"types": {
40+
"ladfile_builder::test::StructType<usize>": {
41+
"identifier": "StructType",
42+
"crate": "ladfile_builder",
43+
"path": "ladfile_builder::test::StructType<usize>",
44+
"generics": [
45+
{
46+
"type_id": "usize",
47+
"name": "T"
48+
}
49+
],
50+
"documentation": " I am a struct",
51+
"associated_functions": [
52+
"ladfile_builder::test::StructType<usize>::hello_world"
53+
],
54+
"layout": {
55+
"kind": "Struct",
56+
"name": "StructType",
57+
"fields": [
58+
{
59+
"name": "field",
60+
"type": "usize"
61+
},
62+
{
63+
"name": "field2",
64+
"type": "usize"
65+
}
66+
]
67+
},
68+
"generated": false,
69+
"insignificance": 1000
70+
},
4071
"ladfile_builder::test::EnumType": {
4172
"identifier": "EnumType",
4273
"crate": "ladfile_builder",
@@ -68,36 +99,9 @@
6899
}
69100
]
70101
}
71-
]
72-
},
73-
"ladfile_builder::test::StructType<usize>": {
74-
"identifier": "StructType",
75-
"crate": "ladfile_builder",
76-
"path": "ladfile_builder::test::StructType<usize>",
77-
"generics": [
78-
{
79-
"type_id": "usize",
80-
"name": "T"
81-
}
82102
],
83-
"documentation": " I am a struct",
84-
"associated_functions": [
85-
"ladfile_builder::test::StructType<usize>::hello_world"
86-
],
87-
"layout": {
88-
"kind": "Struct",
89-
"name": "StructType",
90-
"fields": [
91-
{
92-
"name": "field",
93-
"type": "usize"
94-
},
95-
{
96-
"name": "field2",
97-
"type": "usize"
98-
}
99-
]
100-
}
103+
"generated": false,
104+
"insignificance": 1000
101105
},
102106
"ladfile_builder::test::TupleStructType": {
103107
"identifier": "TupleStructType",
@@ -115,7 +119,9 @@
115119
"type": "String"
116120
}
117121
]
118-
}
122+
},
123+
"generated": false,
124+
"insignificance": 1000
119125
},
120126
"ladfile_builder::test::UnitType": {
121127
"identifier": "UnitType",
@@ -125,7 +131,9 @@
125131
"layout": {
126132
"kind": "Struct",
127133
"name": "UnitType"
128-
}
134+
},
135+
"generated": false,
136+
"insignificance": 1000
129137
}
130138
},
131139
"functions": {

0 commit comments

Comments
 (0)