mediasoup 3.20.7 → 3.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/node/lib/WebRtcServer.d.ts.map +1 -1
- package/node/lib/WebRtcServer.js +0 -7
- package/node/lib/WebRtcServerTypes.d.ts +0 -5
- package/node/lib/WebRtcServerTypes.d.ts.map +1 -1
- package/node/lib/fbs/web-rtc-server/dump-response.d.ts +2 -9
- package/node/lib/fbs/web-rtc-server/dump-response.d.ts.map +1 -1
- package/node/lib/fbs/web-rtc-server/dump-response.js +5 -33
- package/node/lib/fbs/web-rtc-server.d.ts +0 -1
- package/node/lib/fbs/web-rtc-server.d.ts.map +1 -1
- package/node/lib/fbs/web-rtc-server.js +1 -4
- package/node/lib/test/test-WebRtcServer.js +0 -7
- package/npm-scripts.mjs +132 -55
- package/package.json +6 -4
- package/worker/fbs/webRtcServer.fbs +0 -6
- package/worker/include/RTC/TransportTuple.hpp +70 -14
- package/worker/include/RTC/WebRtcServer.hpp +5 -2
- package/worker/include/Utils.hpp +6 -0
- package/worker/src/RTC/PortManager.cpp +16 -20
- package/worker/src/RTC/SeqManager.cpp +4 -1
- package/worker/src/RTC/SimpleProducerStreamManager.cpp +6 -3
- package/worker/src/RTC/TransportTuple.cpp +87 -50
- package/worker/src/RTC/WebRtcServer.cpp +20 -29
- package/worker/test/src/RTC/TestSeqManager.cpp +167 -62
- package/worker/test/src/RTC/TestTransportTuple.cpp +21 -14
- package/node/lib/fbs/consumer/degrade-request.d.ts +0 -30
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +0 -1
- package/node/lib/fbs/consumer/degrade-request.js +0 -124
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +0 -24
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +0 -1
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +0 -102
- package/node/lib/fbs/lib-uring/dump.d.ts +0 -27
- package/node/lib/fbs/lib-uring/dump.d.ts.map +0 -1
- package/node/lib/fbs/lib-uring/dump.js +0 -113
- package/node/lib/fbs/lib-uring.d.ts +0 -2
- package/node/lib/fbs/lib-uring.d.ts.map +0 -1
- package/node/lib/fbs/lib-uring.js +0 -8
- package/node/lib/fbs/producer/degrade-request.d.ts +0 -30
- package/node/lib/fbs/producer/degrade-request.d.ts.map +0 -1
- package/node/lib/fbs/producer/degrade-request.js +0 -124
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts +0 -24
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +0 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +0 -102
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +0 -24
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +0 -1
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +0 -102
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +0 -24
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +0 -1
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +0 -102
- package/node/lib/fbs/web-rtc-server/tuple-hash.d.ts +0 -25
- package/node/lib/fbs/web-rtc-server/tuple-hash.d.ts.map +0 -1
- package/node/lib/fbs/web-rtc-server/tuple-hash.js +0 -104
- package/node/lib/fbs/worker/close-notification.d.ts +0 -18
- package/node/lib/fbs/worker/close-notification.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-notification.js +0 -78
- package/node/lib/fbs/worker/close-request.d.ts +0 -18
- package/node/lib/fbs/worker/close-request.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-request.js +0 -78
- package/node/lib/fbs/worker/close-worker-notification.d.ts +0 -18
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-worker-notification.js +0 -78
|
@@ -97,8 +97,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
97
97
|
// clang-format on
|
|
98
98
|
|
|
99
99
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
100
|
+
|
|
100
101
|
REQUIRE(result.first == result.second);
|
|
102
|
+
|
|
101
103
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
104
|
+
|
|
102
105
|
REQUIRE(result.first == result.second);
|
|
103
106
|
}
|
|
104
107
|
|
|
@@ -119,8 +122,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
119
122
|
// clang-format on
|
|
120
123
|
|
|
121
124
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
125
|
+
|
|
122
126
|
REQUIRE(result.first == result.second);
|
|
127
|
+
|
|
123
128
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
129
|
+
|
|
124
130
|
REQUIRE(result.first == result.second);
|
|
125
131
|
}
|
|
126
132
|
|
|
@@ -146,8 +152,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
146
152
|
// clang-format on
|
|
147
153
|
|
|
148
154
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
155
|
+
|
|
149
156
|
REQUIRE(result.first == result.second);
|
|
157
|
+
|
|
150
158
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
159
|
+
|
|
151
160
|
REQUIRE(result.first == result.second);
|
|
152
161
|
}
|
|
153
162
|
|
|
@@ -165,6 +174,7 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
165
174
|
// clang-format on
|
|
166
175
|
|
|
167
176
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
177
|
+
|
|
168
178
|
REQUIRE(result.first == result.second);
|
|
169
179
|
}
|
|
170
180
|
|
|
@@ -181,8 +191,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
181
191
|
// clang-format on
|
|
182
192
|
|
|
183
193
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
194
|
+
|
|
184
195
|
REQUIRE(result.first == result.second);
|
|
196
|
+
|
|
185
197
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
198
|
+
|
|
186
199
|
REQUIRE(result.first == result.second);
|
|
187
200
|
}
|
|
188
201
|
|
|
@@ -197,7 +210,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
197
210
|
};
|
|
198
211
|
// clang-format on
|
|
199
212
|
|
|
200
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
213
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
214
|
+
|
|
201
215
|
REQUIRE(result.first == result.second);
|
|
202
216
|
}
|
|
203
217
|
|
|
@@ -216,8 +230,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
216
230
|
// clang-format on
|
|
217
231
|
|
|
218
232
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
233
|
+
|
|
219
234
|
REQUIRE(result.first == result.second);
|
|
235
|
+
|
|
220
236
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
237
|
+
|
|
221
238
|
REQUIRE(result.first == result.second);
|
|
222
239
|
}
|
|
223
240
|
|
|
@@ -235,8 +252,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
235
252
|
// clang-format on
|
|
236
253
|
|
|
237
254
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
255
|
+
|
|
238
256
|
REQUIRE(result.first == result.second);
|
|
257
|
+
|
|
239
258
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
259
|
+
|
|
240
260
|
REQUIRE(result.first == result.second);
|
|
241
261
|
}
|
|
242
262
|
|
|
@@ -254,8 +274,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
254
274
|
// clang-format on
|
|
255
275
|
|
|
256
276
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
277
|
+
|
|
257
278
|
REQUIRE(result.first == result.second);
|
|
279
|
+
|
|
258
280
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
281
|
+
|
|
259
282
|
REQUIRE(result.first == result.second);
|
|
260
283
|
}
|
|
261
284
|
|
|
@@ -314,6 +337,7 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
314
337
|
// clang-format on
|
|
315
338
|
|
|
316
339
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
340
|
+
|
|
317
341
|
REQUIRE(result.first == result.second);
|
|
318
342
|
}
|
|
319
343
|
|
|
@@ -334,9 +358,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
334
358
|
// clang-format on
|
|
335
359
|
|
|
336
360
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
361
|
+
|
|
337
362
|
REQUIRE(result.first == result.second);
|
|
338
363
|
|
|
339
364
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
365
|
+
|
|
340
366
|
REQUIRE(result.first == result.second);
|
|
341
367
|
}
|
|
342
368
|
|
|
@@ -378,9 +404,11 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
378
404
|
// clang-format on
|
|
379
405
|
|
|
380
406
|
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
407
|
+
|
|
381
408
|
REQUIRE(result.first == result.second);
|
|
382
409
|
|
|
383
410
|
result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
411
|
+
|
|
384
412
|
REQUIRE(result.first == result.second);
|
|
385
413
|
}
|
|
386
414
|
|
|
@@ -421,7 +449,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
421
449
|
};
|
|
422
450
|
// clang-format on
|
|
423
451
|
|
|
424
|
-
auto result = validate(RTC::SeqManager<uint8_t>{}, inputs);
|
|
452
|
+
const auto result = validate(RTC::SeqManager<uint8_t>{}, inputs);
|
|
453
|
+
|
|
425
454
|
REQUIRE(result.first == result.second);
|
|
426
455
|
}
|
|
427
456
|
|
|
@@ -479,7 +508,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
479
508
|
};
|
|
480
509
|
// clang-format on
|
|
481
510
|
|
|
482
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
511
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
512
|
+
|
|
483
513
|
REQUIRE(result.first == result.second);
|
|
484
514
|
}
|
|
485
515
|
|
|
@@ -513,7 +543,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
513
543
|
};
|
|
514
544
|
// clang-format on
|
|
515
545
|
|
|
516
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
546
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
547
|
+
|
|
517
548
|
REQUIRE(result.first == result.second);
|
|
518
549
|
}
|
|
519
550
|
|
|
@@ -535,7 +566,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
535
566
|
};
|
|
536
567
|
// clang-format on
|
|
537
568
|
|
|
538
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
569
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
570
|
+
|
|
539
571
|
REQUIRE(result.first == result.second);
|
|
540
572
|
}
|
|
541
573
|
|
|
@@ -569,7 +601,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
569
601
|
};
|
|
570
602
|
// clang-format on
|
|
571
603
|
|
|
572
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
604
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
605
|
+
|
|
573
606
|
REQUIRE(result.first == result.second);
|
|
574
607
|
}
|
|
575
608
|
|
|
@@ -591,7 +624,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
591
624
|
};
|
|
592
625
|
// clang-format on
|
|
593
626
|
|
|
594
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
627
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
628
|
+
|
|
595
629
|
REQUIRE(result.first == result.second);
|
|
596
630
|
}
|
|
597
631
|
|
|
@@ -610,7 +644,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
610
644
|
}
|
|
611
645
|
// clang-format on
|
|
612
646
|
|
|
613
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
647
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
648
|
+
|
|
614
649
|
REQUIRE(result.first == result.second);
|
|
615
650
|
}
|
|
616
651
|
|
|
@@ -629,7 +664,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
629
664
|
}
|
|
630
665
|
// clang-format on
|
|
631
666
|
|
|
632
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
667
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
668
|
+
|
|
633
669
|
REQUIRE(result.first == result.second);
|
|
634
670
|
}
|
|
635
671
|
|
|
@@ -648,7 +684,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
648
684
|
};
|
|
649
685
|
// clang-format on
|
|
650
686
|
|
|
651
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
687
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{}, inputs);
|
|
688
|
+
|
|
652
689
|
REQUIRE(result.first == result.second);
|
|
653
690
|
}
|
|
654
691
|
|
|
@@ -671,7 +708,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
671
708
|
};
|
|
672
709
|
// clang-format on
|
|
673
710
|
|
|
674
|
-
auto result = validate(RTC::SeqManager<uint8_t, 3>{}, inputs);
|
|
711
|
+
const auto result = validate(RTC::SeqManager<uint8_t, 3>{}, inputs);
|
|
712
|
+
|
|
675
713
|
REQUIRE(result.first == result.second);
|
|
676
714
|
}
|
|
677
715
|
|
|
@@ -710,7 +748,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
710
748
|
};
|
|
711
749
|
// clang-format on
|
|
712
750
|
|
|
713
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
751
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
752
|
+
|
|
714
753
|
REQUIRE(result.first == result.second);
|
|
715
754
|
}
|
|
716
755
|
|
|
@@ -729,7 +768,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
729
768
|
};
|
|
730
769
|
// clang-format on
|
|
731
770
|
|
|
732
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
771
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
772
|
+
|
|
733
773
|
REQUIRE(result.first == result.second);
|
|
734
774
|
}
|
|
735
775
|
|
|
@@ -744,7 +784,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
744
784
|
};
|
|
745
785
|
// clang-format on
|
|
746
786
|
|
|
747
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
787
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
788
|
+
|
|
748
789
|
REQUIRE(result.first == result.second);
|
|
749
790
|
}
|
|
750
791
|
|
|
@@ -768,10 +809,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
768
809
|
};
|
|
769
810
|
// clang-format on
|
|
770
811
|
|
|
771
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
812
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
813
|
+
|
|
772
814
|
REQUIRE(result.first == result.second);
|
|
773
815
|
|
|
774
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
816
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 1000 }, inputs);
|
|
817
|
+
|
|
775
818
|
REQUIRE(result.first == result.second);
|
|
776
819
|
}
|
|
777
820
|
|
|
@@ -791,10 +834,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
791
834
|
};
|
|
792
835
|
// clang-format on
|
|
793
836
|
|
|
794
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
837
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 2000 }, inputs);
|
|
838
|
+
|
|
795
839
|
REQUIRE(result.first == result.second);
|
|
796
840
|
|
|
797
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
841
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 2000 }, inputs);
|
|
842
|
+
|
|
798
843
|
REQUIRE(result.first == result.second);
|
|
799
844
|
}
|
|
800
845
|
|
|
@@ -819,10 +864,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
819
864
|
};
|
|
820
865
|
// clang-format on
|
|
821
866
|
|
|
822
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
867
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 3000 }, inputs);
|
|
868
|
+
|
|
823
869
|
REQUIRE(result.first == result.second);
|
|
824
870
|
|
|
825
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
871
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 3000 }, inputs);
|
|
872
|
+
|
|
826
873
|
REQUIRE(result.first == result.second);
|
|
827
874
|
}
|
|
828
875
|
|
|
@@ -839,7 +886,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
839
886
|
};
|
|
840
887
|
// clang-format on
|
|
841
888
|
|
|
842
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
889
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
890
|
+
|
|
843
891
|
REQUIRE(result.first == result.second);
|
|
844
892
|
}
|
|
845
893
|
|
|
@@ -855,7 +903,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
855
903
|
};
|
|
856
904
|
// clang-format on
|
|
857
905
|
|
|
858
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
906
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 32000 }, inputs1);
|
|
907
|
+
|
|
859
908
|
REQUIRE(result.first == result.second);
|
|
860
909
|
|
|
861
910
|
// clang-format off
|
|
@@ -868,7 +917,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
868
917
|
};
|
|
869
918
|
// clang-format on
|
|
870
919
|
|
|
871
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
920
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 32000 }, inputs2);
|
|
921
|
+
|
|
872
922
|
REQUIRE(result.first == result.second);
|
|
873
923
|
}
|
|
874
924
|
|
|
@@ -883,7 +933,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
883
933
|
};
|
|
884
934
|
// clang-format on
|
|
885
935
|
|
|
886
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
936
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
937
|
+
|
|
887
938
|
REQUIRE(result.first == result.second);
|
|
888
939
|
}
|
|
889
940
|
|
|
@@ -901,10 +952,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
901
952
|
};
|
|
902
953
|
// clang-format on
|
|
903
954
|
|
|
904
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
955
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
956
|
+
|
|
905
957
|
REQUIRE(result.first == result.second);
|
|
906
958
|
|
|
907
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
959
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 1000 }, inputs);
|
|
960
|
+
|
|
908
961
|
REQUIRE(result.first == result.second);
|
|
909
962
|
}
|
|
910
963
|
|
|
@@ -921,10 +974,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
921
974
|
};
|
|
922
975
|
// clang-format on
|
|
923
976
|
|
|
924
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
977
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 2000 }, inputs);
|
|
978
|
+
|
|
925
979
|
REQUIRE(result.first == result.second);
|
|
926
980
|
|
|
927
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
981
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 2000 }, inputs);
|
|
982
|
+
|
|
928
983
|
REQUIRE(result.first == result.second);
|
|
929
984
|
}
|
|
930
985
|
|
|
@@ -941,10 +996,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
941
996
|
};
|
|
942
997
|
// clang-format on
|
|
943
998
|
|
|
944
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
999
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 2000 }, inputs);
|
|
1000
|
+
|
|
945
1001
|
REQUIRE(result.first == result.second);
|
|
946
1002
|
|
|
947
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1003
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 2000 }, inputs);
|
|
1004
|
+
|
|
948
1005
|
REQUIRE(result.first == result.second);
|
|
949
1006
|
}
|
|
950
1007
|
|
|
@@ -1002,7 +1059,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1002
1059
|
};
|
|
1003
1060
|
// clang-format on
|
|
1004
1061
|
|
|
1005
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1062
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 10000 }, inputs);
|
|
1063
|
+
|
|
1006
1064
|
REQUIRE(result.first == result.second);
|
|
1007
1065
|
}
|
|
1008
1066
|
|
|
@@ -1022,10 +1080,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1022
1080
|
};
|
|
1023
1081
|
// clang-format on
|
|
1024
1082
|
|
|
1025
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1083
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1 }, inputs);
|
|
1084
|
+
|
|
1026
1085
|
REQUIRE(result.first == result.second);
|
|
1027
1086
|
|
|
1028
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1087
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 1 }, inputs);
|
|
1088
|
+
|
|
1029
1089
|
REQUIRE(result.first == result.second);
|
|
1030
1090
|
}
|
|
1031
1091
|
|
|
@@ -1066,10 +1126,12 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1066
1126
|
};
|
|
1067
1127
|
// clang-format on
|
|
1068
1128
|
|
|
1069
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1129
|
+
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
1130
|
+
|
|
1070
1131
|
REQUIRE(result.first == result.second);
|
|
1071
1132
|
|
|
1072
|
-
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1133
|
+
result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 1000 }, inputs);
|
|
1134
|
+
|
|
1073
1135
|
REQUIRE(result.first == result.second);
|
|
1074
1136
|
}
|
|
1075
1137
|
|
|
@@ -1110,7 +1172,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1110
1172
|
};
|
|
1111
1173
|
// clang-format on
|
|
1112
1174
|
|
|
1113
|
-
auto result = validate(RTC::SeqManager<uint8_t>{ /*initialOutput*/
|
|
1175
|
+
const auto result = validate(RTC::SeqManager<uint8_t>{ /*initialOutput*/ 200 }, inputs);
|
|
1176
|
+
|
|
1114
1177
|
REQUIRE(result.first == result.second);
|
|
1115
1178
|
}
|
|
1116
1179
|
|
|
@@ -1168,7 +1231,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1168
1231
|
};
|
|
1169
1232
|
// clang-format on
|
|
1170
1233
|
|
|
1171
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1234
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 100 }, inputs);
|
|
1235
|
+
|
|
1172
1236
|
REQUIRE(result.first == result.second);
|
|
1173
1237
|
}
|
|
1174
1238
|
|
|
@@ -1202,7 +1266,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1202
1266
|
};
|
|
1203
1267
|
// clang-format on
|
|
1204
1268
|
|
|
1205
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1269
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 200 }, inputs);
|
|
1270
|
+
|
|
1206
1271
|
REQUIRE(result.first == result.second);
|
|
1207
1272
|
}
|
|
1208
1273
|
|
|
@@ -1224,7 +1289,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1224
1289
|
};
|
|
1225
1290
|
// clang-format on
|
|
1226
1291
|
|
|
1227
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1292
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 200 }, inputs);
|
|
1293
|
+
|
|
1228
1294
|
REQUIRE(result.first == result.second);
|
|
1229
1295
|
}
|
|
1230
1296
|
|
|
@@ -1259,7 +1325,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1259
1325
|
};
|
|
1260
1326
|
// clang-format on
|
|
1261
1327
|
|
|
1262
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1328
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 100 }, inputs);
|
|
1329
|
+
|
|
1263
1330
|
REQUIRE(result.first == result.second);
|
|
1264
1331
|
}
|
|
1265
1332
|
|
|
@@ -1281,7 +1348,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1281
1348
|
};
|
|
1282
1349
|
// clang-format on
|
|
1283
1350
|
|
|
1284
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1351
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 100 }, inputs);
|
|
1352
|
+
|
|
1285
1353
|
REQUIRE(result.first == result.second);
|
|
1286
1354
|
}
|
|
1287
1355
|
|
|
@@ -1290,17 +1358,21 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1290
1358
|
// clang-format off
|
|
1291
1359
|
std::vector<TestSeqManagerInput<uint16_t>> inputs =
|
|
1292
1360
|
{
|
|
1293
|
-
{ 0, 101, true, false, 0 }
|
|
1361
|
+
{ 0, 101, true, false, 0 }
|
|
1294
1362
|
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1363
|
+
// clang-format on
|
|
1364
|
+
|
|
1365
|
+
for (uint16_t j = 0; j < 3; ++j)
|
|
1366
|
+
{
|
|
1367
|
+
for (uint16_t i = 1; i < std::numeric_limits<uint16_t>::max(); ++i)
|
|
1368
|
+
{
|
|
1297
1369
|
const uint16_t output = (i + 1 + 100) & std::numeric_limits<uint16_t>::max();
|
|
1298
|
-
inputs.emplace_back(
|
|
1370
|
+
inputs.emplace_back(i, output, false, false, i);
|
|
1299
1371
|
}
|
|
1300
1372
|
}
|
|
1301
|
-
// clang-format on
|
|
1302
1373
|
|
|
1303
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1374
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 100 }, inputs);
|
|
1375
|
+
|
|
1304
1376
|
REQUIRE(result.first == result.second);
|
|
1305
1377
|
}
|
|
1306
1378
|
|
|
@@ -1309,17 +1381,22 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1309
1381
|
// clang-format off
|
|
1310
1382
|
std::vector<TestSeqManagerInput<uint16_t>> inputs =
|
|
1311
1383
|
{
|
|
1312
|
-
{ 0, 101, true, false, 0, }
|
|
1384
|
+
{ 0, 101, true, false, 0, }
|
|
1313
1385
|
};
|
|
1314
|
-
|
|
1315
|
-
|
|
1386
|
+
// clang-format on
|
|
1387
|
+
|
|
1388
|
+
for (uint16_t j = 0; j < 3; ++j)
|
|
1389
|
+
{
|
|
1390
|
+
for (uint16_t i = 1; i < MaxNumberFor15Bits; ++i)
|
|
1391
|
+
{
|
|
1316
1392
|
const uint16_t output = (i + 1 + 100) & MaxNumberFor15Bits;
|
|
1317
|
-
|
|
1393
|
+
|
|
1394
|
+
inputs.emplace_back(i, output, false, false, i);
|
|
1318
1395
|
}
|
|
1319
1396
|
}
|
|
1320
|
-
// clang-format on
|
|
1321
1397
|
|
|
1322
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1398
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 100 }, inputs);
|
|
1399
|
+
|
|
1323
1400
|
REQUIRE(result.first == result.second);
|
|
1324
1401
|
}
|
|
1325
1402
|
|
|
@@ -1339,7 +1416,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1339
1416
|
};
|
|
1340
1417
|
// clang-format on
|
|
1341
1418
|
|
|
1342
|
-
auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/
|
|
1419
|
+
const auto result = validate(RTC::SeqManager<uint16_t, 15>{ /*initialOutput*/ 10000 }, inputs);
|
|
1420
|
+
|
|
1343
1421
|
REQUIRE(result.first == result.second);
|
|
1344
1422
|
}
|
|
1345
1423
|
|
|
@@ -1362,7 +1440,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1362
1440
|
};
|
|
1363
1441
|
// clang-format on
|
|
1364
1442
|
|
|
1365
|
-
auto result = validate(RTC::SeqManager<uint8_t, 3>{ /*initialOutput*/
|
|
1443
|
+
const auto result = validate(RTC::SeqManager<uint8_t, 3>{ /*initialOutput*/ 2 }, inputs);
|
|
1444
|
+
|
|
1366
1445
|
REQUIRE(result.first == result.second);
|
|
1367
1446
|
}
|
|
1368
1447
|
|
|
@@ -1401,7 +1480,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1401
1480
|
};
|
|
1402
1481
|
// clang-format on
|
|
1403
1482
|
|
|
1404
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1483
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 10000 }, inputs);
|
|
1484
|
+
|
|
1405
1485
|
REQUIRE(result.first == result.second);
|
|
1406
1486
|
}
|
|
1407
1487
|
|
|
@@ -1420,7 +1500,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1420
1500
|
};
|
|
1421
1501
|
// clang-format on
|
|
1422
1502
|
|
|
1423
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1503
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 100 }, inputs);
|
|
1504
|
+
|
|
1424
1505
|
REQUIRE(result.first == result.second);
|
|
1425
1506
|
}
|
|
1426
1507
|
|
|
@@ -1435,7 +1516,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1435
1516
|
};
|
|
1436
1517
|
// clang-format on
|
|
1437
1518
|
|
|
1438
|
-
auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/
|
|
1519
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{ /*initialOutput*/ 1000 }, inputs);
|
|
1520
|
+
|
|
1439
1521
|
REQUIRE(result.first == result.second);
|
|
1440
1522
|
}
|
|
1441
1523
|
|
|
@@ -1452,7 +1534,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1452
1534
|
};
|
|
1453
1535
|
// clang-format on
|
|
1454
1536
|
|
|
1455
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1537
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1538
|
+
|
|
1456
1539
|
REQUIRE(result.first == result.second);
|
|
1457
1540
|
}
|
|
1458
1541
|
|
|
@@ -1475,7 +1558,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1475
1558
|
};
|
|
1476
1559
|
// clang-format on
|
|
1477
1560
|
|
|
1478
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1561
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1562
|
+
|
|
1479
1563
|
REQUIRE(result.first == result.second);
|
|
1480
1564
|
}
|
|
1481
1565
|
|
|
@@ -1497,7 +1581,8 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1497
1581
|
};
|
|
1498
1582
|
// clang-format on
|
|
1499
1583
|
|
|
1500
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1584
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1585
|
+
|
|
1501
1586
|
REQUIRE(result.first == result.second);
|
|
1502
1587
|
}
|
|
1503
1588
|
|
|
@@ -1573,7 +1658,27 @@ SCENARIO("SeqManager", "[seqmanager]")
|
|
|
1573
1658
|
};
|
|
1574
1659
|
// clang-format on
|
|
1575
1660
|
|
|
1576
|
-
auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1661
|
+
const auto result = validate(RTC::SeqManager<uint16_t>{}, inputs);
|
|
1662
|
+
|
|
1577
1663
|
REQUIRE(result.first == result.second);
|
|
1578
1664
|
}
|
|
1665
|
+
|
|
1666
|
+
SECTION("GetMaxOutput() returns the real max output (with initial output)")
|
|
1667
|
+
{
|
|
1668
|
+
RTC::SeqManager<uint16_t> seqManager(/*initialOutput*/ 1000);
|
|
1669
|
+
uint16_t output;
|
|
1670
|
+
|
|
1671
|
+
seqManager.Input(100, output);
|
|
1672
|
+
|
|
1673
|
+
// Output must be 100 + initialOutput (1000) = 1100.
|
|
1674
|
+
REQUIRE(output == 1100);
|
|
1675
|
+
// GetMaxOutput() must report the same value as the last (and highest)
|
|
1676
|
+
// output.
|
|
1677
|
+
REQUIRE(seqManager.GetMaxOutput() == 1100);
|
|
1678
|
+
|
|
1679
|
+
seqManager.Input(101, output);
|
|
1680
|
+
|
|
1681
|
+
REQUIRE(output == 1101);
|
|
1682
|
+
REQUIRE(seqManager.GetMaxOutput() == 1101);
|
|
1683
|
+
}
|
|
1579
1684
|
}
|