4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7 * Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
26 static void startup(), cleanup();
27 void (*tet_startup) () = startup;
28 void (*tet_cleanup) () = cleanup;
30 static void utc_set_boundary_in_suwonHQ();
31 static void utc_get_boundary_in_suwonHQ();
33 struct tet_testlist tet_testlist[] = {
34 {utc_set_boundary_in_suwonHQ,1},
35 {utc_get_boundary_in_suwonHQ,2},
45 loc = location_new(LOCATION_METHOD_GPS);
47 tet_printf("\n TC startup");
54 tet_printf("\n TC End");
58 utc_set_boundary_in_suwonHQ()
60 LocationPosition *rb = location_position_new(0, 37.258, 127.056, 0, LOCATION_STATUS_2D_FIX);
61 LocationPosition *lt = location_position_new(0, 37.260, 127.054, 0, LOCATION_STATUS_2D_FIX);
62 LocationBoundary* bound = location_boundary_new_for_rect(lt, rb);
63 g_object_set(loc, "boundary", bound, NULL);
64 location_position_free (rb);
65 location_position_free (lt);
66 location_boundary_free(bound);
69 } else tet_result(TET_FAIL);
73 utc_get_boundary_in_suwonHQ()
75 LocationBoundary* bound = NULL;
76 g_object_get(loc, "boundary", &bound, NULL);
78 bound->type == LOCATION_BOUNDARY_RECT &&
79 bound->rect.right_bottom->latitude == 37.258 &&
80 bound->rect.right_bottom->longitude == 127.056 &&
81 bound->rect.left_top->latitude == 37.260 &&
82 bound->rect.left_top->longitude == 127.054 ){
84 location_boundary_free (bound);
85 } else tet_result(TET_FAIL);