1
0
forked from Alepha/Alepha

Table testing created.

Haven't tested `VectorCases` yet.
This commit is contained in:
2021-07-02 01:12:00 -04:00
parent ec07dcc83a
commit 741c0dcdcf
2 changed files with 130 additions and 2 deletions

View File

@ -1,9 +1,12 @@
static_assert( __cplusplus > 201700, "C++17 Required" );
#include <Alepha/Testing/test.h>
#include <Alepha/Testing/TableTest.h>
#include <Alepha/Utility/evaluation.h>
namespace
{
namespace UnitTest= Alepha::Testing::exports::testing;
namespace UnitTest= Alepha::Testing::exports;
}
int
@ -14,8 +17,9 @@ main( const int argcnt, const char *const *const argvec )
namespace
{
using namespace UnitTest::literals;
using namespace Alepha::Utility::exports::evaluation;
using namespace UnitTest::literals;
using UnitTest::TableTest;
auto registration= enroll <=[]
{
@ -25,4 +29,11 @@ namespace
auto named1= "named.basic.success"_test <= []{};
auto named2= -"named.basic.failure"_test <=[]{ return 1; };
int identity( int a ){ return a; }
auto namedTable1= "named.table.success"_test <=TableTest< identity >::Cases
{
{ "smoke", { 1 }, 1 },
//{ "fail", { 2 }, 1 },
};
}