forked from Alepha/Alepha
Make unit tests use the testing lib main function.
This commit is contained in:
@ -5,12 +5,6 @@ static_assert( __cplusplus > 2020'00 );
|
|||||||
#include <Alepha/Testing/test.h>
|
#include <Alepha/Testing/test.h>
|
||||||
#include <Alepha/Utility/evaluation_helpers.h>
|
#include <Alepha/Utility/evaluation_helpers.h>
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const argvec[] )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
static auto tests= Alepha::Utility::enroll <=[]
|
static auto tests= Alepha::Utility::enroll <=[]
|
||||||
{
|
{
|
||||||
using namespace Alepha::Hydrogen::exports::auto_raii;
|
using namespace Alepha::Hydrogen::exports::auto_raii;
|
||||||
|
|||||||
@ -12,16 +12,7 @@ namespace
|
|||||||
{
|
{
|
||||||
using Alepha::Hydrogen::exports::types::argcnt_t;
|
using Alepha::Hydrogen::exports::types::argcnt_t;
|
||||||
using Alepha::Hydrogen::exports::types::argvec_t;
|
using Alepha::Hydrogen::exports::types::argvec_t;
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main( const argcnt_t argcnt, const argvec_t argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
namespace util= Alepha::Utility;
|
namespace util= Alepha::Utility;
|
||||||
using namespace Alepha::Testing::exports;
|
using namespace Alepha::Testing::exports;
|
||||||
namespace boost= Alepha::boost;
|
namespace boost= Alepha::boost;
|
||||||
|
|||||||
@ -11,12 +11,6 @@ static_assert( __cplusplus > 2020'00 );
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const *const argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
using namespace Alepha::Utility::exports::evaluation_helpers;
|
using namespace Alepha::Utility::exports::evaluation_helpers;
|
||||||
|
|||||||
@ -156,9 +156,3 @@ namespace
|
|||||||
assert( mtx.getWaiters().size() == 0 );
|
assert( mtx.getWaiters().size() == 0 );
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const *const argvec )
|
|
||||||
{
|
|
||||||
return runAllTests( { argvec + 1, argvec + argcnt } );
|
|
||||||
}
|
|
||||||
|
|||||||
@ -92,9 +92,3 @@ namespace
|
|||||||
thread2.join();
|
thread2.join();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const *const argvec )
|
|
||||||
{
|
|
||||||
return runAllTests( { argvec + 1, argvec + argcnt } );
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "../Attestation.h"
|
#include "../Attestation.h"
|
||||||
|
|
||||||
|
#include <Alepha/Testing/test.h>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -11,8 +13,11 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
using namespace Alepha::Testing::literals::test_literals;
|
||||||
|
|
||||||
struct Tester;
|
struct Tester;
|
||||||
struct foobar_tag { using averant= Tester; };
|
struct foobar_tag { using averant= Tester; };
|
||||||
|
|
||||||
@ -145,8 +150,7 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
auto simpleTest= "Simple attestation test"_test <=[]
|
||||||
main()
|
|
||||||
{
|
{
|
||||||
Tester::test();
|
Tester::test();
|
||||||
//attest( FoobarFact::permission );
|
//attest( FoobarFact::permission );
|
||||||
@ -182,8 +186,7 @@ main()
|
|||||||
checker( lk );
|
checker( lk );
|
||||||
|
|
||||||
auto myInt= makeUnique< int >();
|
auto myInt= makeUnique< int >();
|
||||||
return EXIT_SUCCESS;
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,6 @@ static_assert( __cplusplus > 2020'00 );
|
|||||||
|
|
||||||
using Alepha::argcnt_t, Alepha::argvec_t;
|
using Alepha::argcnt_t, Alepha::argvec_t;
|
||||||
|
|
||||||
int
|
|
||||||
main( const argcnt_t argcnt, const argvec_t argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
using namespace Alepha::Testing::literals;
|
using namespace Alepha::Testing::literals;
|
||||||
|
|||||||
@ -7,16 +7,7 @@ static_assert( __cplusplus > 2020'00 );
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
namespace UnitTest= Alepha::Testing::exports;
|
namespace UnitTest= Alepha::Testing::exports;
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const *const argvec )
|
|
||||||
{
|
|
||||||
return UnitTest::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
using namespace Alepha::Utility::exports::evaluation_helpers;
|
using namespace Alepha::Utility::exports::evaluation_helpers;
|
||||||
using namespace UnitTest::literals;
|
using namespace UnitTest::literals;
|
||||||
using UnitTest::TableTest;
|
using UnitTest::TableTest;
|
||||||
|
|||||||
@ -5,13 +5,6 @@ static_assert( __cplusplus > 2020'00 );
|
|||||||
#include <Alepha/Utility/evaluation_helpers.h>
|
#include <Alepha/Utility/evaluation_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main( const int argcnt, const char *const *const argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
using namespace Alepha::Testing::exports;
|
using namespace Alepha::Testing::exports;
|
||||||
|
|||||||
@ -12,16 +12,7 @@ namespace
|
|||||||
{
|
{
|
||||||
using Alepha::exports::types::argcnt_t;
|
using Alepha::exports::types::argcnt_t;
|
||||||
using Alepha::exports::types::argvec_t;
|
using Alepha::exports::types::argvec_t;
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main( const argcnt_t argcnt, const argvec_t argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
namespace util= Alepha::Utility;
|
namespace util= Alepha::Utility;
|
||||||
using namespace Alepha::Testing::exports;
|
using namespace Alepha::Testing::exports;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,6 @@
|
|||||||
#include <Alepha/Atomic/Turnstile.h>
|
#include <Alepha/Atomic/Turnstile.h>
|
||||||
using Alepha::Atomic::Turnstile;
|
using Alepha::Atomic::Turnstile;
|
||||||
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
namespace example1
|
namespace example1
|
||||||
|
|||||||
@ -30,6 +30,7 @@ set( FULL_TEST_NAME ${TEST_DOMAIN}.${TEST_NAME} )
|
|||||||
|
|
||||||
add_executable( ${FULL_TEST_NAME} ${TEST_NAME}.cc )
|
add_executable( ${FULL_TEST_NAME} ${TEST_NAME}.cc )
|
||||||
add_test( ${FULL_TEST_NAME} ${FULL_TEST_NAME} )
|
add_test( ${FULL_TEST_NAME} ${FULL_TEST_NAME} )
|
||||||
|
target_link_libraries( ${FULL_TEST_NAME} unit-test )
|
||||||
|
|
||||||
endfunction( unit_test )
|
endfunction( unit_test )
|
||||||
|
|
||||||
|
|||||||
@ -10,16 +10,7 @@ namespace
|
|||||||
{
|
{
|
||||||
using Alepha::Hydrogen::exports::types::argcnt_t;
|
using Alepha::Hydrogen::exports::types::argcnt_t;
|
||||||
using Alepha::Hydrogen::exports::types::argvec_t;
|
using Alepha::Hydrogen::exports::types::argvec_t;
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main( const argcnt_t argcnt, const argvec_t argvec )
|
|
||||||
{
|
|
||||||
return Alepha::Testing::runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
using namespace Alepha::Testing::exports;
|
using namespace Alepha::Testing::exports;
|
||||||
using namespace Alepha::Hydrogen::exports::comparisons;
|
using namespace Alepha::Hydrogen::exports::comparisons;
|
||||||
using namespace Alepha::Hydrogen::exports::capabilities;
|
using namespace Alepha::Hydrogen::exports::capabilities;
|
||||||
|
|||||||
@ -351,9 +351,3 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
main( const argcnt_t argcnt, const argvec_t argvec )
|
|
||||||
{
|
|
||||||
return runAllTests( argcnt, argvec );
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user