extern int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_service_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_flags_n(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_appearance_n(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_device_name_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_custom_name_n(void);
+extern int utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_n(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n(void);
extern int utc_bluetooth_bt_adapter_le_start_advertising_new_n(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_mode_n(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_service_data_p(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_flags_p(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_appearance_p(void);
extern int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_device_name_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_custom_name_p(void);
+extern int utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_p(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p(void);
extern int utc_bluetooth_bt_adapter_le_start_advertising_new_p(void);
extern int utc_bluetooth_bt_adapter_le_set_advertising_mode_p(void);
{"utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n",utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n",utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_service_data_n",utc_bluetooth_bt_adapter_le_add_advertising_service_data_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
+ {"utc_bluetooth_bt_adapter_le_set_advertising_flags_n",utc_bluetooth_bt_adapter_le_set_advertising_flags_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_appearance_n",utc_bluetooth_bt_adapter_le_set_advertising_appearance_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n",utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_device_name_n",utc_bluetooth_bt_adapter_le_set_advertising_device_name_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
+ {"utc_bluetooth_bt_adapter_le_add_advertising_custom_name_n",utc_bluetooth_bt_adapter_le_add_advertising_custom_name_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
+ {"utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_n",utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n",utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_start_advertising_new_n",utc_bluetooth_bt_adapter_le_start_advertising_new_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_mode_n",utc_bluetooth_bt_adapter_le_set_advertising_mode_n,utc_bluetooth_adapter_negative_startup,utc_bluetooth_adapter_negative_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p",utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p",utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_service_data_p",utc_bluetooth_bt_adapter_le_add_advertising_service_data_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
+ {"utc_bluetooth_bt_adapter_le_set_advertising_flags_p",utc_bluetooth_bt_adapter_le_set_advertising_flags_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_appearance_p",utc_bluetooth_bt_adapter_le_set_advertising_appearance_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p",utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_device_name_p",utc_bluetooth_bt_adapter_le_set_advertising_device_name_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
+ {"utc_bluetooth_bt_adapter_le_add_advertising_custom_name_p",utc_bluetooth_bt_adapter_le_add_advertising_custom_name_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
+ {"utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_p",utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p",utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_start_advertising_new_p",utc_bluetooth_bt_adapter_le_start_advertising_new_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
{"utc_bluetooth_bt_adapter_le_set_advertising_mode_p",utc_bluetooth_bt_adapter_le_set_advertising_mode_p,utc_bluetooth_adapter_positive_startup,utc_bluetooth_adapter_positive_cleanup},
//
#include "assert_local.h"
#include <bluetooth.h>
+#include <bluetooth_internal.h>
#include <stdlib.h>
#include <stdbool.h>
#include <glib.h>
return 0;
}
+/**
+* @testcase utc_bluetooth_bt_adapter_le_set_advertising_flags_n
+* @since_tizen 7.5
+* @description Call to set the advertising flags of local device to advertise or scan response data with
+* "NULL" advertiser parameter and check the "ret" flag with BT_ERROR_INVALID_PARAMETER if le is
+* supported otherwise just try to set the advertising flags of this device to advertise or scan response
+* data with "NULL"advertiser parameter and check the "ret" flag with BT_ERROR_NOT_SUPPORTED.
+* @scenario Negative scenario to set the advertising flags of local device to advertise with "NULL" parameter.
+*/
+int utc_bluetooth_bt_adapter_le_set_advertising_flags_n(void)
+{
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_adapter_le_set_advertising_flags(NULL, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_adapter_le_set_advertising_flags(NULL, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
/**
* @testcase utc_bluetooth_bt_adapter_le_set_advertising_appearance_n
* @since_tizen 2.3
return 0;
}
+/**
+* @testcase utc_bluetooth_bt_adapter_le_add_advertising_custom_name_n
+* @since_tizen 7.5
+* @description Call to set the custom name in advertising data or scan response data with "NULL"
+* parameters and check the "ret" flag with BT_ERROR_INVALID_PARAMETER if le is supported
+* otherwise just try to set the custom name in advertising data or scan response data with
+* "NULL" parameters and check the "ret" flag with BT_ERROR_NOT_SUPPORTED.
+* @scenario Negative scenario to set the custom name in advertising data or scan response data with "NULL" parameters.
+*/
+int utc_bluetooth_bt_adapter_le_add_advertising_custom_name_n(void)
+{
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ ret = bt_adapter_le_add_advertising_custom_name(NULL, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL, 0);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_adapter_le_add_advertising_custom_name(NULL, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL, 0);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
+/**
+* @testcase utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_n
+* @since_tizen 7.5
+* @description Call to add custom name and then remove the custom name in advertising data or scan response data with "NULL"
+* parameters and check the "ret" flag with BT_ERROR_INVALID_PARAMETER if le is supported
+* otherwise just try to remove the custom name in advertising data or scan response data with
+* "NULL" parameters and check the "ret" flag with BT_ERROR_NOT_SUPPORTED.
+* @scenario Negative scenario to remove the custom name in advertising data or scan response data with "NULL" parameters.
+*/
+int utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_n(void)
+{
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+
+ bt_adapter_le_add_advertising_custom_name(NULL, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, "1st custom name", strlen("1st custom name"));
+ ret = bt_adapter_le_remove_advertising_custom_name(NULL, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE);
+ assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+ } else {
+ ret = bt_adapter_le_remove_advertising_custom_name(NULL, BT_ADAPTER_LE_PACKET_SCAN_RESPONSE);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
/**
* @testcase utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n
* @since_tizen 2.3
//
#include "assert_local.h"
#include <bluetooth.h>
+#include <bluetooth_internal.h>
#include <stdlib.h>
#include <stdbool.h>
#include <glib.h>
return 0;
}
+/**
+* @testcase utc_bluetooth_bt_adapter_le_set_advertising_flags_p
+* @since_tizen 7.5
+* @description Does assert check for "startup_flag", create advertiser to advertise device's
+* existence then sets the advertising flags of local device to advertise
+* then clear the advertsing data and destroy the advertiser if le is supported otherwise
+* sets the advertising flags of local device to advertise and clear the advertising data.
+* @scenario Call to set advertising flags of local device to advertise.
+*/
+int utc_bluetooth_bt_adapter_le_set_advertising_flags_p(void)
+{
+ bt_advertiser_h advertiser = NULL;
+ bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_adapter_le_create_advertiser(&advertiser);
+ assert_eq(ret, BT_ERROR_NONE);
+
+ ret = bt_adapter_le_set_advertising_flags(advertiser, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC);
+ assert_eq(ret, BT_ERROR_NONE);
+ if (ret == BT_ERROR_NONE) {
+ bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+ bt_adapter_le_destroy_advertiser(advertiser);
+ }
+ } else {
+ ret = bt_adapter_le_set_advertising_flags(advertiser, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC);
+ if (ret == BT_ERROR_NONE) {
+ bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+ }
+
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
/**
* @testcase utc_bluetooth_bt_adapter_le_set_advertising_appearance_p
* @since_tizen 2.3
return 0;
}
+/**
+* @testcase utc_bluetooth_bt_adapter_le_add_advertising_custom_name_p
+* @since_tizen 7.5
+* @description Does assert check for "startup_flag", create advertiser to advertise device's
+* existence then add custom name to advertise
+* and then destroy the advertiser if le is supported otherwise
+* just add custom name to advertising data.
+* @scenario Call to add custom name to advertise.
+*/
+int utc_bluetooth_bt_adapter_le_add_advertising_custom_name_p(void)
+{
+ bt_advertiser_h advertiser = NULL;
+ bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_adapter_le_create_advertiser(&advertiser);
+ assert_eq(ret, BT_ERROR_NONE);
+
+ ret = bt_adapter_le_add_advertising_custom_name(advertiser, pkt_type, "1st custom name", strlen("1st custom name"));
+ assert_eq(ret, BT_ERROR_NONE);
+ if (ret == BT_ERROR_NONE) {
+ bt_adapter_le_destroy_advertiser(advertiser);
+ }
+ } else {
+ ret = bt_adapter_le_add_advertising_custom_name(advertiser, pkt_type, "1st custom name", strlen("1st custom name"));
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
+/**
+* @testcase utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_p
+* @since_tizen 7.5
+* @description Does assert check for "startup_flag", create advertiser to advertise device's
+* existence then add custom name and then remove custom name to advertise
+* and then destroy the advertiser if le is supported otherwise
+* just remove custom name to advertising data.
+* @scenario Call to remove custom name to advertise.
+*/
+int utc_bluetooth_bt_adapter_le_remove_advertising_custom_name_p(void)
+{
+ bt_advertiser_h advertiser = NULL;
+ bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+ if (le_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_adapter_le_create_advertiser(&advertiser);
+ assert_eq(ret, BT_ERROR_NONE);
+
+ bt_adapter_le_add_advertising_custom_name(advertiser, pkt_type, "1st custom name", strlen("1st custom name"));
+ ret = bt_adapter_le_remove_advertising_custom_name(advertiser, pkt_type);
+ assert_eq(ret, BT_ERROR_NONE);
+ if (ret == BT_ERROR_NONE) {
+ bt_adapter_le_destroy_advertiser(advertiser);
+ }
+ } else {
+ ret = bt_adapter_le_remove_advertising_custom_name(advertiser, pkt_type);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
+
+ return 0;
+}
+
/**
* @testcase utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p
* @since_tizen 2.3