1
0
forked from Alepha/Alepha

Make unit tests use the testing lib main function.

This commit is contained in:
2023-10-24 00:58:38 -04:00
parent 2ebb60e888
commit cafc66e09f
14 changed files with 8 additions and 88 deletions

View File

@ -5,12 +5,6 @@ static_assert( __cplusplus > 2020'00 );
#include <Alepha/Testing/test.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 <=[]
{
using namespace Alepha::Hydrogen::exports::auto_raii;

View File

@ -12,16 +12,7 @@ namespace
{
using Alepha::Hydrogen::exports::types::argcnt_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;
using namespace Alepha::Testing::exports;
namespace boost= Alepha::boost;

View File

@ -11,12 +11,6 @@ static_assert( __cplusplus > 2020'00 );
#include <cassert>
int
main( const int argcnt, const char *const *const argvec )
{
return Alepha::Testing::runAllTests( argcnt, argvec );
}
namespace
{
using namespace Alepha::Utility::exports::evaluation_helpers;

View File

@ -156,9 +156,3 @@ namespace
assert( mtx.getWaiters().size() == 0 );
};
}
int
main( const int argcnt, const char *const *const argvec )
{
return runAllTests( { argvec + 1, argvec + argcnt } );
}

View File

@ -92,9 +92,3 @@ namespace
thread2.join();
};
}
int
main( const int argcnt, const char *const *const argvec )
{
return runAllTests( { argvec + 1, argvec + argcnt } );
}

View File

@ -1,5 +1,7 @@
#include "../Attestation.h"
#include <Alepha/Testing/test.h>
#include <cstddef>
#include <cstdlib>
#include <algorithm>
@ -11,8 +13,11 @@
#include <iostream>
namespace
{
using namespace Alepha::Testing::literals::test_literals;
struct Tester;
struct foobar_tag { using averant= Tester; };
@ -145,8 +150,7 @@ namespace
}
int
main()
auto simpleTest= "Simple attestation test"_test <=[]
{
Tester::test();
//attest( FoobarFact::permission );
@ -182,8 +186,7 @@ main()
checker( lk );
auto myInt= makeUnique< int >();
return EXIT_SUCCESS;
}
};

View File

@ -8,12 +8,6 @@ static_assert( __cplusplus > 2020'00 );
using Alepha::argcnt_t, Alepha::argvec_t;
int
main( const argcnt_t argcnt, const argvec_t argvec )
{
return Alepha::Testing::runAllTests( argcnt, argvec );
}
namespace
{
using namespace Alepha::Testing::literals;

View File

@ -7,16 +7,7 @@ static_assert( __cplusplus > 2020'00 );
namespace
{
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 UnitTest::literals;
using UnitTest::TableTest;

View File

@ -5,13 +5,6 @@ static_assert( __cplusplus > 2020'00 );
#include <Alepha/Utility/evaluation_helpers.h>
int
main( const int argcnt, const char *const *const argvec )
{
return Alepha::Testing::runAllTests( argcnt, argvec );
}
namespace
{
using namespace Alepha::Testing::exports;

View File

@ -12,16 +12,7 @@ namespace
{
using Alepha::exports::types::argcnt_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;
using namespace Alepha::Testing::exports;

View File

@ -1,11 +1,6 @@
#include <Alepha/Atomic/Turnstile.h>
using Alepha::Atomic::Turnstile;
int
main()
{
}
namespace
{
namespace example1

View File

@ -30,6 +30,7 @@ set( FULL_TEST_NAME ${TEST_DOMAIN}.${TEST_NAME} )
add_executable( ${FULL_TEST_NAME} ${TEST_NAME}.cc )
add_test( ${FULL_TEST_NAME} ${FULL_TEST_NAME} )
target_link_libraries( ${FULL_TEST_NAME} unit-test )
endfunction( unit_test )

View File

@ -10,16 +10,7 @@ namespace
{
using Alepha::Hydrogen::exports::types::argcnt_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::Hydrogen::exports::comparisons;
using namespace Alepha::Hydrogen::exports::capabilities;

View File

@ -351,9 +351,3 @@ namespace
}
}
}
int
main( const argcnt_t argcnt, const argvec_t argvec )
{
return runAllTests( argcnt, argvec );
}