Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
e1bdccb3
Commit
e1bdccb3
authored
Nov 15, 2018
by
Matthieu Schaller
Browse files
Merge branch 'fix_outputlist' into 'master'
Fix outputlist test See merge request
!675
parents
013da1ce
0dfd5a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testOutputList.c
View file @
e1bdccb3
...
...
@@ -36,9 +36,9 @@ const double time_values[Ntest] = {
/* Expected values from file */
const
double
a_values
[
Ntest
]
=
{
0
.
5
,
0
.
1
,
0
.
01
,
0
.
1
,
0
.
5
,
};
void
test_no_cosmo
(
struct
engine
*
e
,
char
*
name
,
int
with_assert
)
{
...
...
@@ -62,7 +62,7 @@ void test_no_cosmo(struct engine *e, char *name, int with_assert) {
for
(
int
i
=
0
;
i
<
Ntest
;
i
++
)
{
/* Test last value */
if
(
with_assert
)
{
assert
(
abs
(
output_time
-
time_values
[
i
])
<
tol
);
assert
(
f
abs
(
output_time
-
time_values
[
i
])
<
tol
);
}
/* Set current time */
...
...
@@ -98,7 +98,7 @@ void test_cosmo(struct engine *e, char *name, int with_assert) {
for
(
int
i
=
0
;
i
<
Ntest
;
i
++
)
{
/* Test last value */
if
(
with_assert
)
{
assert
(
abs
(
output_time
-
a_values
[
i
])
<
tol
);
assert
(
f
abs
(
output_time
-
a_values
[
i
])
<
tol
);
}
/* Set current time */
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment