mirror of
https://github.com/Ed94/gencpp.git
synced 2024-11-12 20:04:52 -08:00
Ed_
257e9ebf11
Decided not to support the incremental API, its not necessary as the ergonomics are not that big a deal. Got operators to pass the sanity base cases, which means now all upfront constructors pass the base cases! Next up is getting it to pass the array container generation.
95 lines
1.2 KiB
C++
95 lines
1.2 KiB
C++
// Sanity check: def_comment test
|
|
|
|
// The following will show a series of base cases for the gen api.
|
|
|
|
class TestEmptyClass;
|
|
|
|
class TestEmptyClass
|
|
{
|
|
// Empty class body
|
|
};
|
|
|
|
typedef unsigned char u8;
|
|
|
|
enum ETestEnum : u8;
|
|
|
|
enum ETestEnum : u8
|
|
{
|
|
A,
|
|
B,
|
|
C,
|
|
};
|
|
enum class ETestEnumClass : u8;
|
|
|
|
extern "C"
|
|
{
|
|
// Empty extern body
|
|
}
|
|
|
|
class TestFriend
|
|
{
|
|
friend class TestFriendFwd;
|
|
};
|
|
|
|
void test_function( void );
|
|
|
|
void test_function( void )
|
|
{
|
|
// Empty function body
|
|
}
|
|
|
|
#include "../DummyInclude.hpp"
|
|
|
|
namespace TestNamespace
|
|
{
|
|
// Empty namespace body
|
|
|
|
};
|
|
|
|
enum class EBitFlagtest : u8
|
|
{
|
|
A = 1 << 0,
|
|
B = 1 << 1,
|
|
C = 1 << 2,
|
|
};
|
|
|
|
EBitFlagtest operator|( EBitFlagtest a, EBitFlagtest b );
|
|
|
|
EBitFlagtest operator|( EBitFlagtest a, EBitFlagtest b )
|
|
{
|
|
return EBitFlagtest( ( u8 )a | ( u8 )b );
|
|
}
|
|
|
|
void test_function_wparam( u8 a );
|
|
|
|
void test_function_wparams( u8 a, u8 b )
|
|
{
|
|
// Empty function body
|
|
}
|
|
|
|
void test_function_wparams2( u8 a, u8 b )
|
|
{
|
|
// Empty function body
|
|
}
|
|
|
|
|
|
class TestEmptyStruct;
|
|
|
|
class TestEmptyStruct
|
|
{
|
|
// Empty class body
|
|
};
|
|
|
|
union TestEmptyUnion
|
|
{
|
|
// Empty union body
|
|
};
|
|
|
|
using TestUsing = u8;
|
|
using namespace TestNamespace;
|
|
|
|
u8 test_variable;
|
|
u8 test_variable2 = 0x12;
|
|
|
|
// End of base case tests.
|