6 void my_callback_func(unsigned int event_type, sensor_event_data_t *event , void *data)
10 static void startup(void);
11 static void cleanup(void);
13 void (*tet_startup)(void) = startup;
14 void (*tet_cleanup)(void) = cleanup;
16 static void utc_SensorFW_sf_unregister_event_func_01(void);
17 static void utc_SensorFW_sf_unregister_event_func_02(void);
20 POSITIVE_TC_IDX = 0x01,
24 struct tet_testlist tet_testlist[] = {
25 { utc_SensorFW_sf_unregister_event_func_01, POSITIVE_TC_IDX },
26 { utc_SensorFW_sf_unregister_event_func_02, NEGATIVE_TC_IDX },
30 static void startup(void)
32 handle = sf_connect(ACCELEROMETER_SENSOR);
33 sf_register_event(handle, ACCELEROMETER_EVENT_ROTATION_CHECK, NULL, my_callback_func,NULL);
37 static void cleanup(void)
39 sf_disconnect(handle);
42 * @brief Positive test case of sf_unregister_event()
44 static void utc_SensorFW_sf_unregister_event_func_01(void)
49 r = sf_unregister_event(handle, ACCELEROMETER_EVENT_ROTATION_CHECK);
52 tet_infoline("sf_unregister_event() failed in positive test case");
60 * @brief Negative test case of ug_init sf_unregister_event()
62 static void utc_SensorFW_sf_unregister_event_func_02(void)
66 r = sf_unregister_event(handle, NULL);
69 tet_infoline("sf_unregister_event() failed in negative test case");