2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
10 #if defined(VALID_TEST_DYNAMIC_BACKEND_1) || \
11 defined(VALID_TEST_DYNAMIC_BACKEND_2) || \
12 defined(VALID_TEST_DYNAMIC_BACKEND_3) || \
13 defined(VALID_TEST_DYNAMIC_BACKEND_4)
15 // Correct dynamic backend interface
18 const char* GetBackendId();
19 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
20 void* BackendFactory();
23 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_1)
25 // Wrong external linkage: expected C-style name mangling
26 extern const char* GetBackendId();
27 extern void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
28 extern void* BackendFactory();
35 #if defined(INVALID_TEST_DYNAMIC_BACKEND_2)
37 // Invalid interface: missing "GetBackendId()"
38 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
39 void* BackendFactory();
41 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_3)
43 // Invalid interface: missing "GetVersion()"
44 const char* GetBackendId();
45 void* BackendFactory();
47 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_4)
49 // Invalid interface: missing "BackendFactory()"
50 const char* GetBackendId();
51 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
53 #elif defined(INVALID_TEST_DYNAMIC_BACKEND_5) || \
54 defined(INVALID_TEST_DYNAMIC_BACKEND_6) || \
55 defined(INVALID_TEST_DYNAMIC_BACKEND_7) || \
56 defined(INVALID_TEST_DYNAMIC_BACKEND_8) || \
57 defined(INVALID_TEST_DYNAMIC_BACKEND_9)
59 // The interface is correct, the corresponding invalid changes are in the TestDynamicBackend.cpp file
60 const char* GetBackendId();
61 void GetVersion(uint32_t* outMajor, uint32_t* outMinor);
62 void* BackendFactory();
66 #error "Invalid or missing configuration macro for the TestDynamicBackend object"