Skip to content

Commit

Permalink
TW showed better way to do some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenhaahr committed Dec 4, 2024
1 parent 24df73f commit a7b87eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/constraint_based_lola.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ async fn test_var() {

#[tokio::test]
async fn test_literal_expression() {
// NOTE: This test makes less sense with async RV
let mut input_streams = input_streams1();
let mut spec = "in x\nout z\nz =42+x-x";
let mut spec = "out z\nz =42";
let spec = lola_specification(&mut spec).unwrap();
let mut monitor = ConstraintBasedMonitor::new(spec, &mut input_streams);
let outputs: Vec<(usize, BTreeMap<VarName, Value>)> =
monitor.monitor_outputs().enumerate().collect().await;
let outputs : Vec<(usize, BTreeMap<VarName, Value>)>
= monitor.monitor_outputs().take(3).enumerate().collect().await;
assert!(outputs.len() == 3);
assert_eq!(
outputs,
Expand Down

0 comments on commit a7b87eb

Please sign in to comment.