Skip to content

Commit

Permalink
Fix cfg attribute for TEST_CLASS_HASH (#5219)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr authored Mar 8, 2024
1 parent 13b0710 commit fb76dd9
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x198f4bc6efa8417922f8041d6e73821af41c6bbf15f1c93084da188702456b;


Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -316,7 +316,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x14b80a3dbe8461b938c026ddbb0c5d189ca6e45d333ff1ecaecfe92dce54d9d;


Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -1466,7 +1466,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x36b41c3fffa5f7f882a01476ca45292d6254f8dc075e4837185259a4d5d8351;


Expand Down Expand Up @@ -1652,7 +1652,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x271c051b9d25373bc88ddfddfb1c29cc601d7014c5343fe167b82768570a896;


Expand Down Expand Up @@ -1839,7 +1839,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x3d8335ac3c47c73a6e9c5c10ea897e897b215aba4c18ccab86db3595169e73c;


Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -2737,7 +2737,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x6c97de948ac6fb043d95e7e280901efdd422607b3b71dafd3abf300622647b;


Expand Down Expand Up @@ -2856,7 +2856,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x2e575c45381314b9946066629db110dd30bb5e0b081753f226075310e440696;


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -5565,7 +5565,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x7bfb361123ab6c75c9b1db29acd3b69ea425da0db94322a959835a160c41da;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x32ff02b6abf104297a08971d16f6970b6530be8e49a83bde923ea117b47a37e;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x33d119d7988d8f3251d554948b07e3215c9d66cf56f21bc80a6e513ea8e536;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x22a6a9ef9e77b4a6859543ea1095bf317324bd00f9420953f068bcafc59b605;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x2943e6b272892c78655f823e0abb3da425a1ac0c3f9bdd70869a3f37bc54797;


Expand Down Expand Up @@ -397,7 +397,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0xe61d99740f46b06b2ccd91d014bc9f9acc438fec59d79dd30fd0d852e5210;


Expand Down Expand Up @@ -634,7 +634,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x14aaf6de6aff44d64b4c3609768860615e979fdd851d125bbdfc10597a50a1d;


Expand Down Expand Up @@ -880,7 +880,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x2cffa3f882c4d652a366356180352e5af2bb4ea9b0e50532f2a0f11f077643a;


Expand Down Expand Up @@ -1135,7 +1135,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x13a81b6876baa1445c90fd69add3e928a4f6c6807e5227544ac6f6698c463b2;


Expand Down Expand Up @@ -1397,7 +1397,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x1092f63083af07b77ee426fd76d9695c3747a2e42571a914cee1dd17960254f;


Expand Down Expand Up @@ -1708,7 +1708,7 @@ use starknet::storage::{
StorageMapMemberAddressTrait, StorageMemberAddressTrait,
StorageMapMemberAccessTrait, StorageMemberAccessTrait
};
#[cfg(test)]
#[cfg(target: 'test')]
pub const TEST_CLASS_HASH: felt252 = 0x8618264598f52601eed9355f5b7c0fc7c8912d966e620eb0a2914ed8cb5c10;


Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
"
));
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-test-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit fb76dd9

Please sign in to comment.