Skip to content
Snippets Groups Projects
Commit 02fa1e82 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Unit test machinery now relies on single main_testlist.cpp

parent 094d0342
No related branches found
No related tags found
No related merge requests found
Showing
with 2 additions and 282 deletions
...@@ -12,6 +12,6 @@ if(UNITTESTS) ...@@ -12,6 +12,6 @@ if(UNITTESTS)
endif() endif()
# to show directory in Qt creator project tree # to show directory in Qt creator project tree
FILE(GLOB_RECURSE UtilityFiles "utilities/*.h") FILE(GLOB_RECURSE UtilityFiles "utilities/*.*")
add_custom_target(UnitTestUtilities SOURCES ${UtilityFiles}) add_custom_target(UnitTestUtilities SOURCES ${UtilityFiles})
endif() endif()
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
#ifdef _MSC_VER
#define _VARIADIC_MAX 10
#endif
#ifdef _WIN32
#pragma warning ( push )
#pragma warning ( disable: 4275 )
#include <gtest/gtest.h>
#pragma warning ( pop )
#else
#include <gtest/gtest.h>
#endif
#include "testlist.h"
#include "ErrorStreamRedirect.h"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
// redirect std::cerr stream
std::stringstream oss;
ErrorStreamRedirect redirecter( oss.rdbuf() );
(void)redirecter;
// run all google tests
return RUN_ALL_TESTS();
}
...@@ -21,5 +21,5 @@ endif() ...@@ -21,5 +21,5 @@ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LINKED_AS_SHARED_LIBRARY=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_LINKED_AS_SHARED_LIBRARY=1")
set(libs BornAgainCore BornAgainFit) set(libs BornAgainCore BornAgainFit)
ADD_GTEST(Fit "0" "${libs}" 0) ADD_GTEST(Fit "FitKernel" "${libs}" 0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment