diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/contract b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/contract index 41a182a39e9..a1adce1732c 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/contract +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/contract @@ -125,7 +125,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x23beac7cb7e82c7f5e87d1938f705760cd22de93f3a5ad133f48f1fdbcc14c1; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics index 01a9ca8273a..8fa21548cb3 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/diagnostics @@ -56,7 +56,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x198f4bc6efa8417922f8041d6e73821af41c6bbf15f1c93084da188702456b; @@ -184,7 +184,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x3bd690d1a73da0d8c43f46ecc3a006978d8343a075e91a1c7a24529e7d244a; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -316,7 +316,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x14b80a3dbe8461b938c026ddbb0c5d189ca6e45d333ff1ecaecfe92dce54d9d; @@ -456,7 +456,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xdee30876537447b8a21b901cf0379b47de6b9fcb087ab5e54f097e822f243c; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -649,7 +649,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xd3b97940b766b03f59196c092939b4f964559ef1cd235415d018804dbdcfe3; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -784,7 +784,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x114e2e703df7c3eba53b970519666cfce0ede18d79e35b62fa95c0ecb6601fc; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -917,7 +917,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2cc0463f1cfda138e64b2f35959f33601b5e1076814981ef2444d17ce259dfb; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -1074,7 +1074,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x34ebdf0a4defb7a8b628dda81a7dc347d8d3459040c2e1165ae0f7856bb7a29; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -1224,7 +1224,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x291a42fae50c99636dc1d6bc0c4e28fdb0e21f47c26aa0d5e22c21d993823d8; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -1466,7 +1466,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x36b41c3fffa5f7f882a01476ca45292d6254f8dc075e4837185259a4d5d8351; @@ -1652,7 +1652,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x271c051b9d25373bc88ddfddfb1c29cc601d7014c5343fe167b82768570a896; @@ -1839,7 +1839,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x3d8335ac3c47c73a6e9c5c10ea897e897b215aba4c18ccab86db3595169e73c; @@ -2503,7 +2503,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xf88f1c8a0a8d514425e46be98fb5ba0ba2db1093397ff93bd36d471ed4b970; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -2737,7 +2737,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x6c97de948ac6fb043d95e7e280901efdd422607b3b71dafd3abf300622647b; @@ -2856,7 +2856,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2e575c45381314b9946066629db110dd30bb5e0b081753f226075310e440696; @@ -5380,7 +5380,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x291a893aaae68e6364fac8003da0089f1c976946ebe457ce78ed62b5e680be2; impl ContractStateMyEmbeddableImpl of @@ -5565,7 +5565,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x7bfb361123ab6c75c9b1db29acd3b69ea425da0db94322a959835a160c41da; diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl index 3d5d78a3472..cd8951fce07 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/embedded_impl @@ -572,7 +572,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2642978564a46e618664a6067eb6f36304e4408bd713c2bc8c637d865371013; impl ContractStateOutsideImpl of @@ -1461,7 +1461,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2f3505035216cb9786b44e88c45f03e355e52c775f1b6ee6be27556e20667b; impl ContractStateOutsideImplWithDestruct of @@ -1975,7 +1975,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x7abed9c637e9d7ff4d836f1e5e23fa64efc1ba2169cc22aa5d822ad70fed47; impl ContractStateOutsideImplWithDrop of diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/external_event b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/external_event index ab9c991f0c4..815ca9c040b 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/external_event +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/external_event @@ -173,7 +173,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x32ff02b6abf104297a08971d16f6970b6530be8e49a83bde923ea117b47a37e; diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces index c71a0f838fe..91ca8be128d 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/interfaces @@ -902,7 +902,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x1086dfc31bbcf268e659eae270c18772df580a79d61a03d56056059861c874a; impl ContractStateI1I1 of diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/l1_handler b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/l1_handler index b6987d94ca3..5459ee5f516 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/l1_handler +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/l1_handler @@ -56,7 +56,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x32a1956d182625bfe7f9834635d01441624366b326c190ecbf557e699f94b76; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/raw_output b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/raw_output index 56d912b943a..6f86dfe4488 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/raw_output +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/raw_output @@ -68,7 +68,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xe8fd97ed2950722a36523186b7f01aeba6db1a2faedf427e91639a6252388a; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage index 00fb0e6b862..6e18694764e 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/storage @@ -716,7 +716,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x33d119d7988d8f3251d554948b07e3215c9d66cf56f21bc80a6e513ea8e536; diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types index 20e7196dda2..0bb44f8dd87 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/user_defined_types @@ -298,7 +298,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x22a6a9ef9e77b4a6859543ea1095bf317324bd00f9420953f068bcafc59b605; diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component index 3dc91eb5783..e9b1ae7d504 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component @@ -244,7 +244,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x13b620794e5b3dc7cc2033d0b9381b35d5d10d1f0a43fe1f5e1d495f793ebab; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -616,7 +616,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x20768e618c747c9e742de0446492553ae65eafb837da660ed6516e1ed6b52fc; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -1026,7 +1026,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x20768e618c747c9e742de0446492553ae65eafb837da660ed6516e1ed6b52fc; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] diff --git a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component_diagnostics b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component_diagnostics index 5b115ed9d3e..4a96d774351 100644 --- a/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component_diagnostics +++ b/crates/cairo-lang-starknet/src/plugin/plugin_test_data/contracts/with_component_diagnostics @@ -148,7 +148,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2943e6b272892c78655f823e0abb3da425a1ac0c3f9bdd70869a3f37bc54797; @@ -397,7 +397,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xe61d99740f46b06b2ccd91d014bc9f9acc438fec59d79dd30fd0d852e5210; @@ -634,7 +634,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x14aaf6de6aff44d64b4c3609768860615e979fdd851d125bbdfc10597a50a1d; @@ -880,7 +880,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x2cffa3f882c4d652a366356180352e5af2bb4ea9b0e50532f2a0f11f077643a; @@ -1135,7 +1135,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x13a81b6876baa1445c90fd69add3e928a4f6c6807e5227544ac6f6698c463b2; @@ -1397,7 +1397,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x1092f63083af07b77ee426fd76d9695c3747a2e42571a914cee1dd17960254f; @@ -1708,7 +1708,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x8618264598f52601eed9355f5b7c0fc7c8912d966e620eb0a2914ed8cb5c10; @@ -1944,7 +1944,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x8f9d2a9bd3a3fe28e42c16030ed25a2756a86a13d4297597e43683c3df9a02; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -2237,7 +2237,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0x150d2e1961908098174a1d0101315691e91ab91682760b04003683fab54f03e; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] @@ -2560,7 +2560,7 @@ use starknet::storage::{ StorageMapMemberAddressTrait, StorageMemberAddressTrait, StorageMapMemberAccessTrait, StorageMemberAccessTrait }; -#[cfg(test)] +#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = 0xa09b926ceb282d29edce76bb84e4aeb97f1a82ce15099322f1c2869a49b549; #[implicit_precedence(Pedersen, RangeCheck, Bitwise, EcOp, Poseidon, SegmentArena, GasBuiltin, System)] diff --git a/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs b/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs index 360933811c6..473b32a7caf 100644 --- a/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs +++ b/crates/cairo-lang-starknet/src/plugin/starknet_module/contract.rs @@ -325,7 +325,7 @@ pub(super) fn generate_contract_specific_code( ); generation_data.specific.test_config = RewriteNode::Text(formatdoc!( - "#[cfg(test)] + "#[cfg(target: 'test')] pub const TEST_CLASS_HASH: felt252 = {test_class_hash}; " )); diff --git a/crates/cairo-lang-test-runner/src/lib.rs b/crates/cairo-lang-test-runner/src/lib.rs index f26042ef8a5..f647cd16d40 100644 --- a/crates/cairo-lang-test-runner/src/lib.rs +++ b/crates/cairo-lang-test-runner/src/lib.rs @@ -192,7 +192,7 @@ impl TestCompiler { let db = &mut { let mut b = RootDatabase::builder(); b.detect_corelib(); - b.with_cfg(CfgSet::from_iter([Cfg::name("test")])); + b.with_cfg(CfgSet::from_iter([Cfg::name("test"), Cfg::kv("target", "test")])); b.with_plugin_suite(test_plugin_suite()); if starknet { b.with_plugin_suite(starknet_plugin_suite());