File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1243,9 +1243,9 @@ mod test {
1243
1243
}
1244
1244
1245
1245
#[ test]
1246
- fn test_contract_call_with_serialized_arg_from_file_fails_due_to_content ( ) {
1247
- //Scenerio 01: Bad hex string but (good except for the \n)
1246
+ fn test_contract_call_with_serialized_arg_from_file_fails_due_to_bad_hex ( ) {
1248
1247
let mut file = NamedTempFile :: new ( ) . expect ( "Cannot create tempfile!" ) ;
1248
+ // Bad hex string but (good except for the \n)
1249
1249
write ! ( file, "0000000000000000000000000000000001\n " ) . expect ( "Cannot Write to temp file" ) ;
1250
1250
let file_path = file. path ( ) . to_str ( ) . unwrap ( ) ;
1251
1251
@@ -1266,9 +1266,12 @@ mod test {
1266
1266
1267
1267
let expected_msg = "Failed to deserialize: Deserialization error: Bad hex string" ;
1268
1268
assert_eq ! ( expected_msg, result. unwrap_err( ) . to_string( ) ) ;
1269
+ }
1269
1270
1270
- //Scenerio 02: short buffer
1271
+ #[ test]
1272
+ fn test_contract_call_with_serialized_arg_from_file_fails_due_to_short_buffer ( ) {
1271
1273
let mut file = NamedTempFile :: new ( ) . expect ( "Cannot create tempfile!" ) ;
1274
+ // hex buffer is short
1272
1275
write ! ( file, "0101" ) . expect ( "Cannot Write to temp file" ) ;
1273
1276
let file_path = file. path ( ) . to_str ( ) . unwrap ( ) ;
1274
1277
You can’t perform that action at this time.
0 commit comments