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:
parent
aa8915bdf6
commit
efa1092199
@ -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 {
|
||||
$if windows {
|
||||
if g.pref.os == .windows {
|
||||
if g.force_main_console {
|
||||
return false
|
||||
}
|
||||
|
1
vlib/v/gen/c/testdata/console_windows_program.c.must_have
vendored
Normal file
1
vlib/v/gen/c/testdata/console_windows_program.c.must_have
vendored
Normal file
@ -0,0 +1 @@
|
||||
int wmain(int ___argc, wchar_t* ___argv[], wchar_t* ___envp[]){
|
6
vlib/v/gen/c/testdata/console_windows_program.vv
vendored
Normal file
6
vlib/v/gen/c/testdata/console_windows_program.vv
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// vtest vflags: -cc msvc -os windows
|
||||
|
||||
[console]
|
||||
fn main() {
|
||||
println('hello world')
|
||||
}
|
1
vlib/v/gen/c/testdata/gui_windows_program.c.must_have
vendored
Normal file
1
vlib/v/gen/c/testdata/gui_windows_program.c.must_have
vendored
Normal file
@ -0,0 +1 @@
|
||||
int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, LPWSTR cmd_line, int show_cmd){
|
8
vlib/v/gen/c/testdata/gui_windows_program.vv
vendored
Normal file
8
vlib/v/gen/c/testdata/gui_windows_program.vv
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// vtest vflags: -cc msvc -os windows
|
||||
import sokol
|
||||
|
||||
const used_import = sokol.used_import
|
||||
|
||||
fn main() {
|
||||
println('hello world')
|
||||
}
|
1
vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.c.must_have
vendored
Normal file
1
vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.c.must_have
vendored
Normal file
@ -0,0 +1 @@
|
||||
int wmain(int ___argc, wchar_t* ___argv[], wchar_t* ___envp[]){
|
9
vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.vv
vendored
Normal file
9
vlib/v/gen/c/testdata/gui_windows_program_with_console_tag.vv
vendored
Normal 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')
|
||||
}
|
Loading…
Reference in New Issue
Block a user