Robin Mueller
de4e6183b3
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good
- Add new shared subcrate satrs-shared to split off some shared components not expected to change very often. - Renmame `satrs-core` to `satrs`. It is expected that sat-rs will remain the primary crate, so the core information is superfluous, and core also implies stability, which will not be the case for some time.
19 lines
681 B
Rust
19 lines
681 B
Rust
use satrs_mib::res_code::ResultU16Info;
|
|
use satrs_mib::resultcode;
|
|
use satrs_shared::res_code::ResultU16;
|
|
|
|
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
|
const TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
|
// Create named reference of auto-generated struct, which can be used by IDEs etc.
|
|
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
|
|
|
|
fn main() {
|
|
assert_eq!(TEST_RESULT_EXT.name, "TEST_RESULT");
|
|
assert_eq!(TEST_RESULT_EXT.result, &TEST_RESULT);
|
|
assert_eq!(
|
|
TEST_RESULT_EXT.info,
|
|
"This is a test result where the first parameter is foo"
|
|
);
|
|
assert_eq!(TEST_RESULT_EXT_REF.name, "TEST_RESULT");
|
|
}
|