Browse Source

* new bugs

peter 20 years ago
parent
commit
92a6e151ff
3 changed files with 89 additions and 0 deletions
  1. 47 0
      tests/test/texception10.pp
  2. 20 0
      tests/webtbs/tw3572.pp
  3. 22 0
      tests/webtbs/tw3573.pp

+ 47 - 0
tests/test/texception10.pp

@@ -0,0 +1,47 @@
+{$ifdef fpc}{$mode objfpc}{$H+}{$endif}
+
+uses
+  Classes, SysUtils;
+
+type
+  { TMyObject }
+
+  TMyObject = class(TObject)
+  public
+    constructor Create(TheOwner: TObject);
+  end;
+
+{ TMyObject }
+
+constructor TMyObject.Create(TheOwner: TObject);
+begin
+  // create AV
+  if TheOwner.ClassName='' then;
+end;
+
+var
+  i : integer;
+begin
+  i:=0;
+  writeln('Creating the first time');
+  try
+    TMyObject.Create(nil);
+  except
+    on E: Exception do begin
+      writeln('E='+E.Message);
+      inc(i);
+    end;
+  end;
+  writeln('Creating the second time');
+  try
+    TMyObject.Create(nil);
+  except
+    on E: Exception do begin
+      writeln('E='+E.Message);
+      inc(i);
+    end;
+  end;
+  writeln('Ending ..');
+  if i<>2 then
+    halt(1);
+end.

+ 20 - 0
tests/webtbs/tw3572.pp

@@ -0,0 +1,20 @@
+{ Source provided for Free Pascal Bug Report 3572 }
+{ Submitted by "Lukas Gebauer" on  2005-01-18 }
+{ e-mail: [email protected] }
+{$MODE DELPHI}
+program rtest;
+
+function x(value: string): string;
+begin
+  result := Value;
+  result := result;
+end;
+
+var
+  s: string;
+begin
+  s := 'ahoy!';
+  writeln(x(s));
+  if x(s)<>s then
+    halt(1);
+end.

+ 22 - 0
tests/webtbs/tw3573.pp

@@ -0,0 +1,22 @@
+{ Source provided for Free Pascal Bug Report 3573 }
+{ Submitted by "Simon Kissel" on  2005-01-18 }
+{ e-mail: [email protected] }
+
+{$ifdef fpc}{$mode delphi}{$endif}
+
+resourcestring
+  wurst = 'jo' deprecated;
+
+var
+  VersionNumber: Real library;
+
+type
+   AppError = class(TObject)
+   end platform;
+
+procedure SomeOldRoutine; stdcall; deprecated;
+begin
+end;
+
+begin
+end.