1*a248dafdSChristopher Ferris /* 2*a248dafdSChristopher Ferris * Copyright (C) 2014 Satoshi Noguchi 3*a248dafdSChristopher Ferris * Copyright (C) 2014 Synaptics Inc 4*a248dafdSChristopher Ferris * 5*a248dafdSChristopher Ferris * Licensed under the Apache License, Version 2.0 (the "License"); 6*a248dafdSChristopher Ferris * you may not use this file except in compliance with the License. 7*a248dafdSChristopher Ferris * You may obtain a copy of the License at 8*a248dafdSChristopher Ferris * 9*a248dafdSChristopher Ferris * http://www.apache.org/licenses/LICENSE-2.0 10*a248dafdSChristopher Ferris * 11*a248dafdSChristopher Ferris * Unless required by applicable law or agreed to in writing, software 12*a248dafdSChristopher Ferris * distributed under the License is distributed on an "AS IS" BASIS, 13*a248dafdSChristopher Ferris * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*a248dafdSChristopher Ferris * See the License for the specific language governing permissions and 15*a248dafdSChristopher Ferris * limitations under the License. 16*a248dafdSChristopher Ferris */ 17*a248dafdSChristopher Ferris 18*a248dafdSChristopher Ferris #ifndef _TESTUTIL_H_ 19*a248dafdSChristopher Ferris #define _TESTUTIL_H_ 20*a248dafdSChristopher Ferris 21*a248dafdSChristopher Ferris enum update_error { 22*a248dafdSChristopher Ferris TEST_SUCCESS = 0, 23*a248dafdSChristopher Ferris TEST_FAIL, 24*a248dafdSChristopher Ferris TEST_FAIL_TIMEOUT, 25*a248dafdSChristopher Ferris TEST_FAIL_NO_FUNCTION_01, 26*a248dafdSChristopher Ferris TEST_FAIL_NO_FUNCTION_54, 27*a248dafdSChristopher Ferris TEST_FAIL_NO_FUNCTION_55, 28*a248dafdSChristopher Ferris TEST_FAIL_QUERY_BASIC_PROPERTIES, 29*a248dafdSChristopher Ferris TEST_FAIL_READ_F54_QUERIES, 30*a248dafdSChristopher Ferris TEST_FAIL_READ_F54_CONTROLS, 31*a248dafdSChristopher Ferris TEST_FAIL_SCAN_PDT, 32*a248dafdSChristopher Ferris TEST_FAIL_READ_DEVICE_STATUS, 33*a248dafdSChristopher Ferris TEST_FAIL_READ_F01_CONTROL_0, 34*a248dafdSChristopher Ferris TEST_FAIL_WRITE_F01_CONTROL_0, 35*a248dafdSChristopher Ferris TEST_FAIL_TIMEOUT_WAITING_FOR_ATTN, 36*a248dafdSChristopher Ferris TEST_FAIL_INVALID_PARAMETER, 37*a248dafdSChristopher Ferris TEST_FAIL_MEMORY_ALLOCATION, 38*a248dafdSChristopher Ferris }; 39*a248dafdSChristopher Ferris 40*a248dafdSChristopher Ferris const char * test_err_to_string(int err); 41*a248dafdSChristopher Ferris 42*a248dafdSChristopher Ferris unsigned long extract_long(const unsigned char *data); 43*a248dafdSChristopher Ferris unsigned short extract_short(const unsigned char *data); 44*a248dafdSChristopher Ferris 45*a248dafdSChristopher Ferris #endif // _TESTUTIL_H_ 46