File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
tests/contracttrait_trait/src Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -187,11 +187,14 @@ mod test {
187187
188188 #[ test]
189189 fn test_spec_docs ( ) {
190- use stellar_xdr:: curr as stellar_xdr;
191- use stellar_xdr:: { Limits , ReadXdr , ScSpecEntry } ;
190+ use soroban_sdk:: xdr:: { Limited , Limits , ReadXdr , ScSpecEntry } ;
192191
193192 // Verify that doc strings from trait default functions appear in the spec
194- let entry = ScSpecEntry :: from_xdr ( Contract :: spec_xdr_test_u32 ( ) , Limits :: none ( ) ) . unwrap ( ) ;
193+ let entry = ScSpecEntry :: read_xdr ( & mut Limited :: new (
194+ & mut & Contract :: spec_xdr_test_u32 ( ) [ ..] ,
195+ Limits :: none ( ) ,
196+ ) )
197+ . unwrap ( ) ;
195198 let ScSpecEntry :: FunctionV0 ( func) = entry else {
196199 panic ! ( "expected FunctionV0" ) ;
197200 } ;
@@ -200,7 +203,11 @@ mod test {
200203 "Test u32 values.\n Returns the input unchanged."
201204 ) ;
202205
203- let entry = ScSpecEntry :: from_xdr ( Contract :: spec_xdr_test_i32 ( ) , Limits :: none ( ) ) . unwrap ( ) ;
206+ let entry = ScSpecEntry :: read_xdr ( & mut Limited :: new (
207+ & mut & Contract :: spec_xdr_test_i32 ( ) [ ..] ,
208+ Limits :: none ( ) ,
209+ ) )
210+ . unwrap ( ) ;
204211 let ScSpecEntry :: FunctionV0 ( func) = entry else {
205212 panic ! ( "expected FunctionV0" ) ;
206213 } ;
You can’t perform that action at this time.
0 commit comments