2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
10 #if defined(VALID_TEST_DYNAMIC_BACKEND)
12 // Correct dynamic backend interface
15 const char* GetBackendId();
16 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
17 void* BackendFactory();
20 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_1)
22 // Wrong external linkage: expected C-style name mangling
23 extern const char* GetBackendId();
24 extern void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
25 extern void* BackendFactory();
32 #if defined(INVALID_TEST_DYNAMIC_BACKEND_2)
34 // Invalid interface: missing "GetBackendId()"
35 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
36 void* BackendFactory();
38 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_3)
40 // Invalid interface: missing "GetVersion()"
41 const char* GetBackendId();
42 void* BackendFactory();
44 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_4)
46 // Invalid interface: missing "BackendFactory()"
47 const char* GetBackendId();
48 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
50 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_5) || \
51 defined(INVALID_TEST_DYNAMIC_BACKEND_6) || \
52 defined(INVALID_TEST_DYNAMIC_BACKEND_7)
54 // The interface is correct, the corresponding invalid changes are in the TestDynamicBackend.cpp file
55 const char* GetBackendId();
56 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
57 void* BackendFactory();
61 #error "Invalid or missing configuration macro for the TestDynamicBackend object"