Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramona Luczkiewicz committed May 2, 2022
1 parent a666edf commit 7bfe92c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tremor-script/src/std_lib/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,24 @@ mod test {
Ok(())
}

#[test]
fn first_merge() -> Result<()> {
let mut a = First::default();
let mut b = First::default();
a.init();
b.init();

a.accumulate(&[&Value::from(1)])?;
a.accumulate(&[&Value::from(2)])?;
b.accumulate(&[&Value::from(3)])?;

a.merge(&b)?;

assert_eq!(Value::from(1), a.emit().unwrap());

Ok(())
}

#[test]
fn cardinality() {
let f = fun("win", "cardinality");
Expand Down

0 comments on commit 7bfe92c

Please sign in to comment.