Commit 8c10bd44 authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] add UI test for missing #[ink(storage)] struct

parent 1f081ff7
Pipeline #56451 failed with stages
in 2 minutes and 49 seconds
......@@ -37,4 +37,5 @@ fn compile_tests() {
t.compile_fail("tests/ui/fail/11-unsafe-constructor.rs");
t.compile_fail("tests/ui/fail/12-const-constructor.rs");
t.compile_fail("tests/ui/fail/13-abi-constructor.rs");
t.compile_fail("tests/ui/fail/14-missing-storage-struct.rs");
}
#![feature(proc_macro_hygiene)]
use ink_lang2 as ink;
#[ink::contract(version = "0.1.0")]
mod noop {
// We are missing the #[ink(storage)] attribute here
struct Noop {}
impl Noop {
#[ink(constructor)]
fn new(&mut self) {}
#[ink(message)]
fn noop(&self) {}
}
}
fn main() {}
error: no #[ink(storage)] struct found but expected exactly 1
--> $DIR/14-missing-storage-struct.rs:5:1
|
5 | #[ink::contract(version = "0.1.0")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment