1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-12-23 01:54:22 +00:00

In tests, reference to the crate with the crate keyword

This commit is contained in:
Steffo 2022-10-17 09:32:27 +00:00 committed by GitHub
parent 7ecc0242a3
commit 48fb2b275e
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -484,9 +484,9 @@ pub type DeckEncodingResult<T> = Result<T, DeckEncodingError>;
#[macro_export] #[macro_export]
macro_rules! deck { macro_rules! deck {
[$($cd:literal: $qty:literal),* $(,)?] => { [$($cd:literal: $qty:literal),* $(,)?] => {
patched_porobot::data::deckcode::deck::Deck { crate::data::deckcode::deck::Deck {
contents: std::collections::HashMap::from([ contents: std::collections::HashMap::from([
$((patched_porobot::data::setbundle::code::CardCode { full: $cd.to_string() }, $qty),)* $((crate::data::setbundle::code::CardCode { full: $cd.to_string() }, $qty),)*
]) ])
} }
} }
@ -539,7 +539,7 @@ mod tests {
( $id:ident, $deck:expr ) => { ( $id:ident, $deck:expr ) => {
#[test] #[test]
fn $id() { fn $id() {
use patched_porobot::data::deckcode::deck::Deck; use crate::data::deckcode::deck::Deck;
let deck1 = $deck; let deck1 = $deck;
let code = deck1 let code = deck1
.to_code(DeckCodeFormat::F1) .to_code(DeckCodeFormat::F1)