test: fix windows test error

pull/4282/head
yuyi 2020-04-07 18:32:09 +08:00 committed by GitHub
parent fe0942043c
commit 426eb46166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 22 deletions

View File

@ -2741,7 +2741,12 @@ fn (g Gen) type_default(typ table.Type) string {
pub fn (g mut Gen) write_tests_main() {
g.definitions.writeln('int g_test_oks = 0;')
g.definitions.writeln('int g_test_fails = 0;')
g.writeln('int main() {')
$if windows {
g.writeln('int wmain() {')
}
$else {
g.writeln('int main() {')
}
g.writeln('\t_vinit();')
g.writeln('')
all_tfuncs := g.get_all_test_function_names()