blob: 55e4020ecf55031206b07431bcd8ad3aa46ef0f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef CONTAINERUSER_H
#define CONTAINERUSER_H
#include "libminimalmacros.h"
#include <array>
#include <vector>
/// Exercise simple, sequential containers. More advanced tests are in ListUser
class LIBMINIMAL_API ContainerUser
{
public:
ContainerUser();
~ContainerUser();
static std::vector<int> createIntVector(int num);
static int sumIntVector(const std::vector<int> &intVector);
std::vector<int> &intVector();
void setIntVector(const std::vector<int> &);
static std::array<int, 3> createIntArray();
static int sumIntArray(const std::array<int, 3> &intArray);
std::array<int, 3> &intArray();
void setIntArray(const std::array<int, 3> &);
private:
std::vector<int> m_intVector;
std::array<int, 3> m_intArray;
};
#endif // CONTAINERUSER_H
|