diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-05 17:20:27 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-05 17:20:27 +0100 |
commit | 03739354e074c547d99a6992a7774c3643d17da1 (patch) | |
tree | 37091acf1b6101493f9243fbd5b5201be951fdce /test/test-mock.c | |
parent | 0483c86add2f496021560b82476d22e2497006be (diff) | |
download | libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.gz libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.bz2 libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.xz libuca-03739354e074c547d99a6992a7774c3643d17da1.zip |
Add factory method to create new cameras
Diffstat (limited to 'test/test-mock.c')
-rw-r--r-- | test/test-mock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-mock.c b/test/test-mock.c index 5340166..a9284cf 100644 --- a/test/test-mock.c +++ b/test/test-mock.c @@ -26,6 +26,14 @@ static void on_property_change(gpointer instance, GParamSpec *pspec, gpointer us *success = TRUE; } +static void test_factory() +{ + GError *error = NULL; + UcaCamera *camera = uca_camera_new("fox994m3a0yxmy", &error); + g_assert_error(error, UCA_CAMERA_ERROR, UCA_CAMERA_ERROR_NOT_FOUND); + g_assert(camera == NULL); +} + static void test_recording(Fixture *fixture, gconstpointer data) { GError *error = NULL; @@ -150,6 +158,7 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); g_test_bug_base("http://ufo.kit.edu/ufo/ticket"); + g_test_add_func("/factory", test_factory); g_test_add("/recording", Fixture, NULL, fixture_setup, test_recording, fixture_teardown); g_test_add("/recording/signal", Fixture, NULL, fixture_setup, test_recording_signal, fixture_teardown); g_test_add("/recording/asynchronous", Fixture, NULL, fixture_setup, test_recording_async, fixture_teardown); |