FakeContainerTest.cpp 632 Bytes
Newer Older
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
37
#include <amdis/AMDiS.hpp>
#include <amdis/common/FakeContainer.hpp>

#include "Tests.hpp"

using namespace AMDiS;

int main(int argc, char** argv)
{
  // Environment env(argc, argv);

  FakeContainer vec1;
  FakeContainer vec2(vec1);
  FakeContainer vec3(std::move(vec2));

  FakeContainer vec4 = vec1;
  FakeContainer vec5 = std::move(vec3);

  vec1.reserve(7);
  vec1.resize(1);
  vec4.resize(1);

  vec1[0] = 0.0;
  vec4[1] = vec1[0];

  vec1.push_back(42);
  vec1.emplace_back(42);

  AMDIS_TEST(vec1.empty());
  AMDIS_TEST(vec1.size() == 0u);

  vec1.front() = 1;
  front(vec4) = 2;
  back(vec4) = vec1.back();

  return 0;
}