peter 22 лет назад
Родитель
Сommit
99cfbbb225
6 измененных файлов с 100 добавлено и 0 удалено
  1. 19 0
      tests/webtbs/tw2767.pp
  2. 15 0
      tests/webtbs/tw2772.pp
  3. 12 0
      tests/webtbs/tw2776.pp
  4. 24 0
      tests/webtbs/tw2778.pp
  5. 10 0
      tests/webtbs/tw2779.pp
  6. 20 0
      tests/webtbs/tw2780.pp

+ 19 - 0
tests/webtbs/tw2767.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 2767 }
+{ Submitted by "Jakub Cernohorsky" on  2003-11-06 }
+{ e-mail: [email protected] }
+var a:integer;
+    err:boolean;
+begin
+  a:=25;
+  case a of
+    -10..0:writeln('-10..0');
+    31:writeln('31');
+    32..38:begin
+             writeln('32-38');
+             err:=true;
+           end;
+    66:writeln('66');
+  end;
+  if err then
+    halt(1);
+end.

+ 15 - 0
tests/webtbs/tw2772.pp

@@ -0,0 +1,15 @@
+{ Source provided for Free Pascal Bug Report 2772 }
+{ Submitted by "Sergey Kosarevsky" on  2003-11-08 }
+{ e-mail: [email protected] }
+Type tWriteFlags=(WF_OVERWRITE,
+                  WF_NOOVERWRITE,
+                  WF_APPEND);
+
+Type tFileWritingFlags=Set Of tWriteFlags;
+
+Var A:tFileWritingFlags;
+
+Begin
+   A:=[WF_OVERWRITE,WF_NOOVERWRITE,WF_APPEND];
+   WriteLn(WF_OVERWRITE In A);
+End.

+ 12 - 0
tests/webtbs/tw2776.pp

@@ -0,0 +1,12 @@
+{ Source provided for Free Pascal Bug Report 2776 }
+{ Submitted by "Vincent Snijders" on  2003-11-09 }
+{ e-mail: [email protected] }
+{$mode delphi}
+var
+  a: procedure of object;
+
+begin
+  a:=nil;
+  if assigned(a)
+    then ;
+end.

+ 24 - 0
tests/webtbs/tw2778.pp

@@ -0,0 +1,24 @@
+{ Source provided for Free Pascal Bug Report 2778 }
+{ Submitted by "Michael Van Canneyt" on  2003-11-09 }
+{ e-mail: [email protected] }
+
+{$mode delphi}
+
+type
+  TMyFunc = Procedure (I : Integer = 10);
+
+Procedure MyRealFunc(I : Integer = 20);
+
+begin
+  Writeln('Function received : ',I);
+  if i<>10 then
+    halt(1);
+end;
+
+Var
+  M : TMyFunc;
+
+begin
+  M:=@MyRealFunc;
+  M;
+end.

+ 10 - 0
tests/webtbs/tw2779.pp

@@ -0,0 +1,10 @@
+{ Source provided for Free Pascal Bug Report 2779 }
+{ Submitted by "Johannes Berg" on  2003-11-10 }
+{ e-mail: [email protected] }
+program test;
+
+{$IF DEFINED(asdf)}
+{$IFEND}
+
+begin
+end.

+ 20 - 0
tests/webtbs/tw2780.pp

@@ -0,0 +1,20 @@
+{ Source provided for Free Pascal Bug Report 2780 }
+{ Submitted by "Johannes Berg" on  2003-11-10 }
+{ e-mail: [email protected] }
+program ifdef;
+
+const
+  a = 1;
+
+begin
+{$IF NOT DECLARED(a)}
+  writeln('a not declared');
+{$ELSE}
+  writeln('a declared, a = ',a);
+{$ENDIF}
+{$IF NOT DECLARED(b)}
+  writeln('b not declared');
+{$ELSE}
+  writeln('b declared, b = ',b);
+{$ENDIF}
+end.