Delete code, adjust example to operator overload errors

This commit is contained in:
Krzosa Karol
2022-09-29 17:05:45 +02:00
parent 5cb5f12cda
commit 66b2be3550
4 changed files with 12 additions and 37 deletions

View File

@@ -270,6 +270,7 @@ const U32 COMPILE_NULL = 0x0;
const U32 COMPILE_PRINT_STATS = 0x1;
const U32 COMPILE_PRINT_ALLOCATOR_STATS_BEFORE_DESTROY = 0x2;
const U32 COMPILE_AND_RUN = 0x4;
const U32 COMPILE_TESTING = 0x8;
function void
compile_file(String filename, U32 compile_flags = COMPILE_NULL){
@@ -304,7 +305,9 @@ compile_file(String filename, U32 compile_flags = COMPILE_NULL){
}
if(is_flag_set(compile_flags, COMPILE_AND_RUN)){
int result = system("a.exe testing");
String testing = compile_flags&COMPILE_TESTING ? "testing"_s : ""_s;
String sys = string_fmt(scratch, "a.exe %Q", testing);
int result = system((char *)sys.str);
assert(result != -1);
if(result == 0){
log_info(PRINTF_GREEN "OK!" PRINTF_RESET);