Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xicosahedron committed Dec 24, 2023
1 parent 02fcac3 commit c77b555
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions crates/dojo-lang/src/plugin_test_data/print
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ struct Position {
y: felt252
}

<<<<<<< HEAD
=======
#[cfg(test)]
impl PositionPrintImpl of core::debug::PrintTrait<Position> {
fn print(self: Position) {
Expand All @@ -65,7 +63,6 @@ impl PositionPrintImpl of core::debug::PrintTrait<Position> {
core::debug::PrintTrait::print(self.y);
}
}
>>>>>>> main

#[derive(Print)]
struct Roles {
Expand Down Expand Up @@ -143,46 +140,3 @@ enum Enemy {
Bot: felt252,
OtherPlayer: ContractAddress,
}

impl PositionCopy of core::traits::Copy::<Position>;
impl PositionDrop of core::traits::Drop::<Position>;
impl PositionSerde of core::serde::Serde::<Position> {
fn serialize(self: @Position, ref output: core::array::Array<felt252>) {
core::serde::Serde::serialize(self.id, ref output);
core::serde::Serde::serialize(self.x, ref output);
core::serde::Serde::serialize(self.y, ref output)
}
fn deserialize(ref serialized: core::array::Span<felt252>) -> core::option::Option<Position> {
core::option::Option::Some(Position {
id: core::serde::Serde::deserialize(ref serialized)?,
x: core::serde::Serde::deserialize(ref serialized)?,
y: core::serde::Serde::deserialize(ref serialized)?,
})
}
}
impl RolesSerde of core::serde::Serde::<Roles> {
fn serialize(self: @Roles, ref output: core::array::Array<felt252>) {
core::serde::Serde::serialize(self.role_ids, ref output)
}
fn deserialize(ref serialized: core::array::Span<felt252>) -> core::option::Option<Roles> {
core::option::Option::Some(Roles {
role_ids: core::serde::Serde::deserialize(ref serialized)?,
})
}
}
impl PlayerCopy of core::traits::Copy::<Player>;
impl PlayerDrop of core::traits::Drop::<Player>;
impl PlayerSerde of core::serde::Serde::<Player> {
fn serialize(self: @Player, ref output: core::array::Array<felt252>) {
core::serde::Serde::serialize(self.game, ref output);
core::serde::Serde::serialize(self.player, ref output);
core::serde::Serde::serialize(self.name, ref output)
}
fn deserialize(ref serialized: core::array::Span<felt252>) -> core::option::Option<Player> {
core::option::Option::Some(Player {
game: core::serde::Serde::deserialize(ref serialized)?,
player: core::serde::Serde::deserialize(ref serialized)?,
name: core::serde::Serde::deserialize(ref serialized)?,
})
}
}

0 comments on commit c77b555

Please sign in to comment.