From 14502318e31c06850ab5b9b3cd3aaebc70b6a33b Mon Sep 17 00:00:00 2001 From: loothero Date: Fri, 20 Sep 2024 04:23:46 +0000 Subject: [PATCH] fix tests, update from 2.7.0 to 2.7.1 --- Scarb.toml | 6 +++--- src/beast.cairo | 3 +-- src/pack.cairo | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Scarb.toml b/Scarb.toml index f730aa9..a0dd152 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -3,9 +3,9 @@ name = "beasts" version = "0.1.0" [dependencies] -starknet = "2.7.0" +starknet = "2.7.1" openzeppelin_token = { git = "https://github.com/OpenZeppelin/cairo-contracts", tag = "v0.15.1" } openzeppelin_introspection = { git = "https://github.com/OpenZeppelin/cairo-contracts", tag = "v0.15.1" } -[scripts] -test = "scarb cairo-test" \ No newline at end of file +[dev-dependencies] +cairo_test = "2.7.1" \ No newline at end of file diff --git a/src/beast.cairo b/src/beast.cairo index d28cdee..cf2ce45 100644 --- a/src/beast.cairo +++ b/src/beast.cairo @@ -4098,7 +4098,6 @@ mod tests { } #[test] - #[available_gas(11125360)] fn test_get_content() { let beast = PackableBeast { id: 1, prefix: 1, suffix: 1, level: 1, health: 1 }; @@ -4110,7 +4109,7 @@ mod tests { } let segment = *content.at(i); // Uncomment to view content - //segment.print(); + println!("Segment: {:?}", segment); i += 1; } } diff --git a/src/pack.cairo b/src/pack.cairo index 8778a45..3ccca80 100644 --- a/src/pack.cairo +++ b/src/pack.cairo @@ -464,12 +464,14 @@ mod pow { #[cfg(test)] mod tests { + use super::{PackableBeast, PackPackable}; + #[test] #[available_gas(180960)] fn test_pack_and_unpack_gas() { let beast = PackableBeast { id: 1, prefix: 2, suffix: 3, level: 4, health: 5 }; let packed = PackPackable::pack(beast); - let unpacked = PackPackable::unpack(packed); + PackPackable::unpack(packed); } #[test]