remove one test
All checks were successful
Build and Test / splatoon (push) Successful in 4m18s
Build and Test / wii-u-chat (push) Successful in 4m19s
Build and Test / friends (push) Successful in 4m38s
Build and Test / super-mario-maker (push) Successful in 9m20s

This commit is contained in:
Maple Nebel 2026-04-28 23:33:12 +02:00
commit 9d3a25fd95
3 changed files with 2 additions and 59 deletions

View file

@ -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)
}
}

View file

@ -22,7 +22,7 @@ pub struct Gathering {
} }
// rmc structure // rmc structure
#[derive(RmcSerialize, Debug, Clone, Default)] #[derive(RmcSerialize, Debug, Clone, Default, PartialEq)]
#[rmc_struct(0)] #[rmc_struct(0)]
pub struct MatchmakeParam { pub struct MatchmakeParam {
pub params: Vec<(String, Variant)>, pub params: Vec<(String, Variant)>,

View file

@ -3,7 +3,7 @@ use rnex_core::rmc::structures;
use rnex_core::rmc::structures::{Result, RmcSerialize}; use rnex_core::rmc::structures::{Result, RmcSerialize};
use std::io::{Read, Write}; use std::io::{Read, Write};
#[derive(Debug, Clone, Default)] #[derive(Debug, Clone, Default, PartialEq)]
pub enum Variant { pub enum Variant {
#[default] #[default]
None, None,