Ilya Zakharevich on Tue, 18 May 1999 14:48:44 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PATCH 2.0.14] graphing tests using too large rectangles


Graphing tests assume that the size of the plotting device is 1000 or
more.  This is false with gnuplot graphic on X-less system (such as
the telnet session).  The following patch fixes it:

We subtract 11 to compensate for plotdraw([0,10,10]) later in the
tests.  The policy in absense of shifts should be subtracting 1.  It
would be nice if it were documented too.

Enjoy,
Ilya

--- pari-2.0.14.alpha/src/test/in/graph~	Mon Aug 31 14:36:28 1998
+++ pari-2.0.14.alpha/src/test/in/graph	Tue May 18 08:31:36 1999
@@ -1,6 +1,8 @@
 \p 38
 \e
-plotinit(0,500,500)
+t = plothsizes();
+plotinit(0,t[1]-11,t[2]-11)
+plotscale(0,0,1000,0,1000);
 plotmove(0,0,0);plotbox(0,500,500)
 plotmove(0,200,150)
 plotcursor(0)
--- ./src/test/in/ploth~	Mon Aug 31 14:36:44 1998
+++ ./src/test/in/ploth	Tue May 18 13:27:19 1999
@@ -1,6 +1,8 @@
 \e
 default(realprecision,9)
-plotinit(0,500,500)
+t = plothsizes();
+plotinit(0,t[1]-11,t[2]-11)
+plotscale(0,0,1000,0,1000);
 plotbox(0,500,500)
 plotdraw([0,0,0])
 psdraw([0,0,0])
--- ./src/test/64/graph~	Fri Mar  5 12:43:53 1999
+++ ./src/test/64/graph	Tue May 18 13:50:29 1999
@@ -1,5 +1,7 @@
    echo = 1 (on)
-? plotinit(0,500,500)
+? t = plothsizes();
+? plotinit(0,t[1]-11,t[2]-11)
+? plotscale(0,0,1000,0,1000);
 ? plotmove(0,0,0);plotbox(0,500,500)
 ? plotmove(0,200,150)
 ? plotcursor(0)
--- ./src/test/64/ploth~	Wed Dec  9 12:11:23 1998
+++ ./src/test/64/ploth	Tue May 18 13:50:15 1999
@@ -1,6 +1,8 @@
 ? default(realprecision,9)
    realprecision = 9 significant digits
-? plotinit(0,500,500)
+? t = plothsizes();
+? plotinit(0,t[1]-11,t[2]-11)
+? plotscale(0,0,1000,0,1000);
 ? plotbox(0,500,500)
 ? plotdraw([0,0,0])
 ? psdraw([0,0,0])
--- ./src/test/32/graph~	Mon Feb 15 10:39:40 1999
+++ ./src/test/32/graph	Tue May 18 13:46:48 1999
@@ -1,6 +1,8 @@
    realprecision = 38 significant digits
    echo = 1 (on)
-? plotinit(0,500,500)
+? t = plothsizes();
+? plotinit(0,t[1]-11,t[2]-11)
+? plotscale(0,0,1000,0,1000);
 ? plotmove(0,0,0);plotbox(0,500,500)
 ? plotmove(0,200,150)
 ? plotcursor(0)
--- ./src/test/32/ploth~	Wed Dec  9 12:10:32 1998
+++ ./src/test/32/ploth	Tue May 18 13:47:13 1999
@@ -1,7 +1,9 @@
    echo = 1 (on)
 ? default(realprecision,9)
    realprecision = 9 significant digits
-? plotinit(0,500,500)
+? t = plothsizes();
+? plotinit(0,t[1]-11,t[2]-11)
+? plotscale(0,0,1000,0,1000);
 ? plotbox(0,500,500)
 ? plotdraw([0,0,0])
 ? psdraw([0,0,0])