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

builtin: add libbacktrace as option for generating stack traces (#14277)

This commit is contained in:
Ned
2022-05-05 02:17:05 +08:00
committed by GitHub
parent 4242e7610f
commit 76a7354506
12 changed files with 10720 additions and 3 deletions

View File

@ -0,0 +1,14 @@
fn test_g_main_argc() {
assert g_main_argc > 0
}
fn test_g_main_argv() {
assert g_main_argv != 0
mut first_arg := ''
$if windows {
first_arg = unsafe { string_from_wide(&&u16(g_main_argv)[0]) }
} $else {
first_arg = unsafe { cstring_to_vstring(&&char(g_main_argv)[0]) }
}
assert first_arg.contains('builtin_test')
}