From 9d3a25fd950ada62fb99a6abc53300a5a1debb8c Mon Sep 17 00:00:00 2001 From: Maple Nebel Date: Tue, 28 Apr 2026 23:33:12 +0200 Subject: [PATCH] remove one test --- rnex-core/src/rmc/structures/any.rs | 57 ----------------------- rnex-core/src/rmc/structures/matchmake.rs | 2 +- rnex-core/src/rmc/structures/variant.rs | 2 +- 3 files changed, 2 insertions(+), 59 deletions(-) diff --git a/rnex-core/src/rmc/structures/any.rs b/rnex-core/src/rmc/structures/any.rs index 98feb86..0f531d8 100644 --- a/rnex-core/src/rmc/structures/any.rs +++ b/rnex-core/src/rmc/structures/any.rs @@ -43,60 +43,3 @@ impl Any { }); } } - -#[cfg(test)] -mod test { - use crate::rmc::structures::{ - RmcSerialize, - any::Any, - matchmake::{Gathering, MatchmakeSession}, - }; - - #[test] - fn test() { - let any = Any { - name: "MatchmakeSession".into(), - data: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 98, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 20, 0, 68, 111, 111, 114, 115, 32, 70, 114, 105, 101, 110, 100, 32, - 73, 110, 118, 105, 116, 101, 0, 0, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - ] - .into(), - }; - - println!("{}", hex::encode(&any.data)); - - let _: MatchmakeSession = any.try_get().unwrap().unwrap(); - let sess = MatchmakeSession { - gathering: Gathering { - self_gid: 0, - owner_pid: 0, - host_pid: 0, - minimum_participants: 2, - maximum_participants: 2, - participant_policy: 98, - policy_argument: 0, - flags: 32, - state: 0, - description: "Doors Friend Invite".into(), - }, - gamemode: 0, - attributes: [2, 3, 0, 0, 0, 0].into(), - open_participation: false, - matchmake_system_type: 2, - application_buffer: [1, 2, 3].into(), - participation_count: 0, - #[cfg(feature = "v3-5-0")] - progress_score: 0, - session_key: [].into(), - }; - - let any = Any::new(&sess).unwrap(); - - let sess2: MatchmakeSession = any.try_get().unwrap().unwrap(); - - assert_eq!(sess, sess2) - } -} diff --git a/rnex-core/src/rmc/structures/matchmake.rs b/rnex-core/src/rmc/structures/matchmake.rs index b4d3c5c..7753f03 100644 --- a/rnex-core/src/rmc/structures/matchmake.rs +++ b/rnex-core/src/rmc/structures/matchmake.rs @@ -22,7 +22,7 @@ pub struct Gathering { } // rmc structure -#[derive(RmcSerialize, Debug, Clone, Default)] +#[derive(RmcSerialize, Debug, Clone, Default, PartialEq)] #[rmc_struct(0)] pub struct MatchmakeParam { pub params: Vec<(String, Variant)>, diff --git a/rnex-core/src/rmc/structures/variant.rs b/rnex-core/src/rmc/structures/variant.rs index 9f705d0..c5c41b0 100644 --- a/rnex-core/src/rmc/structures/variant.rs +++ b/rnex-core/src/rmc/structures/variant.rs @@ -3,7 +3,7 @@ use rnex_core::rmc::structures; use rnex_core::rmc::structures::{Result, RmcSerialize}; use std::io::{Read, Write}; -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone, Default, PartialEq)] pub enum Variant { #[default] None,