void TestWinText(void) { BeginTests(); ObjectsInit(); CWinText cWinText; SWinFontInstance* psWinFont; Ptr<CFont> pcFont; CGlyph* pcCel; CImage cDestImage; cWinText.Init(NULL); psWinFont = cWinText.Create("Fixedsys", 0, 0, FW_DONTCARE); pcFont = cWinText.GenerateFont(psWinFont, "Fixedsys"); WriteImage(&pcFont->GetImage(), "Output/Fixedsys.bmp"); AssertFile("Input/Fixedsys.bmp", "Output/Fixedsys.bmp"); pcCel = pcFont->GetGlyph('H'); pcCel->GetSubImage()->SetAlignment(SUB_IMAGE_ALIGNMENT_LEFT|SUB_IMAGE_ALIGNMENT_TOP); cDestImage.Init(pcCel->GetFullWidth(), pcCel->GetFullHeight(), pcCel->GetSourceImage()); cDestImage.Clear(); CImageCopier::Copy(pcCel->GetCel(), &cDestImage, 0, 0); WriteImage(&cDestImage, "Output/TheLetterH.png"); cDestImage.Kill(); AssertFile("Input/TheLetterH.png", "Output/TheLetterH.png"); pcFont->Kill(); cWinText.Kill(); ObjectsKill(); TestStatistics(); }
void TestIndexTreeMemory(void) { BeginTests(); FastFunctionsInit(); MemoryInit(); TestIndexTreeMemoryKill(); TestIndexTreeMemoryAdd(); TestIndexTreeMemoryGet(); TestIndexTreeMemoryPutPtrDuplicate(); TestIndexTreeMemoryPutDifferenceSizeDuplicates(); TestIndexTreeMemoryValidateInternalConsistency(); TestIndexTreeMemoryCountAllocatedNodes(); TestIndexTreeMemoryRemoveResize(); TestIndexTreeMemoryRemoveByObject(); TestIndexTreeMemoryHasKey(); TestIndexTreeMemoryRemoveNullNode(); TestIndexTreeMemoryAddLongLong(); TestIndexTreeMemoryIterate(); TestIndexTreeMemoryReadWrite(); TestIndexTreeMemoryRemoveOnRoot(); TestIndexTreeMemoryResizeData(); MemoryKill(); FastFunctionsKill(); TestStatistics(); }
void TestDate(void) { BeginTests(); //You should probably write this. TestStatistics(); }
void TestImageCombiner(void) { BeginTests(); TestImageCombinerMask(); TestStatistics(); }
void TestRectanglePow2Packer(void) { BeginTests(); TestRectanglePow2PackerStuff(); TestStatistics(); }
void TestEvent(void) { BeginTests(); TestVirtualCall(); TestStatistics(); }
void TestIndexTreeWriter(void) { BeginTests(); TestIndexTreeWriterWrite(); TestStatistics(); }
void TestLinkedListTemplate(void) { BeginTests(); TestLinkedListTemplateIndexOf(); TestStatistics(); }
void TestObjectStack(void) { BeginTests(); TestObjectStackInit(); TestStatistics(); }
void TestMeshConnectivity(void) { BeginTests(); TestMeshEdgeConnectivity(); TestStatistics(); }
void TestExternalChannelPadder(void) { BeginTests(); TestOptimalPadding(); TestStatistics(); }
void TestSingleChannelAccessor(void) { BeginTests(); ClassStorageInit(); TypeConverterInit(); UnknownsInit(); CChannels cChannels; unsigned char cData[9] = "ti@YA,\n#"; CSingleChannelAccessor cSingle; char c; unsigned s; cChannels.Init(); cChannels.BeginChange(); cChannels.SetData(cData); cChannels.AddChannel(16, 15, 14, 13, PT_nybble); cChannels.AddChannel(12, 11, PT_uchar); cChannels.AddChannel(10, PT_ushort); cChannels.AddChannel(9, 8, 7, 6, PT_bit); cChannels.AddChannel(5, 4, PT_crumb); cChannels.AddChannel(3, PT_uchar); cChannels.SetSize(1); cChannels.EndChange(); cSingle.Init(&cChannels); AssertFloat(0.27f, cSingle.GetConvertToFloat(16), 2); AssertFloat(0.47f, cSingle.GetConvertToFloat(15), 2); AssertFloat(0.60f, cSingle.GetConvertToFloat(14), 2); AssertFloat(0.40f, cSingle.GetConvertToFloat(13), 2); cSingle.GetNative(16, &c); AssertChar(4, c); cSingle.GetNative(15, &c); AssertChar(7, c); cSingle.GetNative(14, &c); AssertChar(9, c); cSingle.GetNative(13, &c); AssertChar(6, c); AssertFloat(0.25f, cSingle.GetConvertToFloat(12), 2); AssertFloat(0.35f, cSingle.GetConvertToFloat(11), 2); cSingle.GetNative(12, &c); AssertChar('@', c); cSingle.GetNative(11, &c); AssertChar('Y', c); cSingle.GetNative(10, &s); AssertShortHex(0x2c41, s); AssertFloat(0.0f, cSingle.GetConvertToFloat(9), 1); AssertFloat(1.0f, cSingle.GetConvertToFloat(8), 1); AssertFloat(0.0f, cSingle.GetConvertToFloat(7), 1); AssertFloat(1.0f, cSingle.GetConvertToFloat(6), 1); AssertFloat(0.14f, cSingle.GetConvertToFloat(3), 2); cSingle.GetNative(3, &c); AssertChar('#', c); cChannels.Kill(); UnknownsKill(); TypeConverterKill(); ClassStorageKill(); TestStatistics(); }
void TestSorting(void) { BeginTests(); TestArraySorting2(); TestListSorting(); TestStatistics(); }
void TestMemoryAllocator(void) { BeginTests(); TestMemoryAllocatorFree(); TestMemoryAllocatorReadWrite(); TestStatistics(); }
void TestArrayMinimalTemplate(void) { BeginTests(); TestArrayMinimalTemplateChar(); TestArrayMinimalTemplateInt(); TestStatistics(); }
void TestFloatHelper(void) { BeginTests(); TestTruncateFloat(); TestRoundFloat(); TestStatistics(); }
void TestTriangleShape(void) { BeginTests(); FastFunctionsInit(); FastFunctionsKill(); TestStatistics(); }
void TestSetType(void) { BeginTests(); TestSetTypeInstantiation(); TestSetTypeAddAll(); TestStatistics(); }
void TestMemoryStack(void) { BeginTests(); TestMemoryStackAdd(); TestMemoryStackOutOfMemory(); TestStatistics(); }
void TestTreeTemplate(void) { BeginTests(); TestTreeTemplateInsert(); TestTreeTemplateFileHelper(); TestStatistics(); }
void TestExternalChannels(void) { BeginTests(); TestExternalChannelsSubBytePositions(); TestContiguousExternalChannels(); TestStatistics(); }
void TestScratchPadAllocator(void) { BeginTests(); TestScratchPadAllocatorPop(); TestScratchPadAllocatorReadWrite(); TestStatistics(); }
void TestArrayDenseTemplate(void) { BeginTests(); TestArrayDenseTemplateInsertion(); TestArrayDenseTemplateRemoval(); TestStatistics(); }
void TestUsage(void) { BeginTests(); TestUsageNullPointers(); TestUsageDefaultPointer(); TestStatistics(); }
void TestXMLFile(void) { BeginTests(); TestReadExternalReference(); TestRepeatedExternalTags(); TestStatistics(); }
void TestLinkListAligned(void) { BeginTests(); TestLinkListAlignedAdd(); TestLinkListAlignedRemove(); TestLinkListAlignedGrow(); TestStatistics(); }
void TestSetUnknown(void) { BeginTests(); TestSetStuffs(); TestSetRemoval(); TestCleanNulls(); TestStatistics(); }
void TestTrackingAllocator(void) { BeginTests(); FastFunctionsInit(); TestTrackingAllocatorSize(); FastFunctionsKill(); TestStatistics(); }
void TestIndexTreeNodeFile(void) { BeginTests(); TestIndexTreeNodeFileSizeofs(); TestIndexTreeNodeFileUnion(); TestIndexTreeNodeFileRootMemory(); TestStatistics(); }
void TestDehollowfication(void) { BeginTests(); TestDehollowficationFromDatabase(); TestDehollowficationFromDatabaseOfTwoPointers(); TestDehollowficationFromChunkFileSource(); TestStatistics(); }