gencpp/test/_old/parsed/test.parsing.cpp
Ed_ 2e5e31ed3b gencpp : General refactors to dependencies
Mostly just cleanup and renaming of certain stuff (mostly in dependencies).

* Changed uw and sw to usize and ssize.
* Removed zpl_cast usage throughout dependencies
* No longer using GEN_DEF_INLINE & GEN_IMPL_INLINE
* header_start.hpp renamed to platform.hpp for depdendencies header.
2024-10-27 18:58:37 -04:00

76 lines
1.1 KiB
C++

#ifdef GEN_TIME
#define GEN_FEATURE_PARSING
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
#define GEN_BENCHMARK
#include "Array.Parsed.hpp"
#include "Buffer.Parsed.hpp"
#include "HashTable.Parsed.hpp"
#include "Ring.Parsed.hpp"
#include "Sanity.Parsed.hpp"
#include "SOA.cpp"
#include "gen.cpp"
using namespace gen;
// TODO : Need to make a more robust test suite
int gen_main()
{
gen::init();
gen_sanity();
gen_array( u8 );
gen_array( ssize );
gen_buffer( u8 );
gen_hashtable( u32 );
gen_ring( s16 );
gen_ring( usize );
gen_array_file();
gen_buffer_file();
gen_hashtable_file();
gen_ring_file();
Builder soa_test; soa_test.open( "SOA.gen.hpp" );
soa_test.print( parse_using( code(
using u16 = unsigned short;
)));
soa_test.print( def_include( txt("gen.hpp")));
soa_test.print( def_using_namespace( name(gen) ) );
soa_test.print( gen_SOA(
parse_struct( code(
struct TestStruct
{
u8 A;
u16 B;
u32 C;
u64 D;
};
))
));
soa_test.write();
gen::deinit();
return 0;
}
#endif
#ifdef runtime
int main()
{
return 0;
}
#endif