github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/amino/tests/package.go (about) 1 package tests 2 3 import ( 4 "reflect" 5 6 "github.com/gnolang/gno/tm2/pkg/amino/pkg" 7 ) 8 9 // Creates one much like amino.RegisterPackage, but without registration. 10 // This is needed due to circular dependency issues for dependencies of Amino. 11 // Another reason to strive for many independent modules. 12 // NOTE: Register new repr types here as well. 13 // NOTE: This package registration is independent of test registration. 14 // See tests/common.go StructTypes etc to add to tests. 15 var Package = pkg.NewPackage( 16 "github.com/gnolang/gno/tm2/pkg/amino/tests", 17 "tests", 18 pkg.GetCallersDirname(), 19 ).WithDependencies().WithTypes( 20 EmptyStruct{}, 21 PrimitivesStruct{}, 22 ShortArraysStruct{}, 23 ArraysStruct{}, 24 ArraysArraysStruct{}, 25 SlicesStruct{}, 26 SlicesSlicesStruct{}, 27 PointersStruct{}, 28 PointerSlicesStruct{}, 29 // NestedPointersStruct{}, 30 ComplexSt{}, 31 EmbeddedSt1{}, 32 EmbeddedSt2{}, 33 EmbeddedSt3{}, 34 EmbeddedSt4{}, 35 pkg.Type{ // example of overriding type name. 36 Type: reflect.TypeOf(EmbeddedSt5{}), 37 Name: "EmbeddedSt5NameOverride", 38 PointerPreferred: false, 39 }, 40 AminoMarshalerStruct1{}, 41 ReprStruct1{}, 42 AminoMarshalerStruct2{}, 43 ReprElem2{}, 44 AminoMarshalerStruct3{}, 45 AminoMarshalerInt4(0), 46 AminoMarshalerInt5(0), 47 AminoMarshalerStruct6{}, 48 AminoMarshalerStruct7{}, 49 ReprElem7{}, 50 IntDef(0), 51 IntAr{}, 52 IntSl(nil), 53 ByteAr{}, 54 ByteSl(nil), 55 PrimitivesStructDef{}, 56 PrimitivesStructSl(nil), 57 PrimitivesStructAr{}, 58 Concrete1{}, 59 Concrete2{}, 60 ConcreteTypeDef{}, 61 ConcreteWrappedBytes{}, 62 &InterfaceFieldsStruct{}, 63 )