fix all tests
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2024-02-12 15:12:54 +01:00
parent 50f8a6d53b
commit ce23e798f1
5 changed files with 8 additions and 8 deletions

View File

@ -3,6 +3,6 @@ use satrs_mib::resultcode;
use satrs_shared::res_code::ResultU16;
#[resultcode]
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
fn main() {}

View File

@ -3,6 +3,6 @@ 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::const_new(0, 1);
const _TEST_RESULT: ResultU16 = ResultU16::new(0, 1);
fn main() {}

View File

@ -3,7 +3,7 @@ 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::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.
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;

View File

@ -106,12 +106,12 @@ mod tests {
}
#[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]
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")]
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] = &[
INVALID_PUS_SERVICE_EXT,

View File

@ -69,8 +69,8 @@ mod tests {
#[test]
pub fn test_basic() {
let result_code = ResultU16::new(1, 1);
assert_eq!(result_code.unique_id(), 0);
assert_eq!(result_code.group_id(), 0);
assert_eq!(result_code.unique_id(), 1);
assert_eq!(result_code.group_id(), 1);
assert_eq!(result_code, RESULT_CODE_CONST);
assert_eq!(result_code.raw(), (1_u16 << 8) | 1);
assert_eq!(result_code.pfc(), 16);