Skip to content

Commit

Permalink
Actually test that ScalarValues are the same after round trip seria…
Browse files Browse the repository at this point in the history
…lization (#3537)
  • Loading branch information
alamb authored Sep 20, 2022
1 parent 4b1e044 commit e873423
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions datafusion/proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,17 @@ mod roundtrip_tests {
let proto: super::protobuf::ScalarValue = (&test_case)
.try_into()
.expect("failed conversion to protobuf");
let _roundtrip: ScalarValue =
(&proto).try_into().expect("failed conversion to protobuf");

let roundtrip: ScalarValue = (&proto)
.try_into()
.expect("failed conversion from protobuf");

assert_eq!(
test_case, roundtrip,
"ScalarValue was not the same after round trip!\n\n\
Input: {:?}\n\nRoundtrip: {:?}",
test_case, roundtrip
);
}
}

Expand Down

0 comments on commit e873423

Please sign in to comment.