Ocean
Loading...
Searching...
No Matches
Test.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TEST_H
9#define META_OCEAN_TEST_TEST_H
10
11#include "ocean/base/Base.h"
13
14#ifdef OCEAN_USE_GTEST
15 #include <gtest/gtest.h>
16#endif
17
18namespace Ocean
19{
20
21namespace Test
22{
23
24/**
25 * @defgroup test Ocean Test Library
26 * @{
27 * The Ocean Test Library provides several function to test the performance and validation of the entire ocean functionalities.
28 * The library is platform independent.
29 * @}
30 */
31
32/**
33 * @namespace Ocean::Test Namespace of the Test library.<p>
34 * The Namespace Ocean::Test is used in the entire Ocean Test Library.
35 */
36
37// The default test duration for gtest in seconds we select 0.5 seconds to keep a test as short as possible (while still receiving a meaningful result)
38#define GTEST_TEST_DURATION 0.5
39
40// The default image size for gtest in pixels. For mobile (Android and iOS), we use smaller values because Android instrumentation tests tend to time-out if the images are "too large".
41#if defined(OCEAN_PLATFORM_BUILD_APPLE_IOS_ANY) || defined(OCEAN_PLATFORM_BUILD_ANDROID)
42 #define GTEST_TEST_IMAGE_WIDTH 320u
43 #define GTEST_TEST_IMAGE_HEIGHT 180u
44#else
45 #define GTEST_TEST_IMAGE_WIDTH 1920u
46 #define GTEST_TEST_IMAGE_HEIGHT 250u
47#endif
48
49// Defines OCEAN_TEST_EXPORT for dll export and import.
50#if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
51 #ifdef USE_OCEAN_TEST_EXPORT
52 #define OCEAN_TEST_EXPORT __declspec(dllexport)
53 #else
54 #define OCEAN_TEST_EXPORT __declspec(dllimport)
55 #endif
56#else
57 #define OCEAN_TEST_EXPORT
58#endif
59
60}
61
62}
63
64#endif // META_OCEAN_TEST_TEST_H
The namespace covering the entire Ocean framework.
Definition Accessor.h:15