Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
Mpp
Commits
0b38eff8
Commit
0b38eff8
authored
Mar 26, 2020
by
niklas.baumgarten
Browse files
added TestEnviroment
parent
4ba61c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeListsMpp.inc
View file @
0b38eff8
...
...
@@ -121,6 +121,7 @@ add_subdirectory(${PROJECT_MPP_DIR}/src)
# Tests
if
(
BUILD_TESTS
)
include_directories
(
$
{
PROJECT_MPP_DIR
}
/
tests
)
add_subdirectory
(
$
{
PROJECT_MPP_DIR
}
/
tests
/
)
endif
()
#---------------------------------------------------------------------------------------#
...
...
tests/TestEnviroment.hpp
0 → 100644
View file @
0b38eff8
#ifndef TESTENVIROMENT_HPP
#define TESTENVIROMENT_HPP
#include "gtest/gtest.h"
#include "m++.h"
using
namespace
::
testing
;
int
MAIN_TEST_WITH_PPM
(
int
argc
,
char
**
argv
)
{
InitGoogleTest
(
&
argc
,
argv
);
PPM
=
new
ParallelProgrammingModel
(
&
argc
,
argv
);
TestEventListeners
&
listeners
=
UnitTest
::
GetInstance
()
->
listeners
();
if
(
!
PPM
->
master
())
delete
listeners
.
Release
(
listeners
.
default_result_printer
());
int
rc
=
RUN_ALL_TESTS
();
delete
PPM
;
return
rc
;
}
int
MAIN_TEST_WITHOUT_PPM
(
int
argc
,
char
**
argv
)
{
InitGoogleTest
(
&
argc
,
argv
);
return
RUN_ALL_TESTS
();
}
#endif //TESTENVIROMENT_HPP
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