Browse Source

* new bugs

peter 22 years ago
parent
commit
da13406760

+ 7 - 0
tests/webtbs/tw2266.pp

@@ -0,0 +1,7 @@
+{$i uw2266a}
+{$i uw2266b}
+
+begin
+  p1;
+  p2;
+end.

+ 11 - 0
tests/webtbs/tw2267.pp

@@ -0,0 +1,11 @@
+{ Source provided for Free Pascal Bug Report 2267 }
+{ Submitted by "Marco" on  2002-12-19 }
+{ e-mail: [email protected] }
+type theenum=(aa,bb,cc);
+
+var i,j : integer;
+    k  :theenum;
+
+begin
+ k:=theenum(i<j);
+end.

+ 19 - 0
tests/webtbs/tw2268.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 2268 }
+{ Submitted by "marco" on  2002-12-19 }
+{ e-mail: [email protected] }
+{$ifdef fpc}{$mode TP}{$endif}
+
+function P1:longint; begin end;
+function P2:longint; begin end;
+function P3:longint; begin end;
+function Help:longint; begin end;
+
+type Fn = function : longint ;
+const PArr : array [0..3] of Fn = (Help, P1, P2, P3) ;
+
+procedure bla(const i:longint); begin end;
+
+begin
+ bla(PArr[Paramcount]);
+end.
+

+ 9 - 0
tests/webtbs/tw2269.pp

@@ -0,0 +1,9 @@
+{ Source provided for Free Pascal Bug Report 2269 }
+{ Submitted by "marco" on  2002-12-19 }
+{ e-mail: [email protected] }
+
+{$I uw2269.inc - some more text that should be ignored}
+
+begin
+  p;
+end.

+ 15 - 0
tests/webtbs/tw2270.pp

@@ -0,0 +1,15 @@
+{ Source provided for Free Pascal Bug Report 2270 }
+{ Submitted by "marco" on  2002-12-19 }
+{ e-mail: [email protected] }
+type zheenum = (aa,bb,cc);
+     zheset  = set of zheenum;
+
+var l :word;
+    o :zheenum;
+
+begin
+  if o IN zheset(lo(l)) Then
+   ;
+end.
+
+

+ 14 - 0
tests/webtbs/tw2273.pp

@@ -0,0 +1,14 @@
+{ Source provided for Free Pascal Bug Report 2273 }
+{ Submitted by "Sergey Kosarevsky" on  2002-12-21 }
+{ e-mail: [email protected] }
+Type tSomething=Object
+        Constructor Init;
+     End;
+
+Constructor tSomething.Init;
+Begin
+   Inherited Init;
+End;
+
+Begin
+End.

+ 59 - 0
tests/webtbs/tw2274.pp

@@ -0,0 +1,59 @@
+{ Source provided for Free Pascal Bug Report 2274 }
+{ Submitted by "Sergey Kosarevsky" on  2002-12-21 }
+{ e-mail: [email protected] }
+Unit tw2274;
+
+{$STATIC ON}
+
+Interface
+
+Type Lfloat=Single;
+
+Type pTimer=^tTimer;
+     tTimer=Object
+       Private
+        RecepCyclesPerSecond:Lfloat;Static;        //     1/CyclesPerSecond
+        OldCycles:Int64;
+        NewCycles:Int64;
+        WorldUpTime:Lfloat;
+       Public
+        Constructor Init;
+        // tTimer
+        Function GetDeltaSeconds:Lfloat;
+        Function GetWorldTime:Lfloat;          // in seconds
+        Function GetCycles:Int64;Static;
+        Function GetSeconds:Lfloat;
+     End;
+
+Implementation
+
+Constructor tTimer.Init;
+Begin
+   RecepCyclesPerSecond:=0;
+   OldCycles:=GetCycles;
+End;
+
+Function tTimer.GetWorldTime:Lfloat;
+Begin
+   Exit(GetSeconds-WorldUpTime);
+End;
+
+Function tTimer.GetCycles:Int64;
+begin
+  GetCycles:=0;
+End;
+
+Function tTimer.GetDeltaSeconds:Lfloat;
+Begin
+   NewCycles:=GetCycles;
+   GetDeltaSeconds:=(NewCycles-OldCycles)*RecepCyclesPerSecond;
+   OldCycles:=NewCycles;
+End;
+
+Function tTimer.GetSeconds:Lfloat;
+Begin
+   Exit(GetCycles*RecepCyclesPerSecond);
+End;
+
+Begin
+End.

+ 4 - 0
tests/webtbs/uw2266a.inc

@@ -0,0 +1,4 @@
+procedure p1;
+begin
+  writeln('Hello');
+end;

+ 4 - 0
tests/webtbs/uw2266b.pas

@@ -0,0 +1,4 @@
+procedure p2;
+begin
+  writeln('Hello');
+end;

+ 4 - 0
tests/webtbs/uw2269.inc

@@ -0,0 +1,4 @@
+procedure p;
+begin
+  writeln('Hello');
+end;