@@ -53,25 +53,19 @@ class AVInputTest : public ::testing::Test {
53
53
54
54
Core::ProxyType<Plugin::AVInput> plugin;
55
55
Core::ProxyType<Plugin::AVInputImplementation> AVInputImpl;
56
- // <pca> debug
57
- // Core::ProxyType<WorkerPoolImplementation> workerPool;
58
- // </pca>
56
+ Core::ProxyType<WorkerPoolImplementation> workerPool;
59
57
60
58
NiceMock<COMLinkMock> comLinkMock;
61
59
NiceMock<ServiceMock> service;
62
- // <pca>
63
- // NiceMock<FactoriesImplementation> factoriesImplementation;
64
- // </pca>
60
+ NiceMock<FactoriesImplementation> factoriesImplementation;
65
61
66
62
WrapsImplMock* p_wrapsImplMock = nullptr ;
67
63
ServiceMock* p_serviceMock = nullptr ;
68
64
AVInputMock* p_avInputMock = nullptr ;
69
65
HdmiInputImplMock* p_hdmiInputImplMock = nullptr ;
70
66
CompositeInputImplMock* p_compositeInputImplMock = nullptr ;
71
67
HostImplMock* p_HostImplMock = nullptr ;
72
- // <pca> debug
73
- // IarmBusImplMock* p_iarmBusImplMock = nullptr;
74
- // </pca>
68
+ IarmBusImplMock* p_iarmBusImplMock = nullptr ;
75
69
76
70
Exchange::IAVInput::IDevicesChangedNotification *OnDevicesChangedNotification = nullptr ;
77
71
Exchange::IAVInput::ISignalChangedNotification *OnSignalChangedNotification = nullptr ;
@@ -87,19 +81,12 @@ class AVInputTest : public ::testing::Test {
87
81
IARM_EventHandler_t dsAVVideoModeEventHandler;
88
82
IARM_EventHandler_t dsAviContentTypeEventHandler;
89
83
90
- // <pca> debug
91
- // AVInputTest()
92
- // : plugin(Core::ProxyType<Plugin::AVInput>::Create())
93
- // , handler(*(plugin))
94
- // , INIT_CONX(1, 0) , workerPool(Core::ProxyType<WorkerPoolImplementation>::Create(
95
- // 2, Core::Thread::DefaultStackSize(), 16))
96
- // {
97
84
AVInputTest ()
98
85
: plugin(Core::ProxyType<Plugin::AVInput>::Create())
99
86
, handler(*(plugin))
100
- , INIT_CONX(1 , 0 )
87
+ , INIT_CONX(1 , 0 ) , workerPool(Core::ProxyType<WorkerPoolImplementation>::Create(
88
+ 2 , Core::Thread::DefaultStackSize(), 16 ))
101
89
{
102
- // </pca>
103
90
printf (" *** _DEBUG: AVInputTest ctor: entry" );
104
91
105
92
p_serviceMock = new NiceMock <ServiceMock>;
@@ -108,18 +95,11 @@ class AVInputTest : public ::testing::Test {
108
95
109
96
Wraps::setImpl (p_wrapsImplMock);
110
97
111
- // <pca> debug
112
- // PluginHost::IFactories::Assign(&factoriesImplementation);
113
- // </pca>
98
+ PluginHost::IFactories::Assign (&factoriesImplementation);
114
99
115
- // <pca> debug
116
- // dispatcher = static_cast<PLUGINHOST_DISPATCHER*>(plugin->QueryInterface(PLUGINHOST_DISPATCHER_ID));
117
- // dispatcher->Activate(&service);
118
- // </pca>
100
+ dispatcher = static_cast <PLUGINHOST_DISPATCHER*>(plugin->QueryInterface (PLUGINHOST_DISPATCHER_ID));
101
+ dispatcher->Activate (&service);
119
102
120
- // <pca> debug
121
- #if 0
122
- // </pca>
123
103
ON_CALL (*p_avInputMock, Register (::testing::Matcher<Exchange::IAVInput::IDevicesChangedNotification*>(::testing::_)))
124
104
.WillByDefault (::testing::Invoke (
125
105
[&](Exchange::IAVInput::IDevicesChangedNotification *notification){
@@ -174,13 +154,6 @@ class AVInputTest : public ::testing::Test {
174
154
.WillByDefault (::testing::Return (AVInputImpl));
175
155
#endif
176
156
177
- // <pca> debug
178
- #endif
179
- // </pca>
180
-
181
- // <pca>
182
- #if 0
183
- // </pca>
184
157
p_iarmBusImplMock = new NiceMock<IarmBusImplMock>;
185
158
IarmBus::setImpl (p_iarmBusImplMock);
186
159
@@ -233,14 +206,9 @@ class AVInputTest : public ::testing::Test {
233
206
}
234
207
return IARM_RESULT_SUCCESS;
235
208
}));
236
- // <pca>
237
- #endif
238
- // </pca>
239
209
240
- // <pca> debug
241
- // Core::IWorkerPool::Assign(&(*workerPool));
242
- // workerPool->Run();
243
- // </pca>
210
+ Core::IWorkerPool::Assign (&(*workerPool));
211
+ workerPool->Run ();
244
212
245
213
plugin->Initialize (&service);
246
214
@@ -259,10 +227,8 @@ class AVInputTest : public ::testing::Test {
259
227
TEST_LOG (" *** _DEBUG: AVInputTest xtor" );
260
228
plugin->Deinitialize (&service);
261
229
262
- // <pca> debug
263
- // Core::IWorkerPool::Assign(nullptr);
264
- // workerPool.Release();
265
- // </pca>
230
+ Core::IWorkerPool::Assign (nullptr );
231
+ workerPool.Release ();
266
232
267
233
if (p_serviceMock != nullptr )
268
234
{
@@ -302,20 +268,16 @@ class AVInputTest : public ::testing::Test {
302
268
p_HostImplMock = nullptr ;
303
269
}
304
270
305
- // <pca> debug
306
- // dispatcher->Deactivate();
307
- // dispatcher->Release();
308
- // </pca>
271
+ dispatcher->Deactivate ();
272
+ dispatcher->Release ();
309
273
310
274
PluginHost::IFactories::Assign (nullptr );
311
275
312
- // <pca> debug
313
- // IarmBus::setImpl(nullptr);
314
- // if (p_iarmBusImplMock != nullptr) {
315
- // delete p_iarmBusImplMock;
316
- // p_iarmBusImplMock = nullptr;
317
- // }
318
- // </pca>
276
+ IarmBus::setImpl (nullptr );
277
+ if (p_iarmBusImplMock != nullptr ) {
278
+ delete p_iarmBusImplMock;
279
+ p_iarmBusImplMock = nullptr ;
280
+ }
319
281
}
320
282
};
321
283
@@ -325,28 +287,28 @@ class AVInputTest : public ::testing::Test {
325
287
TEST_F (AVInputTest, RegisteredMethods)
326
288
{
327
289
printf (" *** _DEBUG: TEST_F(AVInputTest, RegisteredMethods): entry" );
328
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("numberOfInputs")));
329
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("currentVideoMode")));
330
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("contentProtected")));
331
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setEdid2AllmSupport")));
332
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getEdid2AllmSupport")));
333
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setVRRSupport")));
334
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getVRRSupport")));
335
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getVRRFrameRate")));
336
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getInputDevices")));
337
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("writeEDID")));
338
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("readEDID")));
339
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getRawSPD")));
340
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getSPD")));
341
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setEdidVersion")));
342
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getEdidVersion")));
343
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getHdmiVersion")));
344
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setMixerLevels")));
345
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("startInput")));
346
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("stopInput")));
347
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("setVideoRectangle")));
348
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getSupportedGameFeatures")));
349
- // EXPECT_EQ(Core::ERROR_NONE, handler.Exists(_T("getGameFeatureStatus")));
290
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" numberOfInputs" )));
291
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" currentVideoMode" )));
292
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" contentProtected" )));
293
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" setEdid2AllmSupport" )));
294
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getEdid2AllmSupport" )));
295
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" setVRRSupport" )));
296
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getVRRSupport" )));
297
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getVRRFrameRate" )));
298
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getInputDevices" )));
299
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" writeEDID" )));
300
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" readEDID" )));
301
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getRawSPD" )));
302
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getSPD" )));
303
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" setEdidVersion" )));
304
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getEdidVersion" )));
305
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getHdmiVersion" )));
306
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" setMixerLevels" )));
307
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" startInput" )));
308
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" stopInput" )));
309
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" setVideoRectangle" )));
310
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getSupportedGameFeatures" )));
311
+ EXPECT_EQ (Core::ERROR_NONE, handler.Exists (_T (" getGameFeatureStatus" )));
350
312
}
351
313
352
314
TEST_F (AVInputTest, contentProtected)
@@ -362,7 +324,7 @@ TEST_F(AVInputTest, contentProtected)
362
324
// </pca>
363
325
364
326
// <pca> debug
365
- #if 0
327
+ #if 1
366
328
// </pca>
367
329
TEST_F (AVInputTest, numberOfInputs)
368
330
{
@@ -426,7 +388,7 @@ TEST_F(AVInputTest, getVRRFrameRate)
426
388
// </pca>
427
389
428
390
// <pca> debug
429
- #if 0
391
+ #if 1
430
392
// </pca>
431
393
TEST_F (AVInputTest, getInputDevices)
432
394
{
0 commit comments