Browse Source

* small fixes

peter 24 years ago
parent
commit
6ddfd48242
3 changed files with 46 additions and 38 deletions
  1. 9 0
      tests/tbf/tb0103.pp
  2. 0 1
      tests/tbs/tb0140.pp
  3. 37 37
      tests/tbs/tb0344.pp

+ 9 - 0
tests/tbf/tb0103.pp

@@ -0,0 +1,9 @@
+{ %fail }
+{$R+}
+Type Directions = (North, East,South,West);
+
+Var Go : Directions;
+
+begin
+  Go:=Pred(North); { must give compile time error }
+end.

+ 0 - 1
tests/tbs/tb0140.pp

@@ -18,5 +18,4 @@ begin
   Require_Error(201);
   Require_Error(201);
   Go:=North;
   Go:=North;
   Go:=Pred(Go); { must give run-time error }
   Go:=Pred(Go); { must give run-time error }
-  Go:=Pred(North); { must give compile time error }
 end.
 end.

+ 37 - 37
tests/tbs/tb0344.pp

@@ -1,37 +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.
+{ %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<>'18446744073709551615' 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.