@@ -198,6 +198,7 @@ mod tests {
198
198
199
199
use super :: * ;
200
200
201
+ #[ track_caller]
201
202
fn assert_code_eq ( actual : String , expected : & str ) {
202
203
let actual_no_ws = actual. split_whitespace ( ) . collect :: < Vec < _ > > ( ) ;
203
204
let expected_no_ws = expected. split_whitespace ( ) . collect :: < Vec < _ > > ( ) ;
@@ -210,6 +211,7 @@ mod tests {
210
211
) ;
211
212
}
212
213
214
+ #[ track_caller]
213
215
fn assert_code_eq_ignore_docs ( actual : String , expected : & str ) {
214
216
let actual_filtered = actual
215
217
. lines ( )
@@ -251,7 +253,7 @@ mod tests {
251
253
Binary []byte `json:"binary"`
252
254
Checksum Checksum `json:"checksum"`
253
255
HexBinary string `json:"hex_binary"`
254
- NestedBinary Array[* []byte] `json:"nested_binary"`
256
+ NestedBinary Array[[]byte] `json:"nested_binary"`
255
257
Uint128 string `json:"uint128"`
256
258
}"# ,
257
259
) ;
@@ -340,7 +342,7 @@ mod tests {
340
342
compare_codes ! ( cosmwasm_std:: SupplyResponse ) ;
341
343
compare_codes ! ( cosmwasm_std:: BalanceResponse ) ;
342
344
compare_codes ! ( cosmwasm_std:: DenomMetadataResponse ) ;
343
- // compare_codes!(cosmwasm_std::AllDenomMetadataResponse); // uses `[]byte` instead of `*[]byte`
345
+ // compare_codes!(cosmwasm_std::AllDenomMetadataResponse); // uses slice instead of `Array` type
344
346
// staking
345
347
compare_codes ! ( cosmwasm_std:: BondedDenomResponse ) ;
346
348
compare_codes ! ( cosmwasm_std:: AllDelegationsResponse ) ;
@@ -355,7 +357,7 @@ mod tests {
355
357
// wasm
356
358
compare_codes ! ( cosmwasm_std:: ContractInfoResponse ) ;
357
359
compare_codes ! ( cosmwasm_std:: CodeInfoResponse ) ;
358
- // compare_codes!(cosmwasm_std::RawRangeResponse); // uses `[]byte` instead of `*[]byte`
360
+ compare_codes ! ( cosmwasm_std:: RawRangeResponse ) ;
359
361
}
360
362
361
363
#[ test]
@@ -426,8 +428,7 @@ mod tests {
426
428
compare_codes ! ( cosmwasm_std:: StakingQuery ) ;
427
429
compare_codes ! ( cosmwasm_std:: DistributionQuery ) ;
428
430
compare_codes ! ( cosmwasm_std:: IbcQuery ) ;
429
- // TODO: RawRange query uses *[]byte instead of []byte
430
- // compare_codes!(cosmwasm_std::WasmQuery);
431
+ compare_codes ! ( cosmwasm_std:: WasmQuery ) ;
431
432
}
432
433
433
434
#[ test]
@@ -477,6 +478,8 @@ mod tests {
477
478
478
479
#[ cw_serde]
479
480
struct D {
481
+ // this should not get an `omitempty` because that prevents us from distinguishing between
482
+ // `None` and `Some(vec![])`
480
483
d : Option < Vec < String > > ,
481
484
nested : Vec < Option < Vec < String > > > ,
482
485
}
@@ -485,8 +488,8 @@ mod tests {
485
488
code,
486
489
r#"
487
490
type D struct {
488
- D * []string `json:"d,omitempty "`
489
- Nested Array[* []string] `json:"nested"`
491
+ D []string `json:"d"`
492
+ Nested Array[[]string] `json:"nested"`
490
493
}"# ,
491
494
) ;
492
495
}
0 commit comments