Add network link to ue-server implementation #13
@ -203,19 +203,19 @@ fn received_push_byte() {
|
|||||||
reader.push_byte(0).unwrap();
|
reader.push_byte(0).unwrap();
|
||||||
reader.push_byte(0).unwrap();
|
reader.push_byte(0).unwrap();
|
||||||
reader.push_byte(0).unwrap();
|
reader.push_byte(0).unwrap();
|
||||||
reader.push_byte(243).unwrap();
|
reader.push_byte(0xf3).unwrap();
|
||||||
assert_eq!(reader.ue_received_bytes(), 243);
|
assert_eq!(reader.ue_received_bytes(), 0xf3);
|
||||||
reader.push_byte(HEAD_UE_RECEIVED).unwrap();
|
reader.push_byte(HEAD_UE_RECEIVED).unwrap();
|
||||||
reader.push_byte(65).unwrap();
|
reader.push_byte(0x41).unwrap();
|
||||||
reader.push_byte(25).unwrap();
|
reader.push_byte(0x19).unwrap();
|
||||||
reader.push_byte(178).unwrap();
|
reader.push_byte(0xb2).unwrap();
|
||||||
reader.push_byte(4).unwrap();
|
reader.push_byte(0x04).unwrap();
|
||||||
assert_eq!(reader.ue_received_bytes(), 1092203255);
|
assert_eq!(reader.ue_received_bytes(), 0x41_19_b2_f7); // 0xf7 = 0x04 + 0xf3
|
||||||
reader.push_byte(HEAD_UE_RECEIVED).unwrap();
|
reader.push_byte(HEAD_UE_RECEIVED).unwrap();
|
||||||
reader.push_byte(231).unwrap();
|
reader.push_byte(231).unwrap();
|
||||||
dkanus marked this conversation as resolved
Outdated
|
|||||||
reader.push_byte(34).unwrap();
|
reader.push_byte(34).unwrap();
|
||||||
reader.push_byte(154).unwrap();
|
reader.push_byte(154).unwrap();
|
||||||
assert_eq!(reader.ue_received_bytes(), 1092203255);
|
assert_eq!(reader.ue_received_bytes(), 0x41_19_b2_f7);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user
Replace with:
reader.push_byte(0xf3).unwrap();
...
reader.push_byte(0x41).unwrap();
reader.push_byte(0x19).unwrap();
reader.push_byte(0xb2).unwrap();
reader.push_byte(0x04).unwrap();
assert_eq!(reader.ue_received_bytes(), 0x41_19_b2_f7); // 0xf7 = 0x04 + 0xf3
Because otherwise this is "magic numbers wtf".
Woa, that's neat. Agreed.