Changeset 8175 for trunk/src/win32k/kKrnlLib/testcase
- Timestamp:
- Apr 1, 2002, 2:48:41 PM (24 years ago)
- 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:47bird Exp $1 /* $Id: tstkKrnlLib.c,v 1.2 2002-04-01 12:44:11 bird Exp $ 2 2 * 3 3 * kKrnlLib test module. … … 261 261 int TestCase1(int argc, char **argv); 262 262 int TestCase2(void); 263 int CompareOptions(struct kKLOptions *pOpt );263 int CompareOptions(struct kKLOptions *pOpt, ULONG fExpKernel, ULONG ulExpKernelBuild, USHORT usExpVerMajor, USHORT usExpVerMinor); 264 264 int TestCaseExeLoad2(void); 265 265 int WritekKrnlLibDll(void); … … 641 641 { 642 642 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; 649 649 650 650 if (argc >= 9 && argv[8][1] == '\0') … … 653 653 case '\0': break; 654 654 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; 656 656 } 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])); 662 658 } 663 659 else … … 712 708 opt.usCom = OUTPUT_COM1; 713 709 714 rc = CompareOptions(SSToDS(&opt) );710 rc = CompareOptions(SSToDS(&opt), -1, -1, (USHORT)-1, (USHORT)-1); 715 711 if (rc == NO_ERROR) 716 712 { … … 852 848 * @returns 0 on success. 853 849 * 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. 855 855 * @status completely implemented. 856 856 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 857 857 */ 858 int CompareOptions(struct kKLOptions *pOpt) 858 int CompareOptions(struct kKLOptions *pOpt, ULONG fExpKernel, ULONG ulExpKernelBuild, 859 USHORT usExpVerMajor, USHORT usExpVerMinor) 859 860 { 860 861 int rc = 0; … … 868 869 if (options.fLogging != pOpt->fLogging) 869 870 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++); 880 881 } 881 882 if (options.cbSwpHeapInit != pOpt->cbSwpHeapInit)
Note:
See TracChangeset
for help on using the changeset viewer.