* print expected output when an error occurs, rather than two times the

actual output

git-svn-id: trunk@21250 -
This commit is contained in:
Jonas Maebe 2012-05-07 12:55:57 +00:00
parent 2661bd406c
commit f8c815b3db
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ begin
SetExceptionMask([exInvalidOp,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision]);
writeln('{ Generated by FPC ',{$I %FPCVERSION%},' using tgenstr.pp }');
writeln('uses math; procedure c(d : double;const s : string);');
writeln('var hs : string;begin str(d,hs); if hs<>s then begin writeln(d,'' '',hs); halt(1); end; end;');
writeln('var hs : string;begin str(d,hs); if hs<>s then begin writeln(''expected: "'',s,''", got: "'',hs,''"''); halt(1); end; end;');
for j:=1 to 1 do
begin
writeln('procedure p',j,'; begin');

View File

@ -1,6 +1,6 @@
{ Generated by FPC 2.6.0 using tgenstr.pp }
uses math; procedure c(d : double;const s : string);
var hs : string;begin str(d,hs); if hs<>s then begin writeln(d,' ',hs); halt(1); end; end;
var hs : string;begin str(d,hs); if hs<>s then begin writeln('expected: "',s,'", got: "',hs,'"'); halt(1); end; end;
procedure p1; begin
c( 2.40494053092133E+037,' 2.40494053092133E+037');
c( 2.18329615378780E+280,' 2.18329615378780E+280');