Skip to content

Commit e873423

Browse files
authored
Actually test that ScalarValues are the same after round trip serialization (#3537)
1 parent 4b1e044 commit e873423

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

datafusion/proto/src/lib.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,17 @@ mod roundtrip_tests {
465465
let proto: super::protobuf::ScalarValue = (&test_case)
466466
.try_into()
467467
.expect("failed conversion to protobuf");
468-
let _roundtrip: ScalarValue =
469-
(&proto).try_into().expect("failed conversion to protobuf");
468+
469+
let roundtrip: ScalarValue = (&proto)
470+
.try_into()
471+
.expect("failed conversion from protobuf");
472+
473+
assert_eq!(
474+
test_case, roundtrip,
475+
"ScalarValue was not the same after round trip!\n\n\
476+
Input: {:?}\n\nRoundtrip: {:?}",
477+
test_case, roundtrip
478+
);
470479
}
471480
}
472481

0 commit comments

Comments
 (0)