// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <cmath> #include "cast/streaming/impl/sender_report_builder.h" #include "cast/streaming/impl/sender_report_parser.h" #include "gtest/gtest.h" #include "platform/base/span.h" namespace openscreen::cast { namespace { constexpr Ssrc kSenderSsrc{ … }; constexpr Ssrc kReceiverSsrc{ … }; class SenderReportTest : public testing::Test { … }; // Tests that the compound RTCP packets containing a Sender Report alongside // zero or more other messages can be parsed successfully. TEST_F(SenderReportTest, Parsing) { … } // Tests that the SenderReportParser will not try to parse an empty packet. TEST_F(SenderReportTest, WillNotParseEmptyPacket) { … } // Tests that the SenderReportParser will not parse anything from garbage data. TEST_F(SenderReportTest, WillNotParseGarbage) { … } // Assuming that SenderReportTest.Parsing has been proven the implementation, // this test checks that the builder produces RTCP packets that can be parsed. TEST_F(SenderReportTest, BuildPackets) { … } TEST_F(SenderReportTest, ComputesTimePointsFromReportIds) { … } } // namespace } // namespace openscreen::cast