WSL/SLF GitLab Repository
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
meteoio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
snow-models
meteoio
Commits
99cd5da7
Commit
99cd5da7
authored
Jul 14, 2014
by
Mathias Bavay
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some errors and warnings when compiling the tests on Hera
parent
3c4f3dd3
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/arrays/arrays.cc
+1
-1
1 addition, 1 deletion
tests/arrays/arrays.cc
tests/dem_reading/dem_reading.cc
+10
-12
10 additions, 12 deletions
tests/dem_reading/dem_reading.cc
tests/stats/stats.cc
+2
-2
2 additions, 2 deletions
tests/stats/stats.cc
with
13 additions
and
15 deletions
tests/arrays/arrays.cc
+
1
−
1
View file @
99cd5da7
...
...
@@ -143,7 +143,7 @@ bool grid3d(const unsigned int& n) {
return
status
;
}
bool
matrix
(
const
unsigned
in
t
&
n
)
{
bool
matrix
(
const
size_
t
&
n
)
{
cout
<<
"Testing Matrix
\n
"
;
bool
status
=
true
;
Matrix
I
(
n
,
1.
);
//build an n*n identity matrix
...
...
This diff is collapsed.
Click to expand it.
tests/dem_reading/dem_reading.cc
+
10
−
12
View file @
99cd5da7
...
...
@@ -115,24 +115,22 @@ bool compareFiles(){
bool
status
=
true
;
for
(
int
i
=
0
;
i
<
n_files
;
i
++
)
{
// ------ Compare reference file with generated results ---------
cout
<<
" ---
Start c
omparing reference file with output file
generated before for :
"
<<
files
[
i
]
<<
endl
;
cout
<<
" ---
C
omparing reference file with
generated
output file "
<<
files
[
i
]
<<
endl
;
ifstream
ifref
((
prefix_ref
+
files
[
i
]).
c_str
());
ifstream
ifout
(
files
[
i
].
c_str
());
string
l_ref
,
l_out
;
while
(
!
ifref
.
eof
())
{
while
(
!
ifref
.
eof
())
{
if
(
ifout
.
eof
())
{
cerr
<<
"
Not enough lines generated as result!!
!"
<<
endl
;
cerr
<<
"
Generated file has less lines than the reference
!"
<<
endl
;
return
false
;
}
getline
(
ifref
,
l_ref
);
getline
(
ifout
,
l_out
);
if
(
l_ref
!=
l_out
)
{
cerr
<<
"
ERROR, Sun generatet error at following point an error
"
<<
endl
;
cerr
<<
"
Generated and reference files differ!
"
<<
endl
;
cerr
<<
"ref :
\n
"
<<
l_ref
<<
endl
;
cerr
<<
"out :
\n
"
<<
l_out
<<
endl
;
status
=
false
;
...
...
@@ -140,7 +138,7 @@ bool compareFiles(){
}
if
(
!
ifout
.
eof
())
{
cerr
<<
"
To much lines generated as result!!
!"
<<
endl
;
cerr
<<
"
Generated file has more lines than the reference
!"
<<
endl
;
status
=
false
;
}
ifout
.
close
();
...
...
This diff is collapsed.
Click to expand it.
tests/stats/stats.cc
+
2
−
2
View file @
99cd5da7
...
...
@@ -25,7 +25,7 @@ void cr_fixed_vectors(vector<double> &X, vector<double> &Y) {
void
cr_rand_vectors
(
vector
<
double
>
&
X
,
vector
<
double
>
&
Y
)
{
const
size_t
N
=
20
;
srand
(
time
(
NULL
)
);
srand
(
static_cast
<
unsigned
int
>
(
time
(
NULL
)
)
);
X
.
clear
();
X
.
resize
(
N
);
Y
.
clear
();
Y
.
resize
(
N
);
...
...
@@ -191,7 +191,7 @@ bool check_basics(const vector<double>& X, const vector<double>& Y) {
}
//vector weighted mean
const
vector
<
double
>
weights
(
X
.
size
(),
1.
/
(
X
.
size
()));
const
vector
<
double
>
weights
(
X
.
size
(),
1.
/
static_cast
<
double
>
(
X
.
size
()));
const
double
vector_mean
=
Interpol1D
::
weightedMean
(
X
,
weights
);
const
double
mean
=
Interpol1D
::
arithmeticMean
(
X
);
const
double
vector_mean_status
=
IOUtils
::
checkEpsilonEquality
(
vector_mean
,
mean
,
1e-6
);
...
...
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