fix all tests
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit
This commit is contained in:
parent
50f8a6d53b
commit
ce23e798f1
@ -3,6 +3,6 @@ use satrs_mib::resultcode;
|
|||||||
use satrs_shared::res_code::ResultU16;
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -3,6 +3,6 @@ use satrs_mib::resultcode;
|
|||||||
use satrs_shared::res_code::ResultU16;
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
||||||
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -3,7 +3,7 @@ use satrs_mib::resultcode;
|
|||||||
use satrs_shared::res_code::ResultU16;
|
use satrs_shared::res_code::ResultU16;
|
||||||
|
|
||||||
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
#[resultcode(info = "This is a test result where the first parameter is foo")]
|
||||||
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
|
const TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
|
||||||
// Create named reference of auto-generated struct, which can be used by IDEs etc.
|
// Create named reference of auto-generated struct, which can be used by IDEs etc.
|
||||||
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
|
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
|
||||||
|
|
||||||
|
@ -106,12 +106,12 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 0);
|
pub const INVALID_PUS_SERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 0);
|
||||||
#[resultcode]
|
#[resultcode]
|
||||||
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 1);
|
pub const INVALID_PUS_SUBSERVICE: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 1);
|
||||||
|
|
||||||
#[resultcode(info = "Not enough data inside the TC application data field")]
|
#[resultcode(info = "Not enough data inside the TC application data field")]
|
||||||
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::const_new(GroupId::Tmtc as u8, 2);
|
pub const NOT_ENOUGH_APP_DATA: ResultU16 = ResultU16::new(GroupId::Tmtc as u8, 2);
|
||||||
|
|
||||||
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
pub const TMTC_RESULTS: &[ResultU16Info] = &[
|
||||||
INVALID_PUS_SERVICE_EXT,
|
INVALID_PUS_SERVICE_EXT,
|
||||||
|
@ -69,8 +69,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
pub fn test_basic() {
|
pub fn test_basic() {
|
||||||
let result_code = ResultU16::new(1, 1);
|
let result_code = ResultU16::new(1, 1);
|
||||||
assert_eq!(result_code.unique_id(), 0);
|
assert_eq!(result_code.unique_id(), 1);
|
||||||
assert_eq!(result_code.group_id(), 0);
|
assert_eq!(result_code.group_id(), 1);
|
||||||
assert_eq!(result_code, RESULT_CODE_CONST);
|
assert_eq!(result_code, RESULT_CODE_CONST);
|
||||||
assert_eq!(result_code.raw(), (1_u16 << 8) | 1);
|
assert_eq!(result_code.raw(), (1_u16 << 8) | 1);
|
||||||
assert_eq!(result_code.pfc(), 16);
|
assert_eq!(result_code.pfc(), 16);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user