AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ExecutorTestUtils.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_EXECUTORTESTUTILS_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_EXECUTORTESTUTILS_H_
18 
19 #include <chrono>
20 
21 namespace alexaClientSDK {
22 namespace avsCommon {
23 namespace utils {
24 namespace threading {
25 namespace test {
26 
28 static const int VALUE = 1234;
29 
31 static const std::chrono::milliseconds SHORT_TIMEOUT_MS = std::chrono::milliseconds(100);
32 
34 static auto TASK = [](int arg) { return arg; };
35 
38 }
39 
41 void exampleFunctionParams(int param) {
42 }
43 
48 public:
49  void operator()() {
50  }
51 };
52 
57 class SimpleObject {
58 public:
59  SimpleObject() : m_value{0} {};
60  SimpleObject(int value) : m_value{value} {};
61 
62  int getValue() {
63  return m_value;
64  }
65 
66 private:
67  int m_value;
68 };
69 
70 } // namespace test
71 } // namespace threading
72 } // namespace utils
73 } // namespace avsCommon
74 } // namespace alexaClientSDK
75 
76 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_TEST_EXECUTORTESTUTILS_H_
static auto TASK
A simple task which takes an integer argument and returns the argument when executed.
Definition: ExecutorTestUtils.h:34
Definition: AmdMetricWrapperTest.cpp:24
void exampleFunctionParams(int param)
Simple example function which takes a parameter to be referenced in Executor related tests...
Definition: ExecutorTestUtils.h:41
SimpleObject(int value)
Definition: ExecutorTestUtils.h:60
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static const std::chrono::milliseconds SHORT_TIMEOUT_MS
Timeout to use for waiting on calls within tests.
Definition: ExecutorTestUtils.h:31
static const int VALUE
Simple integer value to be reused in tests.
Definition: ExecutorTestUtils.h:28
void exampleFunction()
Simple example function to be referenced in Executor related tests.
Definition: ExecutorTestUtils.h:37

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0