int
main (int argc, char **argv)
{
  verbose = (getenv ("PEGASUS_TEST_VERBOSE")) ? true : false;
  CIMClient client;
  try
  {
    client.connectLocal ();
  }
  catch (const Exception & e)
  {
    cerr << e.getMessage () << endl;
    return -1;
  }

  if (argc != 3)
    {
      _usage ();
      return 1;
    }

  else
    {
      const char *opt = argv[1];

      if (String::equalNoCase (opt, "test"))
        {
          providerNamespace = CIMNamespaceName (argv[2]);
          _test1 (client,"WQL");
          _test1 (client,"DMTF:CQL");

          _test2 (client);
          _test3(client);
          _test4(client);          
        }
      else
        {
          cerr << "Invalid option: " << opt << endl;
          _usage ();
          return -1;
        }
    }
    cout << argv[0] << " +++++ completed" << endl;

  return 0;
}
int main(int argc, char** argv)
{
    int durationSeconds = 0;
    char testUserid[256];
    char testPasswd[256];

    if (argc != 2)
    {
        cerr
            << "Invalid argument count, only parameter is sleep time in seconds"
            << endl;
        return 1;
    }

    const char * optOne = argv[1];
    durationSeconds = atoi(optOne);

    cout << "Testing connectLocal()" << endl;

    if (_test1(durationSeconds, NULL, NULL) == TEST_FAILED)
    {
        cerr << argv[0] << "----- _test1() localConnect failed" << endl;
        return 1;
    }

    if (_test2(durationSeconds, NULL, NULL) == TEST_FAILED)
    {
        cerr << argv[0] << "----- _test2() localConnect failed" << endl;
        return 1;
    }

    if ((getenv("PEGASUS_TEST_USER_ID")) &&
        (getenv("PEGASUS_TEST_USER_PASS")))
    {

        strncpy(testUserid, getenv("PEGASUS_TEST_USER_ID"),
            sizeof(testUserid));
        strncpy(testPasswd, getenv("PEGASUS_TEST_USER_PASS"),
            sizeof(testPasswd));

        cout << "Testing connect() with "
            << "host: " << System::getHostName()
            << ", port: 5988"
            << ", user: "******"----- _test1() connect failed" << endl;
            return 1;
        }

        if (_test2(durationSeconds, testUserid, testPasswd) == TEST_FAILED)
        {
            cerr << argv[0] << "----- _test2() connect failed" << endl;
            return 1;
        }
    }
    else
    {
        cout << "Skipping connect() test, PEGASUS_TEST_USER_ID and "
            "PEGASUS_TEST_USER_PASS not defined." << endl;
    }

    PEGASUS_STD(cout) << "+++++ passed all tests" << PEGASUS_STD(endl);
    return 0;
}
void str_array_type_test(){
	_test1();
	//_test2();
	//_test3();
}