Ignore:
Timestamp:
Apr 1, 2002, 2:48:41 PM (24 years ago)
Author:
bird
Message:

Moved build number, kernel flags and os version out of the option struct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/kKrnlLib/testcase/tstkKrnlLib.c

    r8138 r8175  
    1 /* $Id: tstkKrnlLib.c,v 1.1 2002-03-30 17:05:47 bird Exp $
     1/* $Id: tstkKrnlLib.c,v 1.2 2002-04-01 12:44:11 bird Exp $
    22 *
    33 * kKrnlLib test module.
     
    261261int     TestCase1(int argc, char **argv);
    262262int     TestCase2(void);
    263 int     CompareOptions(struct kKLOptions *pOpt);
     263int     CompareOptions(struct kKLOptions *pOpt, ULONG fExpKernel, ULONG ulExpKernelBuild, USHORT usExpVerMajor, USHORT usExpVerMinor);
    264264int     TestCaseExeLoad2(void);
    265265int     WritekKrnlLibDll(void);
     
    641641        {
    642642            struct kKLOptions opt = DEFAULT_OPTION_ASSIGMENTS;
    643             opt.fKernel = 0;
    644             if (argv[6][0] == 'S')  opt.fKernel |= KF_SMP;
    645             if (argv[6][0] == '4')  opt.fKernel |= KF_W4;
    646             if (argv[6][0] == 'U')  opt.fKernel |= KF_UNI;
    647             if (argv[7][0] == 'A')  opt.fKernel |= KF_ALLSTRICT;
    648             if (argv[7][0] == 'H')  opt.fKernel |= KF_HALFSTRICT;
     643            ULONG   fExpKernel = 0;
     644            if (argv[6][0] == 'S')  fExpKernel |= KF_SMP;
     645            if (argv[6][0] == '4')  fExpKernel |= KF_W4;
     646            if (argv[6][0] == 'U')  fExpKernel |= KF_UNI;
     647            if (argv[7][0] == 'A')  fExpKernel |= KF_ALLSTRICT;
     648            if (argv[7][0] == 'H')  fExpKernel |= KF_HALFSTRICT;
    649649
    650650            if (argc >= 9 && argv[8][1] == '\0')
     
    653653                    case '\0': break;
    654654                    default:
    655                     opt.fKernel |= (argv[8][0] - (argv[8][0] >= 'a' ? 'a'-1 : 'A'-1)) << KF_REV_SHIFT;
     655                    fExpKernel |= (argv[8][0] - (argv[8][0] >= 'a' ? 'a'-1 : 'A'-1)) << KF_REV_SHIFT;
    656656                }
    657             opt.ulBuild = atoi(argv[5]);
    658             opt.usVerMajor = (USHORT)atoi(argv[3]);
    659             opt.usVerMinor = (USHORT)atoi(argv[4]);
    660 
    661             rc = CompareOptions(SSToDS(&opt));
     657            rc = CompareOptions(SSToDS(&opt), fExpKernel, atoi(argv[5]), (USHORT)atoi(argv[3]), (USHORT)atoi(argv[4]));
    662658        }
    663659        else
     
    712708            opt.usCom           = OUTPUT_COM1;
    713709
    714             rc = CompareOptions(SSToDS(&opt));
     710            rc = CompareOptions(SSToDS(&opt), -1, -1, (USHORT)-1, (USHORT)-1);
    715711            if (rc == NO_ERROR)
    716712            {
     
    852848 * @returns 0 on success.
    853849 *          number of mismatches on error.
    854  * @param   pOpt
     850 * @param   pOpt                Expected option struct.
     851 * @param   fExpKernel          Expected stuff.
     852 * @param   ulExpKernelBuild    Expected stuff.
     853 * @param   usExpVerMajor       Expected stuff.
     854 * @param   usExpVerMinor       Expected stuff.
    855855 * @status  completely implemented.
    856856 * @author  knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    857857 */
    858 int CompareOptions(struct kKLOptions *pOpt)
     858int CompareOptions(struct kKLOptions *pOpt, ULONG fExpKernel, ULONG ulExpKernelBuild,
     859                   USHORT usExpVerMajor, USHORT usExpVerMinor)
    859860{
    860861    int rc = 0;
     
    868869    if (options.fLogging != pOpt->fLogging)
    869870        printf("fLogging = %d - should be %d\n", options.fLogging, pOpt->fLogging, rc++);
    870     if (pOpt->ulBuild != ~0UL)
    871     {
    872         if (options.fKernel != pOpt->fKernel)
    873             printf("fKernel = %x - should be %x\n", options.fKernel, pOpt->fKernel, rc++);
    874         if (options.ulBuild != pOpt->ulBuild)
    875             printf("ulBuild = %d - should be %d\n", options.ulBuild, pOpt->ulBuild, rc++);
    876         if (options.usVerMajor != pOpt->usVerMajor)
    877             printf("usVerMajor = %d - should be %d\n", options.usVerMajor, pOpt->usVerMajor, rc++);
    878         if (options.usVerMinor != pOpt->usVerMinor)
    879             printf("usVerMinor = %d - should be %d\n", options.usVerMinor, pOpt->usVerMinor, rc++);
     871    if (ulExpKernelBuild != ~0UL)
     872    {
     873        if (fKernel != fExpKernel)
     874            printf("fKernel = %x - should be %x\n", fKernel, fExpKernel, rc++);
     875        if (ulKernelBuild != ulExpKernelBuild)
     876            printf("ulBuild = %d - should be %d\n", ulKernelBuild, ulExpKernelBuild, rc++);
     877        if (usVerMajor != usExpVerMajor)
     878            printf("usVerMajor = %d - should be %d\n", usVerMajor, usExpVerMajor, rc++);
     879        if (usVerMinor != usExpVerMinor)
     880            printf("usVerMinor = %d - should be %d\n", usVerMinor, usExpVerMinor, rc++);
    880881    }
    881882    if (options.cbSwpHeapInit != pOpt->cbSwpHeapInit)
Note: See TracChangeset for help on using the changeset viewer.