📄 integration_test.c
字号:
#ifndef lintstatic char sccsid[] = "@(#)integration_test.c 1.1 92/07/30 Copyr 1990 Sun Micro";#endif/* * Copyright (c) 1990 by Sun Microsystems, Inc. */#include <stdio.h>#include <sdrtns.h> /* sdrtns.h should always be included */#include <gttest.h>#include <errmsg.h>externstruct test isubtests[];externchar *device_name;staticchar textbuf[512];staticchar errtxt[128];/**********************************************************************/char *integration_test(isub)/**********************************************************************/int isub;{ struct test *tl; int it; int errors=0; char *errmsg; func_name = "integration_test"; TRACE_IN /* lock the desktop completely during test */ /* (void)lock_desktop(device_name); */ /* Initialize the system */ if (!open_hawk()) { TRACE_OUT return DLXERR_SYSTEM_INITIALIZATION; } for (tl = isubtests, it = 1; tl ; tl = tl->nexttest, it *=2) { if (it & isub) { /* wacht out for user interrupt */ (void)check_key(); (void)sprintf(textbuf, "Integration subtest '%s': ", tl->testname); (void)strcat(textbuf, "started.\n"); pmessage(textbuf); errmsg = (tl->proc)(); (void)sprintf(textbuf, "Integration subtest '%s': ", tl->testname); (void)strcpy(textbuf, textbuf); if (errmsg) { errors++; (void)strcat(textbuf, "*** "); (void)strcat(textbuf, errmsg); error_report(textbuf); } else { (void)strcat(textbuf, "OK.\n"); pmessage(textbuf); } } } /* close system */ (void)close_hawk(); /* release window system */ /* unlock_desktop(); */ if (errors) { sprintf(errtxt, DLXERR_INTEGRATION_TEST_FAILED, errors); TRACE_OUT return errtxt; } else { TRACE_OUT return (char *)0; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -