1 /****************************************************************************** 2 * 3 * Copyright (C) 2014 Google, Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #include "base.h" 20 #include "cases/cases.h" 21 22 TEST_CASE_DECL(adapter_enable_disable); 23 TEST_CASE_DECL(adapter_repeated_enable_disable); 24 TEST_CASE_DECL(adapter_set_name); 25 TEST_CASE_DECL(adapter_get_name); 26 TEST_CASE_DECL(adapter_start_discovery); 27 TEST_CASE_DECL(adapter_cancel_discovery); 28 29 TEST_CASE_DECL(rfcomm_connect); 30 TEST_CASE_DECL(rfcomm_repeated_connect); 31 32 TEST_CASE_DECL(pan_enable); 33 TEST_CASE_DECL(pan_connect); 34 TEST_CASE_DECL(pan_disconnect); 35 TEST_CASE_DECL(pan_quick_reconnect); 36 37 TEST_CASE_DECL(gatt_client_register); 38 TEST_CASE_DECL(gatt_client_scan); 39 TEST_CASE_DECL(gatt_client_advertise); 40 TEST_CASE_DECL(gatt_server_register); 41 TEST_CASE_DECL(gatt_server_build); 42 43 // These are run with the Bluetooth adapter disabled. 44 const test_case_t sanity_suite[] = { 45 TEST_CASE(adapter_enable_disable), 46 TEST_CASE(adapter_repeated_enable_disable) 47 }; 48 49 // The normal test suite is run with the adapter enabled. 50 const test_case_t test_suite[] = { 51 TEST_CASE(adapter_set_name), 52 TEST_CASE(adapter_get_name), 53 TEST_CASE(adapter_start_discovery), 54 TEST_CASE(adapter_cancel_discovery), 55 56 TEST_CASE(rfcomm_connect), 57 TEST_CASE(rfcomm_repeated_connect), 58 59 TEST_CASE(pan_enable), 60 TEST_CASE(pan_connect), 61 TEST_CASE(pan_disconnect), 62 63 TEST_CASE(gatt_client_register), 64 TEST_CASE(gatt_client_scan), 65 TEST_CASE(gatt_client_advertise), 66 TEST_CASE(gatt_server_register), 67 TEST_CASE(gatt_server_build) 68 }; 69 70 const size_t sanity_suite_size = ARRAY_SIZE(sanity_suite); 71 const size_t test_suite_size = ARRAY_SIZE(test_suite); 72