Test building & generation fixed with altest scripts

This commit is contained in:
Edward R. Gonzalez 2023-08-20 15:45:06 -04:00
parent 2f7836b191
commit 05fa62eced
7 changed files with 17 additions and 17 deletions

4
.vscode/launch.json vendored
View File

@ -10,7 +10,7 @@
"name": "Debug gentime lldb",
"program": "${workspaceFolder}/test/test.exe",
"args": [],
"cwd": "${workspaceFolder}/test/gen/",
"cwd": "${workspaceFolder}/test/",
"postRunCommands": [
]
},
@ -20,7 +20,7 @@
"name": "Debug gentime vsdbg",
"program": "${workspaceFolder}/test/build/test.exe",
"args": [],
"cwd": "${workspaceFolder}/test/gen/",
"cwd": "${workspaceFolder}/test/",
"visualizerFile": "${workspaceFolder}/scripts/gencpp.natvis"
},
{

View File

@ -72,7 +72,7 @@ struct String
header->Capacity = capacity;
header->Length = 0;
String result = { (char*)allocation + header_size };
String result = { rcast(char*, allocation) + header_size };
return result;
}

View File

@ -298,7 +298,6 @@ if ( $vendor -match "msvc" )
#endregion Configuration
#region Building
$path_build = Join-Path $path_root build
$path_project = Join-Path $path_root project
$path_scripts = Join-Path $path_root scripts
@ -348,14 +347,14 @@ if ( $singleheader )
New-Item -ItemType Directory -Path $path_gen
}
$includes = @($path_project)
$includes = @( $path_project )
$unit = join-path $path_singleheader "singleheader.cpp"
$executable = join-path $path_build "singleheader.exe"
build-simple $includes $unit $executable
Push-Location $path_singleheader
if ( Test-Path($executable) ) {
if ( Test-Path( $executable ) ) {
write-host "`nRunning singleheader generator"
$time_taken = Measure-Command { & $executable
| ForEach-Object {
@ -385,13 +384,11 @@ if ( $test )
$path_bootstrap = join-path $path_project gen
$include = $path_bootstrap
$includes = @( $path_bootstrap )
$unit = join-path $path_test "test.cpp"
$object = join-path $path_build "test.obj"
$executable = join-path $path_build "test.exe"
$pdb = join-path $path_build "test.pdb"
build-simple $include $unit $executable
build-simple $includes $unit $executable
Push-Location $path_test
if ( Test-Path( $executable ) ) {
@ -408,7 +405,6 @@ if ( $test )
#endregion Building
#region Formatting
function format-cpp
{
param( $path, $include, $exclude )
@ -457,7 +453,12 @@ if ( $singleheader -and (Test-Path (Join-Path $path_singleheader "gen/gen.hpp"))
if ( $test )
{
$path_gen = join-path $path_test gen
$include = @(
'*.gen.hpp'
)
$exclude = $null
format-cpp $path_gen $include $exclude
}
#endregion Formatting

View File

@ -63,8 +63,7 @@ void check_sanity()
log_fmt("Num String Cache Arenas : %llu TotalSize: %llu !\n", StringArenas.num(), StringArenas.num() * SizePer_StringArena);
log_fmt("Num String Cache : %llu\n", StringCache.Entries.num(), StringCache);
Builder builder;
builder.open( "gen/sanity.gen.hpp" );
Builder builder = Builder::open( "./gen/sanity.gen.hpp" );
idx = typedefs.num();
#ifdef GEN_BENCHMARK

View File

@ -1,3 +1,4 @@
#if GEN_TIME
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
#define GEN_ENFORCE_STRONG_CODE_TYPES
#define GEN_EXPOSE_BACKEND
@ -8,13 +9,12 @@
#include "SOA.cpp"
#include "test.singleheader_ast.cpp"
#if GEN_TIME
int gen_main()
{
using namespace gen;
log_fmt("\ngen_time:");
check_sanity();
// check_sanity();
// check_SOA();

View File

@ -9,7 +9,7 @@ using namespace gen;
void check_singleheader_ast()
{
#define project_dir "../../"
#define project_dir "../"
gen::init();
log_fmt("\ncheck_singleheader_ast:\n");

BIN
vc140.pdb Normal file

Binary file not shown.