Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dorie
dorie
Commits
d249c310
Commit
d249c310
authored
Feb 03, 2019
by
Santiago Ospina De Los Ríos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Test] Add check to shrink_to_time method in grid function container
parent
7f09a2f4
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
dune/dorie/test/test-grid-function-container.cc
dune/dorie/test/test-grid-function-container.cc
+27
-1
No files found.
dune/dorie/test/test-grid-function-container.cc
View file @
d249c310
...
...
@@ -143,15 +143,41 @@ bool test_container(GV& gv)
failed
|=
true
;
}
catch
(...)
{}
//
T
ry again another valid time
//
t
ry again another valid time
gf_container
.
setTime
(
1.0
);
gf_container
.
evaluate
(
entity
,
x
,
y
);
if
(
not
Dune
::
FloatCmp
::
eq
(
y
[
0
],
1.0
))
failed
|=
true
;
// shrink to some arbitrary time
gf_container
.
setTime
(
1.5
);
gf_container
.
shrink_to_time
();
gf_container
.
evaluate
(
entity
,
x
,
y
);
failed
|=
gf_container
.
size
()
==
2
;
try
{
gf_container
.
setTime
(
0.5
);
gf_container
.
setTime
(
1.5
);
failed
|=
true
;
}
catch
(...)
{}
// shrink to some exact contained time
gf_container
.
setTime
(
1.
);
gf_container
.
shrink_to_time
();
gf_container
.
evaluate
(
entity
,
x
,
y
);
failed
|=
gf_container
.
size
()
==
1
;
try
{
gf_container
.
setTime
(
0.5
);
gf_container
.
setTime
(
1.5
);
failed
|=
true
;
}
catch
(...)
{}
// pop until container is empty
while
(
not
gf_container
.
empty
())
gf_container
.
pop
();
// check that container is void
failed
|=
gf_container
.
size
()
==
0
;
// evaluate an empty container should rise an error
try
{
gf_container
.
evaluate
(
entity
,
x
,
y
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment