1 /*
2 Copyright (c) 2018, MIPI Alliance, Inc.
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8 
9 * Redistributions of source code must retain the above copyright
10   notice, this list of conditions and the following disclaimer.
11 
12 * Redistributions in binary form must reproduce the above copyright
13   notice, this list of conditions and the following disclaimer in
14   the documentation and/or other materials provided with the
15   distribution.
16 
17 * Neither the name of the copyright holder nor the names of its
18   contributors may be used to endorse or promote products derived
19   from this software without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33 
34 /*
35  * Contributors:
36  * Norbert Schulz (Intel Corporation) - Initial API and implementation
37  */
38 
39 #define MIPI_SYST_DISABLE_ALL
40 
41 // Need to rename MipiSysTFixtureBase here as we otherwise link in versions
42 // of this class with different SYS-T defines. It then becomes unpredictable
43 // which one is used during linking.
44 //
45 #define MipiSysTFixtureBase MipiSysTFixtureBaseDisabled
46 
47 #include "mipi_syst_gtest.h"
48 
TEST_F(MipiSysTFixtureBase,syst_disabled_test)49 TEST_F(MipiSysTFixtureBase, syst_disabled_test)
50 {
51 	struct mipi_syst_handle* ph;
52 
53 	ph = MIPI_SYST_ALLOC_HANDLE((void*)0xC0FFEBABE );
54 	EXPECT_EQ((struct mipi_syst_handle*)0, MIPI_SYST_ALLOC_HANDLE(xx));
55 
56 	MIPI_SYST_SET_HANDLE_MODULE_UNIT(ph, 1,2);
57 
58 	MIPI_SYST_DEBUG(a, xx, yy , zz);
59 
60 	MIPI_SYST_DELETE_HANDLE(ph);
61 }