File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
crates/starknet_os_flow_tests/src Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1947,6 +1947,34 @@ async fn test_deprecated_send_to_l1() {
19471947 test_output. perform_default_validations ( ) ;
19481948}
19491949
1950+ #[ rstest]
1951+ #[ tokio:: test]
1952+ async fn test_replace_class ( ) {
1953+ let empty_contract = FeatureContract :: Empty ( CairoVersion :: Cairo1 ( RunnableCairo1 :: Casm ) ) ;
1954+ let (
1955+ mut test_manager,
1956+ [ test_contract_address_cairo0, test_contract_address_cairo1, _empty_contract_address] ,
1957+ ) = TestManager :: < DictStateReader > :: new_with_default_initial_state ( [
1958+ ( FeatureContract :: TestContract ( CairoVersion :: Cairo0 ) , calldata ! [ Felt :: ZERO , Felt :: ZERO ] ) ,
1959+ (
1960+ FeatureContract :: TestContract ( CairoVersion :: Cairo1 ( RunnableCairo1 :: Casm ) ) ,
1961+ calldata ! [ Felt :: ZERO , Felt :: ZERO ] ,
1962+ ) ,
1963+ ( empty_contract, calldata ! [ ] ) ,
1964+ ] )
1965+ . await ;
1966+ let empty_class_hash = get_class_hash_of_feature_contract ( empty_contract) ;
1967+
1968+ for address in [ test_contract_address_cairo1, test_contract_address_cairo0] {
1969+ let calldata = create_calldata ( address, "test_replace_class" , & [ empty_class_hash. 0 ] ) ;
1970+ test_manager. add_funded_account_invoke ( invoke_tx_args ! { calldata } ) ;
1971+ }
1972+
1973+ let test_output =
1974+ test_manager. execute_test_with_default_block_contexts ( & TestParameters :: default ( ) ) . await ;
1975+ test_output. perform_default_validations ( ) ;
1976+ }
1977+
19501978#[ rstest]
19511979#[ tokio:: test]
19521980async fn test_deploy_syscall ( ) {
You can’t perform that action at this time.
0 commit comments