[lang2/macro] add ui test for storage-impl conflict

parent a96f594d
......@@ -39,4 +39,5 @@ fn compile_tests() {
use ink_lang2 as ink;
#[ink::contract(version = "0.1.0")]
mod noop {
// This test ensures that ink! impl blocks are always
// implemented on the only storage struct definition.
struct StorageStruct {}
// This ink! impl block is okay.
impl StorageStruct {
fn new1(&mut self) {}
fn do_something1(&self) {}
// Missing the #[ink(storage)] attribute on purpose.
struct NonStorageStruct {}
// This ink! impl block is invalid in that it implement
// the messages and constructors for a non-existing ink!
// storage struct. We expect a failure here.
impl NonStorageStruct {
fn new2(&mut self) {}
fn do_something2(&self) {}
fn main() {}
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