Skip to content
Snippets Groups Projects
Unverified Commit f41811c1 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

tests: Move sanitizer test algos from alib2aux to tests (closes #190)

parent 466a6f93
No related branches found
No related tags found
1 merge request!139merge tp
...@@ -10,24 +10,16 @@ ...@@ -10,24 +10,16 @@
   
namespace debug { namespace debug {
   
#ifdef DEBUG
int debug::Segfault::segfault ( ) { int debug::Segfault::segfault ( ) {
return * NULL_VALUE; return * NULL_VALUE;
} }
   
int * debug::Segfault::NULL_VALUE; int * debug::Segfault::NULL_VALUE;
   
#endif /* DEBUG */
} /* namespace debug */ } /* namespace debug */
   
namespace { namespace {
   
#ifdef DEBUG
auto SegfaultInt = registration::AbstractRegister < debug::Segfault, int > ( debug::Segfault::segfault ); auto SegfaultInt = registration::AbstractRegister < debug::Segfault, int > ( debug::Segfault::segfault );
   
#endif /* DEBUG */
} /* namespace */ } /* namespace */
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
   
namespace debug { namespace debug {
   
#ifdef DEBUG
class Segfault { class Segfault {
static int * NULL_VALUE; static int * NULL_VALUE;
   
...@@ -19,8 +17,6 @@ public: ...@@ -19,8 +17,6 @@ public:
static int segfault ( ); static int segfault ( );
}; };
   
#endif /* DEBUG */
} /* namespace debug */ } /* namespace debug */
   
#endif /* SEGFAULT_H_ */ #endif /* SEGFAULT_H_ */
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include "UndefinedBehaviour.h" #include "UndefinedBehaviour.h"
#include <registration/AlgoRegistration.hpp> #include <registration/AlgoRegistration.hpp>
   
#ifdef DEBUG
namespace debug { namespace debug {
   
int UndefinedBehaviour::undefined_behaviour ( ) { int UndefinedBehaviour::undefined_behaviour ( ) {
...@@ -26,5 +24,3 @@ namespace { ...@@ -26,5 +24,3 @@ namespace {
auto UndefinedBehaviourInt = registration::AbstractRegister < debug::UndefinedBehaviour, int > ( debug::UndefinedBehaviour::undefined_behaviour ); auto UndefinedBehaviourInt = registration::AbstractRegister < debug::UndefinedBehaviour, int > ( debug::UndefinedBehaviour::undefined_behaviour );
   
} /* namespace */ } /* namespace */
#endif /* DEBUG */
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#ifndef UNDEFINED_BEHAVIOUR_H_ #ifndef UNDEFINED_BEHAVIOUR_H_
#define UNDEFINED_BEHAVIOUR_H_ #define UNDEFINED_BEHAVIOUR_H_
   
#ifdef DEBUG
namespace debug { namespace debug {
   
class UndefinedBehaviour { class UndefinedBehaviour {
...@@ -20,6 +18,4 @@ public: ...@@ -20,6 +18,4 @@ public:
   
} /* namespace debug */ } /* namespace debug */
   
#endif /* DEBUG */
#endif /* UNDEFINED_BEHAVIOUR_H_ */ #endif /* UNDEFINED_BEHAVIOUR_H_ */
...@@ -13,8 +13,7 @@ TEST_CASE ( "AQL Test", "[integration][dummy][!shouldfail][!hide]" ) { ...@@ -13,8 +13,7 @@ TEST_CASE ( "AQL Test", "[integration][dummy][!shouldfail][!hide]" ) {
TimeoutAqlTest ( 1s, qs ); TimeoutAqlTest ( 1s, qs );
} }
   
#if DEBUG TEST_CASE ( "Segfault Test", "[integration][dummy][!hide][!shouldfail]" ) {
TEST_CASE ( "Segfault Test", "[integration][dummy][!shouldfail][!hide]" ) {
ext::vector < std::string > qs = { ext::vector < std::string > qs = {
"execute debug::Random @ int", "execute debug::Random @ int",
"execute debug::Segfault" "execute debug::Segfault"
...@@ -23,7 +22,7 @@ TEST_CASE ( "Segfault Test", "[integration][dummy][!shouldfail][!hide]" ) { ...@@ -23,7 +22,7 @@ TEST_CASE ( "Segfault Test", "[integration][dummy][!shouldfail][!hide]" ) {
TimeoutAqlTest ( 1s, qs ); TimeoutAqlTest ( 1s, qs );
} }
   
TEST_CASE ( "Sanitizer Test", "[integration][dummy][!shouldfail]" ) { TEST_CASE ( "Sanitizer Test", "[integration][dummy][!hide][!shouldfail]" ) {
ext::vector < std::string > qs; ext::vector < std::string > qs;
SECTION ( "asan" ) { SECTION ( "asan" ) {
qs = { qs = {
...@@ -48,7 +47,6 @@ TEST_CASE ( "Sanitizer Test", "[integration][dummy][!shouldfail]" ) { ...@@ -48,7 +47,6 @@ TEST_CASE ( "Sanitizer Test", "[integration][dummy][!shouldfail]" ) {
   
TimeoutAqlTest ( 1s, qs ); TimeoutAqlTest ( 1s, qs );
} }
#endif
   
TEST_CASE ( "Failed Test", "[integration][dummy][!hide][!shouldfail]" ) { TEST_CASE ( "Failed Test", "[integration][dummy][!hide][!shouldfail]" ) {
ext::vector < std::string > qs = { ext::vector < std::string > qs = {
......
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