ci,cgen: fix windows tests

This commit is contained in:
Delyan Angelov 2025-02-12 03:00:02 +02:00
parent 305c56dbf7
commit 694cac9443
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 11 additions and 2 deletions

View File

@ -744,7 +744,12 @@ pub fn gen(files []&ast.File, mut table ast.Table, pref_ &pref.Preferences) GenO
extern_out_str := g.extern_out.str()
b.write_string(out_str)
b.writeln('// THE END.')
b.write_string2('\n // V postincludes:\n', g.postincludes.str())
postincludes_str := g.postincludes.str()
if postincludes_str != '' {
b.write_string2('\n // V postincludes:\n', postincludes_str)
}
util.timing_measure('cgen common')
$if trace_all_generic_fn_keys ? {
gkeys := g.table.fn_generic_types.keys()

View File

@ -1,6 +1,10 @@
#include <assert.h>
int main( void ) {
#if defined(_WIN32)
int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, LPWSTR cmd_line, int show_cmd){
#else
int main(int argc, char *argv[]) {
#endif
int res = no_main__f(42);
assert(res == 987);
return 0;