Browse Source

+ Also check IntToBin input

git-svn-id: trunk@16296 -
pierre 15 năm trước cách đây
mục cha
commit
d3d15cbc51
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      tests/webtbs/tw17715.pp

+ 4 - 0
tests/webtbs/tw17715.pp

@@ -40,6 +40,8 @@ begin
   if (TLevelsRec(id).level1 <> 1) then raise Exception.Create('level1 bad');
   if (TLevelsRec(id).level1 <> 1) then raise Exception.Create('level1 bad');
   if (TLevelsRec(id).level2 <> 0) then raise Exception.Create('level2 bad');
   if (TLevelsRec(id).level2 <> 0) then raise Exception.Create('level2 bad');
   if (TLevelsRec(id).level3 <> 3) then raise Exception.Create('level3 bad');
   if (TLevelsRec(id).level3 <> 3) then raise Exception.Create('level3 bad');
+  if IntToBin(TLevelsRec(id).level3, 26)<> '00000000000000000000000011' then
+    raise Exception.Create('level3 bad in IntToBin call');
   if (TLevelsRec(id).level4 <> 4) then raise Exception.Create('level4 bad');
   if (TLevelsRec(id).level4 <> 4) then raise Exception.Create('level4 bad');
 
 
   writeln(StringOfChar('-', 32));
   writeln(StringOfChar('-', 32));
@@ -57,6 +59,8 @@ begin
   if (TLevelsRec(id).level1 <> 1) then raise Exception.Create('level1 bad');
   if (TLevelsRec(id).level1 <> 1) then raise Exception.Create('level1 bad');
   if (TLevelsRec(id).level2 <> 2) then raise Exception.Create('level2 bad');
   if (TLevelsRec(id).level2 <> 2) then raise Exception.Create('level2 bad');
   if (TLevelsRec(id).level3 <> 3) then raise Exception.Create('level3 bad');
   if (TLevelsRec(id).level3 <> 3) then raise Exception.Create('level3 bad');
+  if IntToBin(TLevelsRec(id).level3, 26)<> '00000000000000000000000011' then
+    raise Exception.Create('level3 bad in IntToBin call');
   if (TLevelsRec(id).level4 <> 4) then raise Exception.Create('level4 bad');
   if (TLevelsRec(id).level4 <> 4) then raise Exception.Create('level4 bad');
 
 
 end.
 end.