Просмотр исходного кода

* compiler bug when overloading generic functions is fixed so we can use it :)

* fixed some compiler warnings
master
bergmann 10 лет назад
Родитель
Сommit
34dd41eff7
6 измененных файлов: 159 добавлений и 161 удалений
  1. +3
    -0
      tests/tests.lpi
  2. +132
    -132
      tests/tests.lps
  3. +6
    -6
      tests/uutlLinqTests.pas
  4. +6
    -6
      tests/uutlSetHelperTests.pas
  5. +0
    -5
      uutlGenerics.pas
  6. +12
    -12
      uutlLinq.pas

+ 3
- 0
tests/tests.lpi Просмотреть файл

@@ -218,6 +218,9 @@
<CompilerMessages> <CompilerMessages>
<IgnoredMessages idx5024="True"/> <IgnoredMessages idx5024="True"/>
</CompilerMessages> </CompilerMessages>
<CustomOptions Value="-dUTL_ADVANCED_ENUMERATORS
-dUTL_NESTED_PROCVARS
-dUTL_ENUMERATORS"/>
<OtherDefines Count="3"> <OtherDefines Count="3">
<Define0 Value="UTL_ADVANCED_ENUMERATORS"/> <Define0 Value="UTL_ADVANCED_ENUMERATORS"/>
<Define1 Value="UTL_NESTED_PROCVARS"/> <Define1 Value="UTL_NESTED_PROCVARS"/>


+ 132
- 132
tests/tests.lps Просмотреть файл

@@ -2,7 +2,7 @@
<CONFIG> <CONFIG>
<ProjectSession> <ProjectSession>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="9"/>
<Version Value="10"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="65"> <Units Count="65">
<Unit0> <Unit0>
@@ -15,8 +15,8 @@
<Unit1> <Unit1>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<TopLine Value="1668"/>
<CursorPos Y="1692"/>
<TopLine Value="1620"/>
<CursorPos X="16" Y="1635"/>
<UsageCount Value="78"/> <UsageCount Value="78"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
@@ -99,7 +99,7 @@
<Unit12> <Unit12>
<Filename Value="uutlAlgorithmTests.pas"/> <Filename Value="uutlAlgorithmTests.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="4"/>
<EditorIndex Value="6"/>
<TopLine Value="72"/> <TopLine Value="72"/>
<CursorPos X="43" Y="87"/> <CursorPos X="43" Y="87"/>
<UsageCount Value="77"/> <UsageCount Value="77"/>
@@ -116,9 +116,9 @@
<Unit14> <Unit14>
<Filename Value="..\uutlEnumerator.pas"/> <Filename Value="..\uutlEnumerator.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="3"/>
<TopLine Value="122"/>
<CursorPos X="86" Y="124"/>
<EditorIndex Value="5"/>
<TopLine Value="128"/>
<CursorPos X="15" Y="135"/>
<UsageCount Value="75"/> <UsageCount Value="75"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit14> </Unit14>
@@ -141,27 +141,30 @@
<Unit17> <Unit17>
<Filename Value="..\uutlInterfaces.pas"/> <Filename Value="..\uutlInterfaces.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="22"/>
<CursorPos X="11" Y="37"/>
<EditorIndex Value="4"/>
<TopLine Value="60"/>
<CursorPos X="51" Y="77"/>
<UsageCount Value="71"/> <UsageCount Value="71"/>
<Loaded Value="True"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="..\uutlLinq.pas"/> <Filename Value="..\uutlLinq.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="-1"/>
<TopLine Value="31"/>
<CursorPos X="3" Y="52"/>
<EditorIndex Value="2"/>
<TopLine Value="391"/>
<CursorPos X="31" Y="417"/>
<UsageCount Value="62"/> <UsageCount Value="62"/>
<Loaded Value="True"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="uutlLinqTests.pas"/> <Filename Value="uutlLinqTests.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<TopLine Value="558"/>
<CursorPos X="61" Y="570"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<TopLine Value="632"/>
<CursorPos X="30" Y="648"/>
<UsageCount Value="62"/> <UsageCount Value="62"/>
<Loaded Value="True"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
<Filename Value="..\uutlTypes.pas"/> <Filename Value="..\uutlTypes.pas"/>
@@ -304,207 +307,205 @@
<UsageCount Value="24"/> <UsageCount Value="24"/>
</Unit36> </Unit36>
<Unit37> <Unit37>
<Filename Value="uutlSetHelperTests.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="44"/>
<CursorPos X="64" Y="54"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit37>
<Unit38>
<Filename Value="..\uutlExceptions.pas"/> <Filename Value="..\uutlExceptions.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<CursorPos X="21" Y="3"/> <CursorPos X="21" Y="3"/>
<UsageCount Value="32"/> <UsageCount Value="32"/>
</Unit37>
<Unit38>
</Unit38>
<Unit39>
<Filename Value="_uutlInterfaces.pas"/> <Filename Value="_uutlInterfaces.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<CursorPos X="42" Y="6"/> <CursorPos X="42" Y="6"/>
<UsageCount Value="33"/> <UsageCount Value="33"/>
</Unit38>
<Unit39>
</Unit39>
<Unit40>
<Filename Value="uutlArrayTests.pas"/> <Filename Value="uutlArrayTests.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="9"/> <TopLine Value="9"/>
<CursorPos X="25" Y="38"/> <CursorPos X="25" Y="38"/>
<UsageCount Value="32"/> <UsageCount Value="32"/>
</Unit39>
<Unit40>
</Unit40>
<Unit41>
<Filename Value="..\uutlGenerics2.pas"/> <Filename Value="..\uutlGenerics2.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="-1"/> <WindowIndex Value="-1"/>
<TopLine Value="1902"/> <TopLine Value="1902"/>
<CursorPos Y="1905"/> <CursorPos Y="1905"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit40>
<Unit41>
</Unit41>
<Unit42>
<Filename Value="..\uutlCommon2.pas"/> <Filename Value="..\uutlCommon2.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="9"/> <TopLine Value="9"/>
<CursorPos X="15" Y="26"/> <CursorPos X="15" Y="26"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit41>
<Unit42>
</Unit42>
<Unit43>
<Filename Value="uutlInterfaces2.pas"/> <Filename Value="uutlInterfaces2.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="49"/> <TopLine Value="49"/>
<CursorPos X="35" Y="60"/> <CursorPos X="35" Y="60"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit42>
<Unit43>
</Unit43>
<Unit44>
<Filename Value="..\uutlAlgorithm2.pas"/> <Filename Value="..\uutlAlgorithm2.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="66"/> <TopLine Value="66"/>
<CursorPos X="5" Y="93"/> <CursorPos X="5" Y="93"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit43>
<Unit44>
</Unit44>
<Unit45>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\objpas.pp"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\objpas.pp"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="63"/> <TopLine Value="63"/>
<CursorPos X="20" Y="75"/> <CursorPos X="20" Y="75"/>
<UsageCount Value="15"/> <UsageCount Value="15"/>
</Unit44>
<Unit45>
</Unit45>
<Unit46>
<Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlAlgorithm.pas"/> <Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlAlgorithm.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="48"/> <TopLine Value="48"/>
<CursorPos X="45" Y="56"/> <CursorPos X="45" Y="56"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit45>
<Unit46>
</Unit46>
<Unit47>
<Filename Value="..\uutlEnumerator2.pas"/> <Filename Value="..\uutlEnumerator2.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="126"/> <TopLine Value="126"/>
<CursorPos X="22" Y="128"/> <CursorPos X="22" Y="128"/>
<UsageCount Value="6"/> <UsageCount Value="6"/>
</Unit46>
<Unit47>
</Unit47>
<Unit48>
<Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\FPCUnitCompatibleInterface.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\FPCUnitCompatibleInterface.inc"/>
<EditorIndex Value="2"/>
<EditorIndex Value="-1"/>
<TopLine Value="54"/> <TopLine Value="54"/>
<CursorPos Y="69"/> <CursorPos Y="69"/>
<UsageCount Value="16"/> <UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit47>
<Unit48>
</Unit48>
<Unit49>
<Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\TestFramework.pas"/> <Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\TestFramework.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="2243"/> <TopLine Value="2243"/>
<CursorPos Y="2258"/> <CursorPos Y="2258"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit48>
<Unit49>
</Unit49>
<Unit50>
<Filename Value="..\internal_uutlInterfaces.pas"/> <Filename Value="..\internal_uutlInterfaces.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<CursorPos Y="11"/> <CursorPos Y="11"/>
<UsageCount Value="6"/> <UsageCount Value="6"/>
</Unit49>
<Unit50>
</Unit50>
<Unit51>
<Filename Value="..\uutlUtils.inc"/> <Filename Value="..\uutlUtils.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<CursorPos X="46" Y="3"/> <CursorPos X="46" Y="3"/>
<UsageCount Value="7"/> <UsageCount Value="7"/>
</Unit50>
<Unit51>
</Unit51>
<Unit52>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\classes\classesh.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\classes\classesh.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="118"/> <TopLine Value="118"/>
<CursorPos X="3" Y="143"/> <CursorPos X="3" Y="143"/>
<UsageCount Value="13"/> <UsageCount Value="13"/>
</Unit51>
<Unit52>
</Unit52>
<Unit53>
<Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlCommon.pas"/> <Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlCommon.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="474"/> <TopLine Value="474"/>
<CursorPos X="16" Y="500"/> <CursorPos X="16" Y="500"/>
<UsageCount Value="9"/> <UsageCount Value="9"/>
</Unit52>
<Unit53>
</Unit53>
<Unit54>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\ascdef.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\ascdef.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="202"/> <TopLine Value="202"/>
<CursorPos X="10" Y="217"/> <CursorPos X="10" Y="217"/>
<UsageCount Value="8"/> <UsageCount Value="8"/>
</Unit53>
<Unit54>
</Unit54>
<Unit55>
<Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlSyncObjs.pas"/> <Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlSyncObjs.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="1"/> <WindowIndex Value="1"/>
<TopLine Value="64"/> <TopLine Value="64"/>
<CursorPos X="13" Y="76"/> <CursorPos X="13" Y="76"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
</Unit54>
<Unit55>
</Unit55>
<Unit56>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysutilh.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\sysutilh.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="83"/> <TopLine Value="83"/>
<CursorPos X="4" Y="98"/> <CursorPos X="4" Y="98"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
</Unit55>
<Unit56>
</Unit56>
<Unit57>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\func.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\func.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="244"/> <TopLine Value="244"/>
<CursorPos X="10" Y="259"/> <CursorPos X="10" Y="259"/>
<UsageCount Value="9"/> <UsageCount Value="9"/>
</Unit56>
<Unit57>
</Unit57>
<Unit58>
<Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlXmlHelper.pas"/> <Filename Value="G:\Eigene Datein\Projekte\_Active Projekte\TotoStarRedesign\utils\uutlXmlHelper.pas"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<CursorPos X="29" Y="30"/> <CursorPos X="29" Y="30"/>
<UsageCount Value="8"/> <UsageCount Value="8"/>
</Unit57>
<Unit58>
</Unit58>
<Unit59>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-base\src\contnrs.pp"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\packages\fcl-base\src\contnrs.pp"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="136"/> <TopLine Value="136"/>
<CursorPos X="3" Y="151"/> <CursorPos X="3" Y="151"/>
<UsageCount Value="9"/> <UsageCount Value="9"/>
</Unit58>
<Unit59>
</Unit59>
<Unit60>
<Filename Value="..\uutlEmbeddedProfiler.inc"/> <Filename Value="..\uutlEmbeddedProfiler.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<WindowIndex Value="-1"/> <WindowIndex Value="-1"/>
<TopLine Value="-1"/> <TopLine Value="-1"/>
<CursorPos X="-1" Y="-1"/> <CursorPos X="-1" Y="-1"/>
<UsageCount Value="19"/> <UsageCount Value="19"/>
</Unit59>
<Unit60>
</Unit60>
<Unit61>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\objpash.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\inc\objpash.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="190"/> <TopLine Value="190"/>
<CursorPos X="23" Y="205"/> <CursorPos X="23" Y="205"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
</Unit60>
<Unit61>
</Unit61>
<Unit62>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\osutilsh.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\objpas\sysutils\osutilsh.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="40"/> <TopLine Value="40"/>
<CursorPos X="3" Y="62"/> <CursorPos X="3" Y="62"/>
<UsageCount Value="12"/> <UsageCount Value="12"/>
</Unit61>
<Unit62>
</Unit62>
<Unit63>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\struct.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\struct.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="5662"/> <TopLine Value="5662"/>
<CursorPos X="8" Y="5677"/> <CursorPos X="8" Y="5677"/>
<UsageCount Value="11"/> <UsageCount Value="11"/>
</Unit62>
<Unit63>
</Unit63>
<Unit64>
<Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\base.inc"/> <Filename Value="C:\Zusatzprogramme\Lazarus\fpc\3.1.1\source\rtl\win\wininc\base.inc"/>
<EditorIndex Value="-1"/> <EditorIndex Value="-1"/>
<TopLine Value="448"/> <TopLine Value="448"/>
<CursorPos X="12" Y="463"/> <CursorPos X="12" Y="463"/>
<UsageCount Value="11"/> <UsageCount Value="11"/>
</Unit63>
<Unit64>
<Filename Value="uutlSetHelperTests.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="44"/>
<CursorPos X="85" Y="69"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit64> </Unit64>
</Units> </Units>
<OtherDefines Count="3"> <OtherDefines Count="3">
@@ -514,124 +515,123 @@
</OtherDefines> </OtherDefines>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1672" TopLine="1660"/>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="57" TopLine="44"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1684" TopLine="1666"/>
<Caret Line="1673" TopLine="1665"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1685" TopLine="1666"/>
<Caret Line="1685" TopLine="1665"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1686" TopLine="1666"/>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="53" Column="36" TopLine="44"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1687" TopLine="1666"/>
<Caret Line="1674" TopLine="1665"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1689" TopLine="1666"/>
<Caret Line="1686" TopLine="1665"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="57" TopLine="41"/>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1688" TopLine="1665"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="52" Column="102" TopLine="44"/>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1690" TopLine="1666"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\FPCUnitCompatibleInterface.inc"/>
<Caret Line="69" TopLine="54"/>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="64" Column="95" TopLine="43"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="60" TopLine="44"/>
<Filename Value="..\uutlInterfaces.pas"/>
<Caret Line="65" Column="47" TopLine="24"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1684" TopLine="1656"/>
<Caret Line="1692" TopLine="1668"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="C:\Zusatzprogramme\Lazarus\components\fptest\src\FPCUnitCompatibleInterface.inc"/>
<Caret Line="56" Column="13" TopLine="54"/>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="61" Column="47" TopLine="50"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="..\uutlEnumerator.pas"/> <Filename Value="..\uutlEnumerator.pas"/>
<Caret Line="124" Column="86" TopLine="122"/>
<Caret Line="135" Column="15" TopLine="128"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1672" TopLine="1656"/>
<Caret Line="1656" TopLine="1642"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1673" TopLine="1656"/>
<Caret Line="1646" Column="14" TopLine="1640"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="..\uutlGenerics.pas"/> <Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1674" TopLine="1656"/>
<Caret Line="1635" Column="16" TopLine="1620"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1684" TopLine="1656"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="120" Column="30" TopLine="107"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="60" TopLine="44"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="68" Column="20" TopLine="52"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1672" TopLine="1656"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="283" Column="26" TopLine="259"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="59" Column="36" TopLine="44"/>
<Filename Value="uutlLinqTests.pas"/>
<Caret Line="399" Column="29" TopLine="383"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1672" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="283" Column="26" TopLine="259"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1673" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="57" TopLine="44"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="70" Column="51" TopLine="53"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1673" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="125" Column="29" TopLine="98"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1685" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="143" Column="33" TopLine="113"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="uutlSetHelperTests.pas"/>
<Caret Line="53" Column="36" TopLine="44"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="276" Column="49" TopLine="249"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1674" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="374" Column="27" TopLine="347"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1686" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="383" Column="27" TopLine="355"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1688" TopLine="1665"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="408" Column="31" TopLine="381"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="..\uutlGenerics.pas"/>
<Caret Line="1690" TopLine="1666"/>
<Filename Value="..\uutlLinq.pas"/>
<Caret Line="417" Column="31" TopLine="391"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectSession> </ProjectSession>


+ 6
- 6
tests/uutlLinqTests.pas Просмотреть файл

@@ -396,7 +396,7 @@ var
begin begin
o := TCallbackObject.Create; o := TCallbackObject.Create;
try try
e := specialize utlWhereO<Integer>(CreateArrayEnumerator(5), @o.Filter);
e := specialize utlWhere<Integer>(CreateArrayEnumerator(5), @o.Filter);
e.Reset; e.Reset;
AssertTrue (e.MoveNext); AssertTrue (e.MoveNext);
AssertEquals(2, e.Current); AssertEquals(2, e.Current);
@@ -420,7 +420,7 @@ procedure TutlLinqTests.proc_Where_WithNestedCallback;
var var
e: TIntArrEnumerator.IutlEnumerator; e: TIntArrEnumerator.IutlEnumerator;
begin begin
e := specialize utlWhereN<Integer>(CreateArrayEnumerator(5), @IsEventNested);
e := specialize utlWhere<Integer>(CreateArrayEnumerator(5), @IsEventNested);
e.Reset; e.Reset;
AssertTrue (e.MoveNext); AssertTrue (e.MoveNext);
AssertEquals(2, e.Current); AssertEquals(2, e.Current);
@@ -645,7 +645,7 @@ var
begin begin
o := TCallbackObject.Create; o := TCallbackObject.Create;
try try
e := specialize utlSelectO<Integer, Single>(
e := specialize utlSelect<Integer, Single>(
CreateArrayEnumerator(4), CreateArrayEnumerator(4),
@o.Select); @o.Select);
e.Reset; e.Reset;
@@ -675,7 +675,7 @@ procedure TutlLinqTests.proc_Select_WithNestedCallback;
var var
e: specialize IutlEnumerator<Single>; e: specialize IutlEnumerator<Single>;
begin begin
e := specialize utlSelectN<Integer, Single>(
e := specialize utlSelect<Integer, Single>(
CreateArrayEnumerator(4), CreateArrayEnumerator(4),
@TestSelectorNested); @TestSelectorNested);
e.Reset; e.Reset;
@@ -759,7 +759,7 @@ var
begin begin
o := TSelectManyObject.Create; o := TSelectManyObject.Create;
try try
e := specialize utlSelectManyO<Integer, Single>(
e := specialize utlSelectMany<Integer, Single>(
CreateArrayEnumerator(3), CreateArrayEnumerator(3),
@o.Select); @o.Select);
e.Reset; e.Reset;
@@ -799,7 +799,7 @@ procedure TutlLinqTests.proc_SelectMany_WithNestedCallback;
var var
e: specialize IutlEnumerator<Single>; e: specialize IutlEnumerator<Single>;
begin begin
e := specialize utlSelectManyN<Integer, Single>(
e := specialize utlSelectMany<Integer, Single>(
CreateArrayEnumerator(3), CreateArrayEnumerator(3),
@TestManySelectorNested); @TestManySelectorNested);
e.Reset; e.Reset;


+ 6
- 6
tests/uutlSetHelperTests.pas Просмотреть файл

@@ -11,9 +11,9 @@ type
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TutlSetHelperTests = class(TTestCase) TutlSetHelperTests = class(TTestCase)
published published
procedure ToString;
procedure TryToSet;
procedure Compare;
procedure proc_ToString;
procedure proc_TryToSet;
procedure proc_Compare;
end; end;


implementation implementation
@@ -38,7 +38,7 @@ type
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//TutlSetHelperTests//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //TutlSetHelperTests////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure TutlSetHelperTests.ToString;
procedure TutlSetHelperTests.proc_ToString;
var var
str: String; str: String;
begin begin
@@ -50,7 +50,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure TutlSetHelperTests.TryToSet;
procedure TutlSetHelperTests.proc_TryToSet;
var var
s: TTestSet; s: TTestSet;
begin begin
@@ -62,7 +62,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure TutlSetHelperTests.Compare;
procedure TutlSetHelperTests.proc_Compare;
begin begin
AssertEquals( 0, TTestSetH.Compare([teTest0, teTest1, teTest2], [teTest0, teTest1, teTest2])); AssertEquals( 0, TTestSetH.Compare([teTest0, teTest1, teTest2], [teTest0, teTest1, teTest2]));
AssertEquals(-1, TTestSetH.Compare([ teTest1, teTest2], [teTest0, teTest1, teTest2])); AssertEquals(-1, TTestSetH.Compare([ teTest1, teTest2], [teTest0, teTest1, teTest2]));


+ 0
- 5
uutlGenerics.pas Просмотреть файл

@@ -1631,13 +1631,9 @@ end;
class function TutlSetHelper.ToString(const aValue: TSet; const aSeperator: String): String; class function TutlSetHelper.ToString(const aValue: TSet; const aSeperator: String): String;
var var
e: TEnum; e: TEnum;
i: Integer;
p: PByte;
begin begin
result := ''; result := '';
p := @aValue;
for e in TEnumHelper.Values do begin for e in TEnumHelper.Values do begin
i := Integer(e);
if IsSet(aValue, e) then begin if IsSet(aValue, e) then begin
if result > '' then if result > '' then
result := result + aSeperator; result := result + aSeperator;
@@ -1656,7 +1652,6 @@ end;
class function TutlSetHelper.TryToSet(const aStr: String; const aSeperator: String; out aValue: TSet): Boolean; class function TutlSetHelper.TryToSet(const aStr: String; const aSeperator: String; out aValue: TSet): Boolean;
var var
i, j: Integer; i, j: Integer;
p: PAnsiChar;
s: String; s: String;
e: TEnum; e: TEnum;
begin begin


+ 12
- 12
uutlLinq.pas Просмотреть файл

@@ -65,12 +65,12 @@ uses
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aFilter: specialize TutlFilterEvent<T>): specialize IutlEnumerator<T>; inline; overload; constref aFilter: specialize TutlFilterEvent<T>): specialize IutlEnumerator<T>; inline; overload;


generic function utlWhereO<T>(
generic function utlWhere<T>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aFilter: specialize TutlFilterEventO<T>): specialize IutlEnumerator<T>; inline; overload; constref aFilter: specialize TutlFilterEventO<T>): specialize IutlEnumerator<T>; inline; overload;


{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlWhereN<T>(
generic function utlWhere<T>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aFilter: specialize TutlFilterEventN<T>): specialize IutlEnumerator<T>; inline; overload; constref aFilter: specialize TutlFilterEventN<T>): specialize IutlEnumerator<T>; inline; overload;
{$ENDIF} {$ENDIF}
@@ -117,12 +117,12 @@ uses
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEvent<T, S>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEvent<T, S>): specialize IutlEnumerator<S>; inline; overload;


generic function utlSelectO<T, S>(
generic function utlSelect<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventO<T, S>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEventO<T, S>): specialize IutlEnumerator<S>; inline; overload;


{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlSelectN<T, S>(
generic function utlSelect<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventN<T, S>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEventN<T, S>): specialize IutlEnumerator<S>; inline; overload;
{$ENDIF} {$ENDIF}
@@ -135,12 +135,12 @@ uses
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEvent<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEvent<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload;


generic function utlSelectManyO<T, S>(
generic function utlSelectMany<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventO<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEventO<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload;


{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlSelectManyN<T, S>(
generic function utlSelectMany<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventN<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload; constref aSelector: specialize TutlSelectEventN<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; inline; overload;
{$ENDIF} {$ENDIF}
@@ -271,7 +271,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
generic function utlWhereO<T>(
generic function utlWhere<T>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aFilter: specialize TutlFilterEventO<T>): specialize IutlEnumerator<T>; constref aFilter: specialize TutlFilterEventO<T>): specialize IutlEnumerator<T>;
begin begin
@@ -280,7 +280,7 @@ end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlWhereN<T>(
generic function utlWhere<T>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aFilter: specialize TutlFilterEventN<T>): specialize IutlEnumerator<T>; constref aFilter: specialize TutlFilterEventN<T>): specialize IutlEnumerator<T>;
begin begin
@@ -371,7 +371,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
generic function utlSelectO<T, S>(
generic function utlSelect<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventO<T, S>): specialize IutlEnumerator<S>; constref aSelector: specialize TutlSelectEventO<T, S>): specialize IutlEnumerator<S>;
begin begin
@@ -380,7 +380,7 @@ end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlSelectN<T, S>(
generic function utlSelect<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventN<T, S>): specialize IutlEnumerator<S>; constref aSelector: specialize TutlSelectEventN<T, S>): specialize IutlEnumerator<S>;
begin begin
@@ -405,7 +405,7 @@ begin
end; end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
generic function utlSelectManyO<T, S>(
generic function utlSelectMany<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventO<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; constref aSelector: specialize TutlSelectEventO<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>;
begin begin
@@ -414,7 +414,7 @@ end;


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
{$IFDEF UTL_NESTED_PROCVARS} {$IFDEF UTL_NESTED_PROCVARS}
generic function utlSelectManyN<T, S>(
generic function utlSelectMany<T, S>(
constref aEnumerator: specialize IutlEnumerator<T>; constref aEnumerator: specialize IutlEnumerator<T>;
constref aSelector: specialize TutlSelectEventN<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>; constref aSelector: specialize TutlSelectEventN<T, specialize IutlEnumerator<S>>): specialize IutlEnumerator<S>;
begin begin


Загрузка…
Отмена
Сохранить