-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathlib.rs
More file actions
33 lines (26 loc) · 794 Bytes
/
lib.rs
File metadata and controls
33 lines (26 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// A test vector for testing the interactions of the soroban-sdk macros with third-party macros,
// validating that they are composable and compatible.
#![no_std]
use proc_macros::{parse_item_fn, parse_item_impl};
use soroban_sdk::{contract, contractimpl};
#[contract]
pub struct Contract;
#[contractimpl]
#[parse_item_impl]
impl Contract {
// Test that attribute macros that expect to be used on fns are composable with contractimpl.
#[parse_item_fn]
pub fn empty() {}
}
#[cfg(test)]
mod test {
use soroban_sdk::Env;
use crate::{Contract, ContractClient};
#[test]
fn test_empty() {
let e = Env::default();
let contract_id = e.register(Contract, ());
let client = ContractClient::new(&e, &contract_id);
client.empty();
}
}