native_library_test_utils.h 827 B

1234567891011121314151617181920212223242526
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_TEST_NATIVE_LIBRARY_TEST_UTILS_H_
  5. #define BASE_TEST_NATIVE_LIBRARY_TEST_UTILS_H_
  6. #include "build/build_config.h"
  7. #if BUILDFLAG(IS_WIN)
  8. #define NATIVE_LIBRARY_TEST_ALWAYS_EXPORT __declspec(dllexport)
  9. #else
  10. #define NATIVE_LIBRARY_TEST_ALWAYS_EXPORT __attribute__((visibility("default")))
  11. #endif
  12. extern "C" {
  13. extern NATIVE_LIBRARY_TEST_ALWAYS_EXPORT int g_native_library_exported_value;
  14. // A function which increments an internal counter value and returns its value.
  15. // The first call returns 1, then 2, etc.
  16. NATIVE_LIBRARY_TEST_ALWAYS_EXPORT int NativeLibraryTestIncrement();
  17. } // extern "C"
  18. #endif // BASE_TEST_NATIVE_LIBRARY_TEST_UTILS_H_