@@ -880,6 +880,46 @@ func TestMigratingValuesWithAccountStaticType(t *testing.T) {
880
880
require .NoError (t , err )
881
881
882
882
testCases := map [string ]testCase {
883
+ "dictionary_value" : {
884
+ storedValue : interpreter .NewDictionaryValue (
885
+ inter ,
886
+ locationRange ,
887
+ interpreter .NewDictionaryStaticType (
888
+ nil ,
889
+ interpreter .PrimitiveStaticTypeString ,
890
+ interpreter .PrimitiveStaticTypePublicAccount , //nolint:staticcheck
891
+ ),
892
+ ),
893
+ expectedValue : interpreter .NewDictionaryValue (
894
+ inter ,
895
+ locationRange ,
896
+ interpreter .NewDictionaryStaticType (
897
+ nil ,
898
+ interpreter .PrimitiveStaticTypeString ,
899
+ unauthorizedAccountReferenceType ,
900
+ ),
901
+ ),
902
+ },
903
+ "array_value" : {
904
+ storedValue : interpreter .NewArrayValue (
905
+ inter ,
906
+ locationRange ,
907
+ interpreter .NewVariableSizedStaticType (
908
+ nil ,
909
+ interpreter .PrimitiveStaticTypePublicAccount , //nolint:staticcheck
910
+ ),
911
+ common.Address {},
912
+ ),
913
+ expectedValue : interpreter .NewArrayValue (
914
+ inter ,
915
+ locationRange ,
916
+ interpreter .NewVariableSizedStaticType (
917
+ nil ,
918
+ unauthorizedAccountReferenceType ,
919
+ ),
920
+ common.Address {},
921
+ ),
922
+ },
883
923
"account_capability_value" : {
884
924
storedValue : interpreter .NewUnmeteredCapabilityValue (
885
925
123 ,
@@ -955,6 +995,46 @@ func TestMigratingValuesWithAccountStaticType(t *testing.T) {
955
995
BorrowType : unauthorizedAccountReferenceType ,
956
996
},
957
997
},
998
+ "capability_dictionary" : {
999
+ storedValue : interpreter .NewDictionaryValue (
1000
+ inter ,
1001
+ locationRange ,
1002
+ interpreter .NewDictionaryStaticType (
1003
+ nil ,
1004
+ interpreter .PrimitiveStaticTypeString ,
1005
+ interpreter .NewCapabilityStaticType (
1006
+ nil ,
1007
+ interpreter .PrimitiveStaticTypePublicAccount , //nolint:staticcheck
1008
+ ),
1009
+ ),
1010
+ interpreter .NewUnmeteredStringValue ("key" ),
1011
+ interpreter .NewCapabilityValue (
1012
+ nil ,
1013
+ interpreter .NewUnmeteredUInt64Value (1234 ),
1014
+ interpreter .NewAddressValue (nil , common.Address {}),
1015
+ interpreter .PrimitiveStaticTypePublicAccount , //nolint:staticcheck
1016
+ ),
1017
+ ),
1018
+ expectedValue : interpreter .NewDictionaryValue (
1019
+ inter ,
1020
+ locationRange ,
1021
+ interpreter .NewDictionaryStaticType (
1022
+ nil ,
1023
+ interpreter .PrimitiveStaticTypeString ,
1024
+ interpreter .NewCapabilityStaticType (
1025
+ nil ,
1026
+ unauthorizedAccountReferenceType ,
1027
+ ),
1028
+ ),
1029
+ interpreter .NewUnmeteredStringValue ("key" ),
1030
+ interpreter .NewCapabilityValue (
1031
+ nil ,
1032
+ interpreter .NewUnmeteredUInt64Value (1234 ),
1033
+ interpreter .NewAddressValue (nil , common.Address {}),
1034
+ unauthorizedAccountReferenceType ,
1035
+ ),
1036
+ ),
1037
+ },
958
1038
}
959
1039
960
1040
// Store values
0 commit comments