Skip to content

Commit

Permalink
fix: tests and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Mar 29, 2024
1 parent cda9a0e commit 8643e46
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
4 changes: 3 additions & 1 deletion crates/dojo-core/src/base_test.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ mod invalid_model {
impl InvalidModelName of super::INameOnly<ContractState> {
fn name(self: @ContractState) -> felt252 {
// Pre-computed address of a contract deployed through the world.
0x7b6cc67bb03efdf091487465df2037cad74111d8b616536b013e70da7491a30
// To print this addres, run:
// sozo test --manifest-path crates/dojo-core/Scarb.toml -f test_deploy_from_world_invalid_model
0x365e118dca1de7bcf112ed35a62519b13a85d39b03f6b0338eea9a56b31c6c9
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions crates/dojo-lang/src/inline_macros/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ impl InlineMacroExprPlugin for EmitMacro {
code: None,
diagnostics: vec![PluginDiagnostic {
stable_ptr: arg_list.arguments(db).stable_ptr().untyped(),
message: "Invalid arguments. Expected \"emit!(world, (events,))\""
.to_string(),
message: "Invalid arguments. Expected \"emit!(world, (events,))\"".to_string(),

Check warning on line 38 in crates/dojo-lang/src/inline_macros/emit.rs

View check run for this annotation

Codecov / codecov/patch

crates/dojo-lang/src/inline_macros/emit.rs#L38

Added line #L38 was not covered by tests
severity: Severity::Error,
}],
};
Expand Down Expand Up @@ -105,7 +104,7 @@ impl InlineMacroExprPlugin for EmitMacro {

builder.add_str("\n ");
builder.add_node(world.as_syntax_node());
builder.add_str(&format!(".emit(keys, data.span());"));
builder.add_str(".emit(keys, data.span());");

builder.add_str("}");
}
Expand Down
24 changes: 10 additions & 14 deletions crates/dojo-world/src/contracts/abi/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ abigen!(
}
]
},
{
"type": "struct",
"name": "core::array::Span::<core::integer::u8>",
"members": [
{
"name": "snapshot",
"type": "@core::array::Array::<core::integer::u8>"
}
]
},
{
"type": "enum",
"name": "core::bool",
Expand All @@ -48,16 +58,6 @@ abigen!(
}
]
},
{
"type": "struct",
"name": "core::array::Span::<core::integer::u8>",
"members": [
{
"name": "snapshot",
"type": "@core::array::Array::<core::integer::u8>"
}
]
},
{
"type": "interface",
"name": "dojo::world::IWorld",
Expand Down Expand Up @@ -180,10 +180,6 @@ abigen!(
{
"name": "values",
"type": "core::array::Span::<core::felt252>"
},
{
"name": "is_model_event",
"type": "core::bool"
}
],
"outputs": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind = "DojoContract"
class_hash = "0x484cfecf0899a34820e62baf5f7dd1e17c1bcc08f8e595ff394ea16f9a5becd"
class_hash = "0x658309df749cea1c32e21920740011e829626ab06c9b4d0c05b75f82a20693b"
abi = "abis/base/contracts/records.json"
reads = []
writes = []
Expand Down
2 changes: 1 addition & 1 deletion crates/torii/types-test/manifests/base/world.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kind = "Class"
class_hash = "0xfab8f0fbd397ada7cdebd9f6399fb9694a76fa55646c9cfcc41b813a1b8324"
class_hash = "0x799bc4e9da10bfb3dd88e6f223c9cfbf7745435cd14f5d69675ea448e578cd"
name = "dojo::world::world"

0 comments on commit 8643e46

Please sign in to comment.