1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.gen.c: add coutput tests for the [console] codegen to prevent future regressions

This commit is contained in:
Delyan Angelov 2021-10-06 00:14:16 +03:00
parent aa8915bdf6
commit efa1092199
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
7 changed files with 27 additions and 1 deletions

View File

@ -1483,7 +1483,7 @@ fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang as
} }
fn (mut g Gen) is_gui_app() bool { fn (mut g Gen) is_gui_app() bool {
$if windows { if g.pref.os == .windows {
if g.force_main_console { if g.force_main_console {
return false return false
} }

View File

@ -0,0 +1 @@
int wmain(int ___argc, wchar_t* ___argv[], wchar_t* ___envp[]){

View File

@ -0,0 +1,6 @@
// vtest vflags: -cc msvc -os windows
[console]
fn main() {
println('hello world')
}

View File

@ -0,0 +1 @@
int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, LPWSTR cmd_line, int show_cmd){

View File

@ -0,0 +1,8 @@
// vtest vflags: -cc msvc -os windows
import sokol
const used_import = sokol.used_import
fn main() {
println('hello world')
}

View File

@ -0,0 +1 @@
int wmain(int ___argc, wchar_t* ___argv[], wchar_t* ___envp[]){

View File

@ -0,0 +1,9 @@
// vtest vflags: -cc msvc -os windows
import sokol
const used_import = sokol.used_import
[console]
fn main() {
println('hello world')
}