Added system.program_results for controlling the exit code of the program under normal circumstances
Implemented operators like +=, -=, etc for ordinals, floats and string Programs using the UnitTest module will now report the number of failed tests as the exit code of test runs (0 for successful run)
This commit is contained in:
parent
2bd14f4ba8
commit
489340658e
5 changed files with 58 additions and 13 deletions
|
|
@ -707,13 +707,13 @@ proc genMainProc(m: BModule) =
|
|||
CommonMainBody & "}$n"
|
||||
PosixCMain = "int main(int argc, char** args, char** env) {$n" &
|
||||
" cmdLine = args;$n" & " cmdCount = argc;$n" & " gEnv = env;$n" &
|
||||
" NimMain();$n" & " return 0;$n" & "}$n"
|
||||
" NimMain();$n" & " return nim_program_result;$n" & "}$n"
|
||||
WinNimMain = "N_CDECL(void, NimMain)(void) {$n" &
|
||||
CommonMainBody & "}$n"
|
||||
WinCMain = "N_STDCALL(int, WinMain)(HINSTANCE hCurInstance, $n" &
|
||||
" HINSTANCE hPrevInstance, $n" &
|
||||
" LPSTR lpCmdLine, int nCmdShow) {$n" &
|
||||
" NimMain();$n" & " return 0;$n" & "}$n"
|
||||
" NimMain();$n" & " return nim_program_result;$n" & "}$n"
|
||||
WinNimDllMain = "N_LIB_EXPORT N_CDECL(void, NimMain)(void) {$n" &
|
||||
CommonMainBody & "}$n"
|
||||
WinCDllMain =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue