From c4fba3e3b449113966db9fcae18a1c9dc318d003 Mon Sep 17 00:00:00 2001 From: tash-2s <81064017+tash-2s@users.noreply.github.com> Date: Wed, 3 Jan 2024 05:25:32 -0600 Subject: [PATCH] test(world): improve revert message (#2086) --- packages/world/test/CoreModule.t.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/world/test/CoreModule.t.sol b/packages/world/test/CoreModule.t.sol index 456773fe20..384c24f2ed 100644 --- a/packages/world/test/CoreModule.t.sol +++ b/packages/world/test/CoreModule.t.sol @@ -5,11 +5,11 @@ import { Test } from "forge-std/Test.sol"; import { StoreRead } from "@latticexyz/store/src/StoreRead.sol"; import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; -import { ResourceId } from "@latticexyz/store/src/ResourceId.sol"; import { Tables } from "@latticexyz/store/src/codegen/index.sol"; import { WorldContextProviderLib } from "../src/WorldContext.sol"; import { CoreModule } from "../src/modules/core/CoreModule.sol"; +import { ResourceId, WorldResourceIdInstance } from "../src/WorldResourceId.sol"; contract WorldMock is StoreRead { constructor() { @@ -45,10 +45,10 @@ contract CoreModuleTest is Test { // Confirm that each tableId is registered for (uint256 i; i < tableIds.length; i++) { - bytes32 tableId = tableIds[i]; + ResourceId resourceId = ResourceId.wrap(tableIds[i]); assertFalse( - Tables.getFieldLayout(ResourceId.wrap(tableId)).isEmpty(), - string.concat("table should be registered: ", string(abi.encodePacked(tableId))) + Tables.getFieldLayout(resourceId).isEmpty(), + string.concat("table should be registered: ", WorldResourceIdInstance.toString(resourceId)) ); } }