first macro impl

This commit is contained in:
2022-11-27 18:21:50 +01:00
parent 7062c12ef0
commit 9b37c63280
7 changed files with 135 additions and 5 deletions

View File

@ -1,7 +1,7 @@
use satrs_core::resultcode::ResultU16;
use satrs_macros::*;
#[result]
#[result(info = "This is a test result where the first parameter is foo")]
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
fn main() {}

View File

@ -0,0 +1,12 @@
use satrs_core::resultcode::ResultU16;
use satrs_macros::*;
pub enum GroupIds {
Group0 = 0,
Group1 = 1,
}
#[result(info = "This is a test result where the first parameter is foo")]
const TEST_RESULT: ResultU16 = ResultU16::const_new(GroupIds::Group0 as u8, 1);
fn main() {}

View File

@ -2,4 +2,6 @@
fn tests() {
let t = trybuild::TestCases::new();
t.pass("tests/basic.rs");
//t.pass("tests/verify_gen_struct.rs");
//t.pass("tests/group_in_enum.rs");
}

View File

@ -0,0 +1,7 @@
use satrs_core::resultcode::ResultU16;
use satrs_macros::*;
#[result(info = "This is a test result where the first parameter is foo")]
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
fn main() {}