protected:
static tdm_client *client;
static tdm_client_voutput *voutput;
- const int MODE_COUNT = 1;
+ const int MODE_COUNT = 2;
private:
static pid_t server_pid;
for (i = 0; i < count; i++)
{
- modes[i].mmHeight = 1234;
- modes[i].mmWidth = 1234;
- modes[i].mode_count = 0;
- modes[i].prop_count = 0;
- modes[i].subpixel = 0;
- snprintf(modes[i].name, TDM_NAME_LEN, "TestModeSetting");
+ modes[i].clock = 1;
+ modes[i].hdisplay = 2;
+ modes[i].hsync_start = 3;
+ modes[i].hsync_end = 4;
+ modes[i].htotal = 5;
+ modes[i].hskew = 6;
+ modes[i].vdisplay = 7;
+ modes[i].vsync_start = 8;
+ modes[i].vsync_end = 9;
+ modes[i].vtotal = 10;
+ modes[i].vscan = 11;
+ modes[i].vrefresh = 12;
+ modes[i].flags = 13;
+ modes[i].type = 14;
+ snprintf(modes[i].name, TDM_NAME_LEN, "TestModeSetting %d", i);
}
ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
ret = tdm_client_voutput_set_available_modes(this->voutput, NULL, count);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
-
- ret = tdm_client_voutput_set_available_modes(this->voutput, modes, 0);
- ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
}
TEST_F(TDMVirtualOutput, SetPhysicalSize)
ASSERT_NE(output, NULL);
}
+TEST_F(TDMVirtualOutput, Connect)
+{
+ tdm_error ret;
+ tdm_client_output *output;
+
+ output = tdm_client_voutput_get_client_output(this->voutput, &ret);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+ ASSERT_NE(output, NULL);
+
+ ret = tdm_client_output_connect(output);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+
+ tdm_client_handle_events_timeout(this->client, 0);
+}
+
+TEST_F(TDMVirtualOutput, Disconnect)
+{
+ tdm_error ret;
+ tdm_client_output *output;
+
+ output = tdm_client_voutput_get_client_output(this->voutput, &ret);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+ ASSERT_NE(output, NULL);
+
+ ret = tdm_client_output_disconnect(output);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+
+ tdm_client_handle_events_timeout(this->client, 0);
+}
+
#if 0
TEST_F(TDMVirtualOutput, FailTestGetClientOutput)
{