@@ -1248,9 +1248,9 @@ mod tests {
12481248 // Create two separate blocks: 12-13 and 15-16
12491249 observe ( & mut d, now, & [ 12 , 13 , 15 , 16 ] ) ;
12501250 // Now fill the gap between them with 14. This should merge the blocks.
1251- // The current implementation of `add_additional_tsn` is buggy and will
1252- // result in `[12..14, 14..17]`.
12531251 observe ( & mut d, now, & [ 14 ] ) ;
1252+ assert_eq ! ( d. additional_tsn_blocks, vec![ Tsn ( 12 ) ..Tsn ( 17 ) ] ) ;
1253+
12541254 // Now receive 11, which should advance the cumulative ack over all blocks.
12551255 observe ( & mut d, now, & [ 11 ] ) ;
12561256
@@ -1268,21 +1268,20 @@ mod tests {
12681268 // Create two separate blocks: 13 and 15.
12691269 // State: additional_tsn_blocks = [13..14, 15..16]
12701270 observe ( & mut d, now, & [ 13 , 15 ] ) ;
1271+ assert_eq ! ( d. additional_tsn_blocks, vec![ Tsn ( 13 ) ..Tsn ( 14 ) , Tsn ( 15 ) ..Tsn ( 16 ) ] ) ;
12711272
12721273 // Fill the gap between them with 14.
1273- // This hits a bug in `add_additional_tsn` where expanding a block to the left
1274- // doesn't check if it can merge with the block before it, resulting in adjacent blocks.
1275- // State: additional_tsn_blocks = [13..14, 14..16]
12761274 observe ( & mut d, now, & [ 14 ] ) ;
1275+ assert_eq ! ( d. additional_tsn_blocks, vec![ Tsn ( 13 ) ..Tsn ( 16 ) ] ) ;
12771276
12781277 // Add 12, which expands the first block to the left.
1279- // State: additional_tsn_blocks = [12..14, 14..16]
12801278 observe ( & mut d, now, & [ 12 ] ) ;
1279+ assert_eq ! ( d. additional_tsn_blocks, vec![ Tsn ( 12 ) ..Tsn ( 16 ) ] ) ;
12811280
12821281 // Now receive 11, which should advance the cumulative ack over all blocks.
1283- // But `observe` only processes one block, leaving last_cumulative_acked_tsn
1284- // at 13 instead of 15.
12851282 observe ( & mut d, now, & [ 11 ] ) ;
1283+ assert_eq ! ( d. last_cumulative_acked_tsn, Tsn ( 15 ) ) ;
1284+ assert_eq ! ( d. additional_tsn_blocks, vec![ ] ) ;
12861285
12871286 let sack = d. create_selective_ack ( A_RWND ) ;
12881287 assert_eq ! ( sack. cumulative_tsn_ack, Tsn ( 15 ) ) ;
0 commit comments