Skip to content

Commit 1a7eadf

Browse files
committed
AVInput COM-RPC Support: WIP
1 parent b1afea0 commit 1a7eadf

File tree

1 file changed

+4
-97
lines changed

1 file changed

+4
-97
lines changed

Tests/L1Tests/tests/test_AVInput.cpp

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,6 @@ TEST_F(AVInputInit, writeEDID)
491491
EXPECT_EQ(response, string("{\"success\":true}"));
492492
}
493493

494-
TEST_F(AVInputInit, writeEDID_InvalidParameters)
495-
{
496-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("writeEDID"), _T("{}"), response));
497-
EXPECT_EQ(response, string(""));
498-
}
499-
500494
TEST_F(AVInputInit, readEDID)
501495
{
502496
EXPECT_CALL(*p_hdmiInputImplMock, getEDIDBytesInfo(::testing::_, ::testing::_))
@@ -509,27 +503,6 @@ TEST_F(AVInputInit, readEDID)
509503
EXPECT_EQ(response, string("{\"EDID\":\"AP\\/\\/\\/\\/\\/\\/\\/w==\",\"success\":true}"));
510504
}
511505

512-
TEST_F(AVInputInit, readEDIDFailure)
513-
{
514-
EXPECT_CALL(*p_hdmiInputImplMock, getEDIDBytesInfo(::testing::_, ::testing::_))
515-
.WillOnce([](int port, std::vector<uint8_t>& edid) {
516-
edid = {};
517-
});
518-
519-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("readEDID"), _T("{\"portId\": \"1\"}"), response));
520-
EXPECT_EQ(response, string(""));
521-
}
522-
523-
TEST_F(AVInputInit, readEDID_InvalidParameters)
524-
{
525-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("readEDID"), _T("{\"portId\": \"test\"}"), response));
526-
EXPECT_EQ(response, string(""));
527-
}
528-
529-
// <pca> debug
530-
#if 0
531-
// </pca>
532-
533506
TEST_F(AVInputInit, getRawSPD)
534507
{
535508
EXPECT_CALL(*p_hdmiInputImplMock, getHDMISPDInfo(::testing::_, ::testing::_))
@@ -541,12 +514,6 @@ TEST_F(AVInputInit, getRawSPD)
541514
EXPECT_EQ(response, string("{\"HDMISPD\":\"U1BEAA\",\"success\":true}"));
542515
}
543516

544-
TEST_F(AVInputInit, getRawSPD_InvalidParameters)
545-
{
546-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getRawSPD"), _T("{\"portId\": \"test\"}"), response));
547-
EXPECT_EQ(response, string(""));
548-
}
549-
550517
TEST_F(AVInputInit, getSPD)
551518
{
552519
EXPECT_CALL(*p_hdmiInputImplMock, getHDMISPDInfo(::testing::_, ::testing::_))
@@ -558,12 +525,6 @@ TEST_F(AVInputInit, getSPD)
558525
EXPECT_EQ(response, string("{\"HDMISPD\":\"Packet Type:53,Version:80,Length:68,vendor name:wn,product des:,source info:00\",\"success\":true}"));
559526
}
560527

561-
TEST_F(AVInputInit, getSPD_InvalidParameters)
562-
{
563-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getSPD"), _T("{\"portId\": \"test\"}"), response));
564-
EXPECT_EQ(response, string(""));
565-
}
566-
567528
TEST_F(AVInputInit, setEdidVersion)
568529
{
569530
EXPECT_CALL(*p_hdmiInputImplMock, setEdidVersion(::testing::_, ::testing::_))
@@ -576,12 +537,6 @@ TEST_F(AVInputInit, setEdidVersion)
576537
EXPECT_EQ(response, string("{\"success\":true}"));
577538
}
578539

579-
TEST_F(AVInputInit, setEdidVersion_InvalidParameters)
580-
{
581-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("setEdidVersion"), _T("{\"portId\": \"test\", \"edidVersion\":\"test\"}"), response));
582-
EXPECT_EQ(response, string(""));
583-
}
584-
585540
TEST_F(AVInputInit, getEdidVersion1)
586541
{
587542
EXPECT_CALL(*p_hdmiInputImplMock, getEdidVersion(::testing::_, ::testing::_))
@@ -606,12 +561,6 @@ TEST_F(AVInputInit, getEdidVersion2)
606561
EXPECT_EQ(response, string("{\"edidVersion\":\"HDMI2.0\",\"success\":true}"));
607562
}
608563

609-
TEST_F(AVInputInit, getEdidVersion_InvalidParameters)
610-
{
611-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getEdidVersion"), _T("{\"portId\": \"test\"}}"), response));
612-
EXPECT_EQ(response, string(""));
613-
}
614-
615564
TEST_F(AVInputInit, getHdmiVersion)
616565
{
617566
EXPECT_CALL(*p_hdmiInputImplMock, getHdmiVersion(::testing::_, ::testing::_))
@@ -625,12 +574,6 @@ TEST_F(AVInputInit, getHdmiVersion)
625574
EXPECT_EQ(response, string("{\"HdmiCapabilityVersion\":\"2.1\",\"success\":true}"));
626575
}
627576

628-
TEST_F(AVInputInit, getHdmiVersion_InvalidParameters)
629-
{
630-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getHdmiVersion"), _T("{\"portId\": \"test\"}"), response));
631-
EXPECT_EQ(response, string(""));
632-
}
633-
634577
TEST_F(AVInputInit, setMixerLevels)
635578
{
636579
EXPECT_CALL(*p_HostImplMock, setAudioMixerLevels(dsAUDIO_INPUT_PRIMARY, ::testing::_))
@@ -649,12 +592,6 @@ TEST_F(AVInputInit, setMixerLevels)
649592
EXPECT_EQ(response, string("{\"success\":true}"));
650593
}
651594

652-
TEST_F(AVInputInit, setMixerLevelsErrorCase)
653-
{
654-
EXPECT_EQ(Core::ERROR_NONE, handler.Invoke(connection, _T("setMixerLevels"), _T("{\"primaryVolume\": 110 ,\"inputVolume\":110}"), response));
655-
EXPECT_EQ(response, string("{\"success\":true}"));
656-
}
657-
658595
TEST_F(AVInputInit, startInput_HDMI)
659596
{
660597
EXPECT_CALL(*p_hdmiInputImplMock, selectPort(::testing::_, ::testing::_, ::testing::_, ::testing::_))
@@ -680,12 +617,6 @@ TEST_F(AVInputInit, startInput_COMPOSITE)
680617
EXPECT_EQ(response, string("{\"success\":true}"));
681618
}
682619

683-
TEST_F(AVInputInit, startInput_InvalidParameters)
684-
{
685-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("startInput"), _T("{\"portId\": \"test\" ,\"typeOfInput\":\"HDMI\", \"requestAudioMix\": true, \"plane\" : 1, \"topMost\" : true}"), response));
686-
EXPECT_EQ(response, string(""));
687-
}
688-
689620
TEST_F(AVInputInit, stopInput_HDMI)
690621
{
691622
EXPECT_CALL(*p_hdmiInputImplMock, selectPort(::testing::_, ::testing::_, ::testing::_, ::testing::_))
@@ -708,12 +639,6 @@ TEST_F(AVInputInit, stopInput_COMPOSITE)
708639
EXPECT_EQ(response, string("{\"success\":true}"));
709640
}
710641

711-
TEST_F(AVInputInit, stopInput_COMPOSITE_InvalidParameters)
712-
{
713-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("stopInput"), _T("{\"typeOfInput\":\"DP\"}"), response));
714-
EXPECT_EQ(response, string(""));
715-
}
716-
717642
TEST_F(AVInputInit, setVideoRectangle_HDMI)
718643
{
719644
EXPECT_CALL(*p_hdmiInputImplMock, scaleVideo(::testing::_, ::testing::_, ::testing::_, ::testing::_))
@@ -742,12 +667,6 @@ TEST_F(AVInputInit, setVideoRectangle_COMPOSITE)
742667
EXPECT_EQ(response, string("{\"success\":true}"));
743668
}
744669

745-
TEST_F(AVInputInit, setVideoRectangle_InvalidParameters)
746-
{
747-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("setVideoRectangle"), _T("{\"x\" : 0, \"y\" : 0, \"w\" : 720, \"h\" : 480 ,\"typeOfInput\":\"DP\"}"), response));
748-
EXPECT_EQ(response, string(""));
749-
}
750-
751670
TEST_F(AVInputInit, getSupportedGameFeatures)
752671
{
753672
EXPECT_CALL(*p_hdmiInputImplMock, getSupportedGameFeatures(::testing::_))
@@ -759,17 +678,6 @@ TEST_F(AVInputInit, getSupportedGameFeatures)
759678
EXPECT_EQ(response, string("{\"supportedGameFeatures\":[\"ALLM\",\"VRR\",\"QMS\"],\"success\":true}"));
760679
}
761680

762-
TEST_F(AVInputInit, getSupportedGameFeatures_ErrorCase)
763-
{
764-
EXPECT_CALL(*p_hdmiInputImplMock, getSupportedGameFeatures(::testing::_))
765-
.WillOnce([](std::vector<std::string>& featureList) {
766-
featureList = {};
767-
});
768-
769-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getSupportedGameFeatures"), _T("{}"), response));
770-
EXPECT_EQ(response, string(""));
771-
}
772-
773681
TEST_F(AVInputInit, getGameFeatureStatus_ALLM)
774682
{
775683
EXPECT_CALL(*p_hdmiInputImplMock, getHdmiALLMStatus(::testing::_, ::testing::_))
@@ -834,11 +742,10 @@ TEST_F(AVInputInit, getGameFeatureStatus_VRR_FREESYNC_PREMIUM_PRO)
834742
EXPECT_EQ(response, string("{\"mode\":true,\"success\":true}"));
835743
}
836744

837-
TEST_F(AVInputInit, getGameFeatureStatus_InvalidParameters)
838-
{
839-
EXPECT_EQ(Core::ERROR_GENERAL, handler.Invoke(connection, _T("getGameFeatureStatus"), _T("{\"portId\" : \"test\", \"gameFeature\" : \"VRR-FREESYNC-PREMIUM-PRO\"}"), response));
840-
EXPECT_EQ(response, string(""));
841-
}
745+
746+
// <pca> debug
747+
#if 0
748+
// </pca>
842749

843750
TEST_F(AVInputInit, onDevicesChangedHDMI)
844751
{

0 commit comments

Comments
 (0)