diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-10-09 15:43:10 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-10-09 15:43:10 +0200 |
commit | 4a27a2e95aa1a2312ad17404d7ab236b2fa6f1b7 (patch) | |
tree | 1016f4721a740d18dcb44e471c393531ef814232 /test | |
parent | 805129cf7452e37c6d1042a87fadd297098fac9c (diff) | |
download | libuca-4a27a2e95aa1a2312ad17404d7ab236b2fa6f1b7.tar.gz libuca-4a27a2e95aa1a2312ad17404d7ab236b2fa6f1b7.tar.bz2 libuca-4a27a2e95aa1a2312ad17404d7ab236b2fa6f1b7.tar.xz libuca-4a27a2e95aa1a2312ad17404d7ab236b2fa6f1b7.zip |
Fix #150: Add "frames-per-second" property
Right now, there is only information for the DIMAX camera about the actual
inherent system delay. For all other cameras fps = 1. / t_exp.
Diffstat (limited to 'test')
-rw-r--r-- | test/test-mock.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test-mock.c b/test/test-mock.c index 711364d..17af329 100644 --- a/test/test-mock.c +++ b/test/test-mock.c @@ -149,6 +149,26 @@ test_base_properties (Fixture *fixture, gconstpointer data) } static void +test_fps_property (Fixture *fixture, gconstpointer data) +{ + gdouble frames_per_second; + gdouble exposure_time = 0.5; + + g_object_set (G_OBJECT (fixture->camera), + "exposure-time", exposure_time, + NULL); + g_object_get (G_OBJECT (fixture->camera), + "frames-per-second", &frames_per_second, + NULL); + + /* + * The mock camera does not override the "frames-per-second" property, so we + * check the implementation from the base camera. + */ + g_assert_cmpfloat (frames_per_second, ==, 1.0 / exposure_time); +} + +static void test_binnings_properties (Fixture *fixture, gconstpointer data) { UcaCamera *camera = UCA_CAMERA (fixture->camera); @@ -189,6 +209,7 @@ int main (int argc, char *argv[]) g_test_add ("/properties/base", Fixture, NULL, fixture_setup, test_base_properties, fixture_teardown); g_test_add ("/properties/recording", Fixture, NULL, fixture_setup, test_recording_property, fixture_teardown); g_test_add ("/properties/binnings", Fixture, NULL, fixture_setup, test_binnings_properties, fixture_teardown); + g_test_add ("/properties/frames-per-second", Fixture, NULL, fixture_setup, test_fps_property, fixture_teardown); g_test_add ("/signal", Fixture, NULL, fixture_setup, test_signal, fixture_teardown); return g_test_run (); |