Пример #1
0
TEST_P(RFC1867CR, test) {
  for (size_t i = 1; i < GetParam().size(); i++) {
    auto data = makePost({{"foo", "bar"}, {"jojo", "binky"}},
                         {{"file1", GetParam()}}, {});
    testSimple(std::move(data), GetParam().size(), i);
  }
}
Пример #2
0
TEST_F(RFC1867Test, TestSplits) {
  for (size_t i = 1; i < 500; i++) {
    size_t fileSize = 1000 + i;
    auto data = makePost(
        {{"foo", "bar"}, {"jojo", "binky"}}, {}, {{"file1", {"", fileSize}}});
    testSimple(std::move(data), 3 + 5 + fileSize, i, 3);
  }
}
Пример #3
0
int
Test::Main()
{
    TEST_INIT("printabletest");
    testSimple();
    testAsciiVariant();
    TEST_DONE();
}
Пример #4
0
TEST_F(RFC1867Test, TestHeadersChunkExtraCr) {
  // We are testing here that we correctly chunk when the parser has just
  // finished parsing a CR.
  auto numCRs = 5;
  auto headerEndingSeq = "--" + string(numCRs, '\r') + "\n";
  auto fileSize = 10;
  auto data = makePost({{"foo", "bar"}, {"jojo", "binky"}},
                       {},
                       {{"file1", {"", fileSize}}},
                       headerEndingSeq);
  // Math ensures we the parser will chunk at a '\r' with a numCRs-1
  testSimple(std::move(data), 3 + 5 + fileSize, numCRs - 1, 3);
}
int main(int argc, char **argv)
{
    ros::init(argc, argv, "test_collision_detection");
    ros::AsyncSpinner spinner(1);
    spinner.start();

    testSimple();
    findSelfCollisionAndDisplayContacts();

    ros::waitForShutdown();

    return 0;
}
Пример #6
0
    void run () override
    {
        testTrivial ();
        testSimple ();

        testOneSub ();
        testSubs ();
        testSubsShort ();

        testFailureObject ();
        testFailureArray ();
        testKeyFailure ();
    }
Пример #7
0
int main()
	{
	int err;
	test_Title("AF_INET Streams");

	err=CommInit(0);	/* ensure a workable comms environment */
	test(err==0);
	IN_SET_LOOPBACK_ADDR(&testaddr);

	testSimple();

	test_Close();
	return 0;
	}
Пример #8
0
bool CKDMArray2DTest::testAll(){
	try{
		testSimple();
		testDoublePtr();
		testSinglePtr();
		testVectorPtr();
		testCopyConstructor();
	}
	catch (std::logic_error &e){

		displayError(e.what());
		return false;
	}

	displaySuccess(TEST_FILE_NAME);

	return true;
}
Пример #9
0
int ut_ANameValuePair_General()
{
  int iRet = 0x0;

  std::cerr << "ut_ANameValuePair_General" << std::endl;
  
  testSimple(iRet);
  NEWLINE_UNIT_TEST();
  testXml(iRet);
  NEWLINE_UNIT_TEST();
  testJson(iRet);
  NEWLINE_UNIT_TEST();
  testRegValue(iRet);
  NEWLINE_UNIT_TEST();
  testHtml(iRet);
  NEWLINE_UNIT_TEST();
  testFormMultiPart(iRet);

  return iRet;
}
Пример #10
0
Prototype::Prototype() {
	setTouchEnabled(true);
	CCSize size = CCDirector::sharedDirector()->getWinSize();
	srand ( time(NULL) );
	m_bodyDef.type = b2_dynamicBody;
    m_fixtureDef.restitution = 0.4f;
    m_fixtureDef.friction = 0.2f;
    m_fixtureDef.density = 4;
    m_centerPoint = CCPointMake(0.5*size.width, 0.5*size.height);

	try {
		testSimple();
		testSeparator();
	}
	catch(exception e) {
		CCLog("Oops...%s", e.what());
	}

	scheduleUpdate();

}
Пример #11
0
TEST_F(RFC1867Test, TestSimplePost) {
  size_t fileSize = 17;
  auto data = makePost(
      {{"foo", "bar"}, {"jojo", "binky"}}, {}, {{"file1", {"", fileSize}}});
  testSimple(std::move(data), 3 + 5 + fileSize, 0, 3);
}
Пример #12
0
 virtual void test()
 {
     uint i;
     for (i = 0; i < 10; ++i) testSimple();
     for (i = 0; i < 30; ++i) testComplex();
 }