Browse Source

* new tests

peter 24 years ago
parent
commit
659e4ec93b
6 changed files with 65 additions and 0 deletions
  1. 6 0
      tests/tbs/tb0342.pp
  2. 6 0
      tests/tbs/tb0343.pp
  3. 37 0
      tests/tbs/tb0344.pp
  4. 10 0
      tests/tbs/ub0342a.pp
  5. 6 0
      tests/tbs/ub0342b.pp
  6. 0 0
      tests/webtbs/tw1414.pp

+ 6 - 0
tests/tbs/tb0342.pp

@@ -0,0 +1,6 @@
+unit tb0342;
+interface
+uses
+  ub0342a;
+implementation
+end.

+ 6 - 0
tests/tbs/tb0343.pp

@@ -0,0 +1,6 @@
+{$R+}
+var
+ i : int64;
+begin
+  i:=high(cardinal);
+end.

+ 37 - 0
tests/tbs/tb0344.pp

@@ -0,0 +1,37 @@
+{ %version=1.1 }
+
+{$R+}
+var
+  s : string;
+  error : boolean;
+begin
+  error:=false;
+  str(high(int64),s);
+  if s<>'9223372036854775807' then
+   begin
+     writeln('high(int64) error!: "',s,'"');
+     error:=true;
+   end;
+  str(low(int64),s);
+  if s<>'-9223372036854775808' then
+   begin
+     writeln('low(int64) error!: "',s,'"');
+     error:=true;
+   end;
+{$ifdef fpc}
+  str(high(qword),s);
+  if s<>'!!!unknown!!!' then
+   begin
+     writeln('high(qword) error!: "',s,'"');
+     error:=true;
+   end;
+  str(low(qword),s);
+  if s<>'0' then
+   begin
+     writeln('low(qword) error!: "',s,'"');
+     error:=true;
+   end;
+{$endif}
+  if error then
+   halt(1);
+end.

+ 10 - 0
tests/tbs/ub0342a.pp

@@ -0,0 +1,10 @@
+unit ub0342a;
+interface
+procedure p(d:longword);
+implementation
+uses
+  ub0342b;
+procedure p(d:longword);
+begin
+end;
+end.

+ 6 - 0
tests/tbs/ub0342b.pp

@@ -0,0 +1,6 @@
+unit ub0342b;
+interface
+type
+  longWord=Cardinal;
+implementation
+end.

+ 0 - 0
tests/webtbs/tw1404.pp → tests/webtbs/tw1414.pp