Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
115bd30a
Commit
115bd30a
authored
10 years ago
by
René Fritze
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'tobias/master'
Conflicts: dune/stuff/test/common_logger.cc
parents
515a0552
b9843499
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/stuff/test/common_configuration.cc
+4
-3
4 additions, 3 deletions
dune/stuff/test/common_configuration.cc
dune/stuff/test/common_logger.cc
+3
-8
3 additions, 8 deletions
dune/stuff/test/common_logger.cc
dune/stuff/test/common_string.cc
+3
-1
3 additions, 1 deletion
dune/stuff/test/common_string.cc
with
10 additions
and
12 deletions
dune/stuff/test/common_configuration.cc
+
4
−
3
View file @
115bd30a
...
@@ -125,9 +125,10 @@ struct ConfigTest : public testing::Test
...
@@ -125,9 +125,10 @@ struct ConfigTest : public testing::Test
static
const
int
count
=
2
;
static
const
int
count
=
2
;
DefaultRNG
<
T
>
rng
;
DefaultRNG
<
T
>
rng
;
RandomStrings
key_gen
;
RandomStrings
key_gen
;
// std::array is not assignable from list_of it seems
// std::array is not assignable from list_of it seems. Don't make the following two arrays const (triggers boost/intel
const
boost
::
array
<
T
,
count
>
values
;
// compiler bug, last tested with icpc version 14.0.3).
const
boost
::
array
<
std
::
string
,
count
>
keys
;
boost
::
array
<
T
,
count
>
values
;
boost
::
array
<
std
::
string
,
count
>
keys
;
ConfigTest
()
ConfigTest
()
:
key_gen
(
8
)
:
key_gen
(
8
)
,
values
(
boost
::
assign
::
list_of
<
T
>
().
repeat_fun
(
values
.
size
()
-
1
,
rng
))
,
values
(
boost
::
assign
::
list_of
<
T
>
().
repeat_fun
(
values
.
size
()
-
1
,
rng
))
...
...
This diff is collapsed.
Click to expand it.
dune/stuff/test/common_logger.cc
+
3
−
8
View file @
115bd30a
...
@@ -3,10 +3,9 @@
...
@@ -3,10 +3,9 @@
// Copyright holders: Rene Milk, Felix Schindler
// Copyright holders: Rene Milk, Felix Schindler
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#include
"
config.h
"
#include
"
main.hxx
"
#include
<dune/stuff/test/gtest/gtest.h>
// dune-stuff
#include
<dune/stuff/test/common.hh>
#include
<dune/stuff/common/logging.hh>
#include
<dune/stuff/common/logging.hh>
#include
<dune/stuff/common/logstreams.hh>
#include
<dune/stuff/common/logstreams.hh>
...
@@ -29,10 +28,8 @@ void do_something_that_takes_long(std::ostream& out)
...
@@ -29,10 +28,8 @@ void do_something_that_takes_long(std::ostream& out)
out
<<
std
::
endl
;
out
<<
std
::
endl
;
}
// void do_something_that_takes_long()
}
// void do_something_that_takes_long()
int
main
(
int
argc
,
char
**
argv
)
TEST
(
LoggerTest
,
all
)
{
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
DSC
::
Logger
().
create
(
DSC
::
LOG_CONSOLE
|
DSC
::
LOG_ERROR
);
DSC
::
Logger
().
create
(
DSC
::
LOG_CONSOLE
|
DSC
::
LOG_ERROR
);
DSC
::
Logger
().
error
()
<<
"This should be in output
\n
"
;
DSC
::
Logger
().
error
()
<<
"This should be in output
\n
"
;
DSC
::
Logger
().
info
()
<<
"This should NOT be in output
\n
"
;
DSC
::
Logger
().
info
()
<<
"This should NOT be in output
\n
"
;
...
@@ -61,6 +58,4 @@ int main(int argc, char** argv)
...
@@ -61,6 +58,4 @@ int main(int argc, char** argv)
std
::
cout
<<
"begin Logger().error() test"
<<
std
::
endl
;
std
::
cout
<<
"begin Logger().error() test"
<<
std
::
endl
;
do_something_that_takes_long
(
err
);
do_something_that_takes_long
(
err
);
std
::
cout
<<
"end Logger().error() test"
<<
std
::
endl
;
std
::
cout
<<
"end Logger().error() test"
<<
std
::
endl
;
return
0
;
}
}
This diff is collapsed.
Click to expand it.
dune/stuff/test/common_string.cc
+
3
−
1
View file @
115bd30a
...
@@ -162,11 +162,13 @@ TEST(StringTest, ConvertFrom)
...
@@ -162,11 +162,13 @@ TEST(StringTest, ConvertFrom)
// Hex, whitespacify, tokenize, stringFromTime tests
// Hex, whitespacify, tokenize, stringFromTime tests
TEST
(
StringTest
,
Hex
)
TEST
(
StringTest
,
Hex
)
{
{
// disabled the following test for Intel compiler because it causes compilation failures for no obvious reason
#ifndef __INTEL_COMPILER
EXPECT_GT
(
boost
::
lexical_cast
<
HexToString
<
unsigned
long
>>
(
cout
),
0u
);
EXPECT_GT
(
boost
::
lexical_cast
<
HexToString
<
unsigned
long
>>
(
cout
),
0u
);
#endif
EXPECT_EQ
(
boost
::
lexical_cast
<
HexToString
<
unsigned
long
>>
(
"0x00000F"
),
15u
);
EXPECT_EQ
(
boost
::
lexical_cast
<
HexToString
<
unsigned
long
>>
(
"0x00000F"
),
15u
);
}
}
TEST
(
StringTest
,
Whitespace
)
TEST
(
StringTest
,
Whitespace
)
{
{
EXPECT_EQ
(
"---------"
,
whitespaceify
(
"
\t\t\t\t\t\t\t\t\t
"
,
'-'
));
EXPECT_EQ
(
"---------"
,
whitespaceify
(
"
\t\t\t\t\t\t\t\t\t
"
,
'-'
));
...
...
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