Example #1
0
int testAll() {
  Debug::init();
  testStringConvertion();
  testTimeQueue();
  testRectangleIterator();
  testValueCheck();
  testSplit();
  testShortestPath();
  testAStar();
  testShortestPath2();
  testShortestPathReverse();
  testRange();
  testRange2();
  testContains();
  testPredicates();
  testOptional();
  testMustInitialize();
  testVec2();
  testConcat();
  testTable();
  testVec2();
  testRectangle();
  testProjection();
  testRandomExit();
  testCombine();
  testSectors1();
  testSectors2();
  testSectors3();
  testReverse();
  testReverse2();
  testReverse3();
  Debug() << "-----===== OK =====-----";
  return 0;
}
int
main(int argc, char **argv)
{
  if (argc == 2)
    scale = atoi(argv[1]);

  (void)test_context(1 * scale);
  ArrayPool<T> pool;

  pool.setSize(10 * scale);

  plan(0);

  testSLList(pool);
  testDLList(pool);
  testSLCList(pool);
  testDLCList(pool);
  testSLFifoList(pool);
  testDLFifoList(pool);
  testSLCFifoList(pool);
  testDLCFifoList(pool);

  testConcat(pool);

  return exit_status();
}
Example #3
0
File: strlib.c Project: cs50/spl
void testStrlibModule(void) {
   testConcat();
   testIthChar();
   testSubString();
   testCharToString();
   testStringLength();
   testCopyString();
   testStringEqual();
   testStringEqualIgnoreCase();
   testStringCompare();
   testStartsWith();
   testEndsWith();
   testFindChar();
   testFindString();
   testFindLastChar();
   testFindLastString();
   testConvertToLowerCase();
   testConvertToUpperCase();
   testIntegerToString();
   testStringToInteger();
   testRealToString();
   testStringToReal();
   testTrim();
   testQuoteString();
   testQuoteHTML();
   testStringArrayLength();
   testSearchStringArray();
}
int main() {
	testBuildingWithIndividualChars();
	testBuildingWithStringProviders();
	testConcat();
	testCharTypes();
	testStringProviderWithExplicitSize();
	testCharAt();
	testFind();
	testRFind();
	testSubstring();
}
Example #5
0
int main()
{
	try
	{
		testSingle("schloss");
		
		testConcat("schloss","dagstuhl");
		testConcat("dagstuhl","schloss");
		testConcat("schloss","");
		testConcat("","schloss");
		testConcat("dagstuhl","");
		testConcat("","dagstuhl");
		testConcat("aaaaaaa","aaaaaaaaaa");
		testConcat("","aaaaaaaaaa");
		testConcat("aaaaaaa","");
		testConcat("abcdefghi","jklmnopqrs");
		testConcat("jklmnopqrs","abcdefghi");
	}
	catch(std::exception const & ex)
	{
		std::cerr << ex.what() << std::endl;
		return EXIT_FAILURE;
	}
}