예제 #1
0
int wmain(int argc, wchar_t *argv[])
{
	assertRetVal(ProcessGlobalsTest(), 1);

	ff::ProcessGlobals globals;
	ff::GlobalsScope globalsScope(globals);
	assertRetVal(globals.IsValid(), 1);

	bool runPerfTests = argc > 1 && !wcscmp(argv[1], L"perf");

	if (runPerfTests)
	{
		assertRetVal(DictPerfTest(), 1);
	}
	else
	{
		assertRetVal(JsonParserTest(), 1);
		assertRetVal(JsonPrintTest(), 1);
		assertRetVal(JsonTokenizerTest(), 1);
		assertRetVal(MapTest(), 1);
		assertRetVal(PoolTest(), 1);
		assertRetVal(SmallDictTest(), 1);
		assertRetVal(SmallDictPersistTest(), 1);
		assertRetVal(SmartPtrTest(), 1);
		assertRetVal(SortTest(), 1);
		assertRetVal(StringTest(), 1);
		assertRetVal(StringHashTest(), 1);
		assertRetVal(VectorTest(), 1);
	}

	return 0;
}
예제 #2
0
파일: urtl.c 프로젝트: conioh/os-design
NTSTATUS
main(
    IN ULONG argc,
    IN PCH argv[],
    IN PCH envp[],
    IN ULONG DebugParameter OPTIONAL
    )

{
    ULONG i;
    char c, *s;
    PCH *Arguments;
    PCH *Variables;
    PCH Parameters[ RTL_USER_PROC_PARAMS_DEBUGFLAG+2 ];

    ULONG TestVector = 0;

    Arguments = argv;
    Variables = envp;
    Parameters[ RTL_USER_PROC_PARAMS_IMAGEFILE ] =
         "Full Path Specification of Image File goes here";

    Parameters[ RTL_USER_PROC_PARAMS_CMDLINE ] =
         "Complete Command Line goes here";

    Parameters[ RTL_USER_PROC_PARAMS_DEBUGFLAG ] =
         "Debugging String goes here";

    Parameters[ RTL_USER_PROC_PARAMS_DEBUGFLAG+1 ] = NULL;

    MyHeap = RtlProcessHeap();


#if DBG
    DbgPrint( "Entering URTL User Mode Test Program\n" );
    DbgPrint( "argc = %ld\n", argc );
    for (i=0; i<=argc; i++) {
        DbgPrint( "argv[ %ld ]: %s\n",
                  i,
                  argv[ i ] ? argv[ i ] : "<NULL>"
                );
        }
    DbgPrint( "\n" );
    for (i=0; envp[i]; i++) {
        DbgPrint( "envp[ %ld ]: %s\n", i, envp[ i ] );
        }
#endif
    i = 1;
    if (argc > 1 ) {
        while (--argc) {
            s = *++argv;
            while ((c = *s++) != '\0') {
                switch (c) {

                case 'V':
                case 'v':
                    TestVector = i++;
                    break;
                default:
                    DbgPrint( "urtl: invalid test code - '%s'", *argv );
                    break;
                }
            }
        }
    }

    if ( TestVector ) {
        VectorTest(Arguments,Variables,Parameters);
    }

    return( STATUS_SUCCESS );
}