Skip to content

Commit ecbc255

Browse files
committed
crc: split unit test in two, #6193
1 parent e7dcc8a commit ecbc255

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

stackslib/src/blockstack_cli.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,9 @@ mod test {
12431243
}
12441244

12451245
#[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() {
12481247
let mut file = NamedTempFile::new().expect("Cannot create tempfile!");
1248+
// Bad hex string but (good except for the \n)
12491249
write!(file, "0000000000000000000000000000000001\n").expect("Cannot Write to temp file");
12501250
let file_path = file.path().to_str().unwrap();
12511251

@@ -1266,9 +1266,12 @@ mod test {
12661266

12671267
let expected_msg = "Failed to deserialize: Deserialization error: Bad hex string";
12681268
assert_eq!(expected_msg, result.unwrap_err().to_string());
1269+
}
12691270

1270-
//Scenerio 02: short buffer
1271+
#[test]
1272+
fn test_contract_call_with_serialized_arg_from_file_fails_due_to_short_buffer() {
12711273
let mut file = NamedTempFile::new().expect("Cannot create tempfile!");
1274+
// hex buffer is short
12721275
write!(file, "0101").expect("Cannot Write to temp file");
12731276
let file_path = file.path().to_str().unwrap();
12741277

0 commit comments

Comments
 (0)