コード例 #1
0
extern "C" int main(int argc, char *argv[]) {
	SceUID msgpipe = sceKernelCreateMsgPipe("delete", PSP_MEMORY_PARTITION_USER, 0, 0x100, NULL);

	testDelete("Normal", msgpipe);
	testDelete("NULL", 0);
	testDelete("Invalid", 0xDEADBEEF);
	testDelete("Deleted", msgpipe);

	{
		msgpipe = sceKernelCreateMsgPipe("delete", PSP_MEMORY_PARTITION_USER, 0, 0x100, NULL);
		MsgPipeReceiveWaitThread wait_r1("receiving thread 1", msgpipe, NO_TIMEOUT);
		MsgPipeReceiveWaitThread wait_r2("receiving thread 2", msgpipe, 10000);
		checkpoint("With receiving threads: %08x", sceKernelDeleteMsgPipe(msgpipe));
	}

	{
		msgpipe = sceKernelCreateMsgPipe("delete", PSP_MEMORY_PARTITION_USER, 0, 0x100, NULL);
		// Send something to fill it up.
		char msg[256];
		sceKernelSendMsgPipe(msgpipe, msg, sizeof(msg), 0, NULL, NULL);
		MsgPipeSendWaitThread wait_s1("sending thread 1", msgpipe, NO_TIMEOUT);
		MsgPipeSendWaitThread wait_s2("sending thread 2", msgpipe, 10000);
		checkpoint("With sending threads: %08x", sceKernelDeleteMsgPipe(msgpipe));
	}

	return 0;
}
コード例 #2
0
ファイル: main.c プロジェクト: hudecek/algorithmsHW
int main(void) {
    testInsert();
    testDelete();
    testSearch();
    testHeight();
    testIsCorrectBST();
}
コード例 #3
0
int main()
{
  AString error;
  
  AUrl url("odbc://*****:*****@localhost/aos_global/");
  AODBCServer db(url);
  
//a_AMySQLServer equivalent
//  AUrl url("mysql://*****:*****@localhost/aos/");
//  AMySQLServer db(url);

  if (!db.init(error))
  {
    db.debugDump();
    std::cerr << error << std::endl;
    return -1;
  }

  testInsert(db);
  testUpdate(db);
  testSelect(db);
  testDelete(db);

  return 0;
}
コード例 #4
0
ファイル: test.c プロジェクト: DylanGriffith/heap-stuff
void runTests(void) {
    testNewHeap();
    testFindLargestChild();
    testDelete();
    testInsert();
    testSort();
}
コード例 #5
0
ファイル: pairingheap.cpp プロジェクト: Surtr04/UT_Internship
int main() {
  testPoll();
  testDecrease();
  testDelete();
  testParallel1();
  testParallel2();
  return 0;
}
コード例 #6
0
// main method
int 
main (void) 
{
  testName = "";

  testInsertAndFind();
  testDelete();
  testIndexScan();

  return 0;
}
コード例 #7
0
int main (int argc, char *argv[]){

	testAdd();
	testDelete();
	testAppend();
	testReverse();
	testZip();

	printf("All tests passed! You are awesome!\n");

	return EXIT_SUCCESS;
}
コード例 #8
0
ファイル: client_tests.c プロジェクト: Auzzy/school
int main()
{
    testLoginLogout();

    sendCommandToApp("login Auzzy 123456");
    testPush();
    testList();
    testFetch();
    testDelete();
    sendCommandToApp("logout");

    return 0;
}
コード例 #9
0
ファイル: testterminalstate.cpp プロジェクト: wanglun/xwterm
int main()
{
	TerminalState *state = new VTTerminalState();
	Logger::getInstance()->setLogLevel(Logger::ERROR);

	state->enableShiftText(true);

	//Populate test data.
	for (int i = 0; i < 40; i++)
	{
		for (int j = 0; j < 80; j++)
		{
			terminalBuffer[i][j] = (rand() % 95) + 32;
		}
	}

	testInit(state);
	testCursor(state);
	testOrigin(state);
	testCursorMoveBackward(state);
	testCursorMoveForward(state);
	testCursorMoveUp(state);
	testCursorMoveDown(state);

	state->addTerminalModeFlags(TS_TM_ORIGIN);
	testCursorMoveBackward(state);
	testCursorMoveForward(state);
	state->removeTerminalModeFlags(TS_TM_ORIGIN);

	testCursorMoveUpOrigin(state);
	testCursorMoveDownOrigin(state);

	testInsert(state);
	testExpandedBuffer(state);
	testErase(state);
	testInsertShift(state);
	testDelete(state);
	testVT((VTTerminalState *)state);
	testGraphicsState();

	delete state;

	return 0;
}
コード例 #10
0
int main() {
    PTR_CARD deck1=new Card, deck2 = new Card;
    BinarySearchTree<PTR_CARD> *Cards1, *Cards2, *Cards3, *Cards4;
        
    int pips, suites;
    Cards1 = new BinarySearchTree<PTR_CARD>(comparePips);
    Cards2 = new BinarySearchTree<PTR_CARD>(compareSuits);
    Cards3 = new BinarySearchTree<PTR_CARD>(comparePips);
    
    srand (time(0));
    
    for (int count = 0; count < 25; count++) {
        drawCard(pips,suites);
        deck1 = new Card(pips,suites);
        Cards1->insert(deck1);
        deck1 = new Card(pips,suites);
        Cards3->insert(deck1);
        
        drawCard(pips, suites);
        deck2 = new Card(pips, suites);
        Cards2->insert(deck2);
    }
    
    cout << (Cards1==Cards3) << endl;
    cout << (Cards1==Cards2) << endl;
        
    Cards1->inOrder(displayPTR_CARD);
    cout << endl;
    Cards2->inOrder(displaySuitPTR_CARD);
    
    testBST(Cards1);
    
    testBST(Cards2);
        
    testDelete(Cards1, Cards2);
    
    testCopyAndAssign(Cards1, Cards2);
    
    return 0;
}