mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
Finished sanity suite except for operators.
Adjusted upfront api a bit, def_using no longer handles the namespace case, a sepearate function: def_using_namespace now does. Mostly fixes to the seralization as I generate more cases to find the bugs.
This commit is contained in:
1
test/gen/DummyInclude.hpp
Normal file
1
test/gen/DummyInclude.hpp
Normal file
@ -0,0 +1 @@
|
||||
// Only for gen testing.
|
@ -1,19 +1,85 @@
|
||||
// Sanity check: def_omment test
|
||||
// Sanity check: def_comment test
|
||||
|
||||
class Test_EmptyClass;
|
||||
class Test_EmptyClass
|
||||
// The following will show a series of base cases for the gen api.
|
||||
|
||||
class TestEmptyClass;
|
||||
class TestEmptyClass
|
||||
{
|
||||
// Empty class
|
||||
// Empty class body
|
||||
|
||||
};
|
||||
|
||||
|
||||
typedef unsigned char u8;
|
||||
|
||||
enum Test_Enum : u8;
|
||||
enum Test_Enum : 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
|
||||
|
||||
};
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
Reference in New Issue
Block a user