X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Flocation_test.c;h=75d69c7dcbd2550b87dfaf174b019bd2d6b46929;hb=19237616d63b7c2be8e10d44904e5cb0baad6ca9;hp=e86eca23e0d6dd2165a2fc1d218bce96c300d775;hpb=f79705a60628a82e7995b1380a9318e6901e84ea;p=platform%2Fcore%2Fapi%2Flocation-manager.git diff --git a/test/location_test.c b/test/location_test.c index e86eca2..75d69c7 100755 --- a/test/location_test.c +++ b/test/location_test.c @@ -368,10 +368,12 @@ static void _setting_cb(location_method_e method, bool enable, void *user_data) void _satellite_updated_cb(int num_of_active, int num_of_inview, time_t timestamp, void *user_data) { - fprintf(stderr, "-------------------------- satellite updated --------------------------\n"); - fprintf(stderr, "num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp); +/* fprintf(stderr, "-------------------------- satellite updated --------------------------\n"); */ + fprintf(stderr, "--- num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp); - test_timer = g_timeout_add_seconds(1, wait_test, NULL); + repeat_count++; + if (repeat_count > 60) + test_timer = g_timeout_add_seconds(1, wait_test, NULL); } static void print_location_status() @@ -386,10 +388,6 @@ static void print_location_status() location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, &is_enabled); fprintf(stderr, "wps: %d, ", is_enabled); - - /* location_manager_is_test_location_enabled(&is_enabled); */ - location_manager_is_enabled_method(LOCATIONS_METHOD_MOCK, &is_enabled); - fprintf(stderr, "mock: %d\n", is_enabled); } static int enable_method(location_method_e method, bool enable) @@ -499,11 +497,11 @@ static int location_test() fprintf(stderr, "gps_status_set_satellite_updated_cb: %d\n", ret); } break; - } + } case 4: case 5: case 6: { - int timeout = 30; + int timeout = 60; fprintf(stderr, "\n Input timeout ==> "); ret = scanf("%d", &timeout); @@ -513,7 +511,7 @@ static int location_test() ret = location_manager_request_single_location(manager, timeout, _location_cb, manager); fprintf(stderr, "request single_location (method: %d): %d\n", method, ret); break; - } + } case 11: case 12: case 13: { @@ -592,8 +590,8 @@ static int location_test() ret = location_manager_enable_mock_location(onoff); fprintf(stderr, "Enabling mock test: ret=%d\n", ret); - ret = location_manager_create(LOCATIONS_METHOD_MOCK, &manager); - fprintf(stderr, "location_manager_create (method: %d): %d\n", LOCATIONS_METHOD_MOCK, ret); + ret = location_manager_create(LOCATIONS_METHOD_GPS, &manager); + fprintf(stderr, "location_manager_create (method: %d - mock): %d\n", LOCATIONS_METHOD_GPS, ret); ret = location_manager_set_mock_location(manager, 10, 20, 0, 40, 50, 100); fprintf(stderr, "location_manager_set_mock_location: %d\n", ret);