* GetEnumNameCount also counted the unit name after r14511 (mantis #16402)

git-svn-id: trunk@15225 -
This commit is contained in:
Jonas Maebe 2010-05-04 17:59:58 +00:00
parent c60bcf8699
commit 700aa3cf11
3 changed files with 10 additions and 2 deletions

1
.gitattributes vendored
View File

@ -10355,6 +10355,7 @@ tests/webtbs/tw16328.pp svneol=native#text/plain
tests/webtbs/tw1634.pp svneol=native#text/plain
tests/webtbs/tw16366.pp svneol=native#text/plain
tests/webtbs/tw16377.pp svneol=native#text/plain
tests/webtbs/tw16402.pp svneol=native#text/plain
tests/webtbs/tw1658.pp svneol=native#text/plain
tests/webtbs/tw1677.pp svneol=native#text/plain
tests/webtbs/tw1681.pp svneol=native#text/plain

View File

@ -478,8 +478,8 @@ begin
PS:=PShortString(pointer(PS)+PByte(PS)^+1);
Inc(Count);
end;
Result := Count;
{ the last string is the unit name }
Result := Count - 1;
end;
end;

7
tests/webtbs/tw16402.pp Normal file
View File

@ -0,0 +1,7 @@
uses typinfo;
type
TEnum = (Name1,Name2,Name3);
begin
if GetEnumNameCount(TypeInfo(TEnum))<>3 then
halt(1);
end.