mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
different incomplete unit test attempts [ci skip]
This commit is contained in:
parent
f8dd030643
commit
b702a27b28
@ -1271,48 +1271,75 @@ impl HandInfo {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use specs::LazyUpdate;
|
|
||||||
|
|
||||||
use crate::{
|
|
||||||
comp::item::MaterialStatManifest, resources::DeltaTime, states::behavior::JoinStruct,
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use crate::{
|
||||||
|
comp::{item::MaterialStatManifest, Ori, Pos, Vel},
|
||||||
|
resources::DeltaTime,
|
||||||
|
states::behavior::JoinStruct,
|
||||||
|
uid::Uid,
|
||||||
|
};
|
||||||
|
use specs::{
|
||||||
|
shrev::EventChannel, storage::FlaggedAccessMut, world::entity::Generation, LazyUpdate,
|
||||||
|
};
|
||||||
|
use std::marker::PhantomData;
|
||||||
|
use common_systems::character_behavior;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn orientation_shortcut() {
|
fn orientation_shortcut() {
|
||||||
let index: specs::world::entity::Index = 42;
|
let mut ecs = specs::World::new();
|
||||||
let generation = specs::world::entity::Generation(43);
|
ecs.register::<crate::comp::CharacterState>();
|
||||||
let js = JoinStruct {
|
let entity = ecs
|
||||||
entity: Entitiy::new(index, generation),
|
.create_entity()
|
||||||
uid: todo!(),
|
.with(CharacterState::Idle(idle::Data { is_sneaking: false }))
|
||||||
char_state: todo!(),
|
.build();
|
||||||
pos: todo!(),
|
|
||||||
vel: todo!(),
|
let mut system = character_behavior::Sys::new();
|
||||||
ori: todo!(),
|
system.run_now(ecs);
|
||||||
mass: todo!(),
|
ecs.maintain();
|
||||||
density: todo!(),
|
|
||||||
energy: todo!(),
|
// let mut char_state = CharacterState::Idle(idle::Data { is_sneaking: false });
|
||||||
inventory: todo!(),
|
// let mut pos = Pos(Vec3::new(11, 12, 13));
|
||||||
controller: todo!(),
|
// let mut vel = Vel(Vec3::new(1.0, 0.0, 0.0));
|
||||||
health: todo!(),
|
// let mut ori = Ori::default();
|
||||||
body: todo!(),
|
// let index: specs::world::entity::Index = 42;
|
||||||
physics: todo!(),
|
// let generation = Generation(43);
|
||||||
melee_attack: todo!(),
|
// let js = JoinStruct {
|
||||||
beam: todo!(),
|
// entity: entity,
|
||||||
stat: todo!(),
|
// //specs::world::entity::Entitiy::new(index, generation),
|
||||||
skill_set: todo!(),
|
// uid: &Uid(44),
|
||||||
active_abilities: todo!(),
|
// char_state: FlaggedAccessMut {
|
||||||
combo: todo!(),
|
// channel: &mut EventChannel::with_capacity(2),
|
||||||
alignment: todo!(),
|
// emit: false,
|
||||||
terrain: todo!(),
|
// id: 44,
|
||||||
mount_data: todo!(),
|
// access: &mut char_state,
|
||||||
};
|
// phantom: PhantomData,
|
||||||
let lu = LazyUpdate::new();
|
// },
|
||||||
let msm = MaterialStatManifest::new();
|
// pos: &mut pos,
|
||||||
let dt = DeltaTime(0.033);
|
// vel: &mut vel,
|
||||||
let jd = JoinData::new(&js, &lu, &dt, &msm);
|
// ori: &mut ori,
|
||||||
let mut update: StateUpdate = jd.into();
|
// mass: todo!(),
|
||||||
handle_orientation(&jd, &mut update, 1.0, None);
|
// density: todo!(),
|
||||||
|
// energy: todo!(),
|
||||||
|
// inventory: todo!(),
|
||||||
|
// controller: todo!(),
|
||||||
|
// health: todo!(),
|
||||||
|
// body: todo!(),
|
||||||
|
// physics: todo!(),
|
||||||
|
// melee_attack: todo!(),
|
||||||
|
// beam: todo!(),
|
||||||
|
// stat: todo!(),
|
||||||
|
// skill_set: todo!(),
|
||||||
|
// active_abilities: todo!(),
|
||||||
|
// combo: todo!(),
|
||||||
|
// alignment: todo!(),
|
||||||
|
// terrain: todo!(),
|
||||||
|
// mount_data: todo!(),
|
||||||
|
// };
|
||||||
|
// let lu = LazyUpdate::new();
|
||||||
|
// let msm = MaterialStatManifest::new();
|
||||||
|
// let dt = DeltaTime(0.033);
|
||||||
|
// let jd = JoinData::new(&js, &lu, &dt, &msm);
|
||||||
|
// let mut update: StateUpdate = jd.into();
|
||||||
|
// handle_orientation(&jd, &mut update, 1.0, None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user