2
0
Эх сурвалжийг харах

* tests: Fixed string comparison.

git-svn-id: trunk@33302 -
yury 9 жил өмнө
parent
commit
d43e5dcab8

+ 2 - 2
tests/test/units/system/tres3.pp

@@ -36,10 +36,10 @@ var
 
 function CompareDesc(d1, d2 : PChar) : boolean;
 begin
-  if Is_IntResource(d1) then
+  if Is_IntResource(d1) or Is_IntResource(d2) then
     Result:=PtrUInt(d1)=PtrUInt(d2)
   else
-    Result:=CompareChar0(d1[0],d2[0],MaxInt)=0;
+    Result:=StrComp(d1, d2) = 0;
 end;
 
 procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);

+ 2 - 2
tests/test/units/system/tres3ext.pp

@@ -37,10 +37,10 @@ var
 
 function CompareDesc(d1, d2 : PChar) : boolean;
 begin
-  if Is_IntResource(d1) then
+  if Is_IntResource(d1) or Is_IntResource(d2) then
     Result:=PtrUInt(d1)=PtrUInt(d2)
   else
-    Result:=CompareChar0(d1[0],d2[0],MaxInt)=0;
+    Result:=StrComp(d1, d2) = 0;
 end;
 
 procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);