rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, "components");
rv = NS_AutoregisterComponents();
main(int argc, char* argv[]){    nsresult rv;    if (argc < 2) {        printf("usage: %s <in-dir> <out-dir>\n", argv[0]);        return -1;    }    char* inDir = argv[1];    char* outDir = argv[2];    rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,                                          "components");    if (NS_FAILED(rv)) return rv;    CreateFun create = FileChannelWorker::Create;    Test(create, 1, inDir, outDir, 16 * 1024);#if 1    printf("FileChannelWorker *****************************\n");    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);#endif    create = FileSpecWorker::Create;    printf("FileSpecWorker ********************************\n");#if 1    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);    Test(create, 20, inDir, outDir, 16 * 1024);#endif#if 1    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);    Test(create, 20, inDir, outDir, 4 * 1024);#endif    return 0;}