Browse Source

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

git-svn-id: trunk@21250 -

Jonas Maebe 13 years ago
parent
commit
f8c815b3db
2 changed files with 2 additions and 2 deletions
  1. 1 1
      tests/test/units/system/tgenstr.pp
  2. 1 1
      tests/test/units/system/tstr1.pp

+ 1 - 1
tests/test/units/system/tgenstr.pp

@@ -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');

+ 1 - 1
tests/test/units/system/tstr1.pp

@@ -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');