Skip to content

Commit

Permalink
Fix serialization test
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
  • Loading branch information
Matthias Wahl committed Jan 26, 2021
1 parent 797ce6a commit 2d93c3b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tremor-value/src/serde/value/se.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,14 @@ mod tests {
let t_value = to_value(tuple)?;
if let Value::Object(map) = t_value {
if let Some(&Value::Array(values)) = map.get("TupleStruct".into()).as_ref() {
assert_eq!(Some(&Value::Static(StaticNode::I64(1))), values.get(0));
assert_eq!(Some(&Value::Static(StaticNode::I64(2))), values.get(1));
assert_eq!(Some(&Value::Static(StaticNode::I64(3))), values.get(2));
if let Some(&Value::Array(first_field)) = values.get(0).as_ref() {
assert_eq!(Some(&Value::Static(StaticNode::I64(1))), first_field.get(0));
assert_eq!(Some(&Value::Static(StaticNode::I64(2))), first_field.get(1));
assert_eq!(Some(&Value::Static(StaticNode::I64(3))), first_field.get(2));
} else {
assert!(false, "Vec<u8> not serialized as array");
}
assert_eq!(Some(&Value::Static(StaticNode::U64(3))), values.get(1));
}
}

Expand Down

0 comments on commit 2d93c3b

Please sign in to comment.