Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
amdis
amdis-core
Commits
aee22937
Commit
aee22937
authored
5 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
added test for FakeContainer
parent
56ddc859
No related branches found
Branches containing commit
No related tags found
1 merge request
!52
add fake container-like datastructure with all no-op
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/CMakeLists.txt
+3
-0
3 additions, 0 deletions
test/CMakeLists.txt
test/FakeContainerTest.cpp
+37
-0
37 additions, 0 deletions
test/FakeContainerTest.cpp
with
40 additions
and
0 deletions
test/CMakeLists.txt
+
3
−
0
View file @
aee22937
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
test/FakeContainerTest.cpp
0 → 100644
+
37
−
0
View file @
aee22937
#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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment