Commit aee22937 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

added test for FakeContainer

parent 56ddc859
......@@ -24,6 +24,9 @@ dune_add_test(SOURCES DiscreteFunctionTest.cpp
dune_add_test(SOURCES ExpressionsTest.cpp
LINK_LIBRARIES amdis)
dune_add_test(SOURCES FakeContainerTest.cpp
LINK_LIBRARIES amdis)
dune_add_test(SOURCES FieldMatVecTest.cpp
LINK_LIBRARIES amdis)
......
#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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment