Skip to content

Commit bb6c445

Browse files
committed
Add lang_error to metadata tests
1 parent 8929234 commit bb6c445

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

crates/metadata/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ default = [
3434
]
3535
std = [
3636
"ink_prelude/std",
37+
"ink_primitives/std",
3738
"serde/std",
3839
"scale-info/std",
3940
]

crates/metadata/src/tests.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ fn spec_contract_json() {
112112
.done(),
113113
])
114114
.events(Vec::new())
115+
.lang_error(TypeSpec::with_name_segs::<ink_primitives::LangError, _>(
116+
::core::iter::Iterator::map(
117+
::core::iter::IntoIterator::into_iter(["ink", "LangError"]),
118+
::core::convert::AsRef::as_ref,
119+
),
120+
))
115121
.done();
116122

117123
let mut registry = Registry::new();
@@ -168,6 +174,13 @@ fn spec_contract_json() {
168174
],
169175
"docs": [],
170176
"events": [],
177+
"lang_error": {
178+
"displayName": [
179+
"ink",
180+
"LangError"
181+
],
182+
"type": 3
183+
},
171184
"messages": [
172185
{
173186
"args": [

0 commit comments

Comments
 (0)