<div dir="ltr">Start in the regress directory found in the root of the postgis source. You'll see that there are always two files for any particular test (MYTEST.sql and MYTEST_expected). To include MYTEST as part of "make check", you add MYTEST to regress/Makefile.in<div>
<br></div><div>-bborie</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 14, 2013 at 10:29 PM, Stephen Mather <span dir="ltr"><<a href="mailto:stephen@smathermather.com" target="_blank">stephen@smathermather.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have ticketed. It's a little messy of a ticket (actually two), so apologies for that.<br><br>
<a href="http://trac.osgeo.org/postgis/ticket/2570" target="_blank">http://trac.osgeo.org/postgis/ticket/2570</a><br><a href="http://trac.osgeo.org/postgis/ticket/2571" target="_blank">http://trac.osgeo.org/postgis/ticket/2571</a><br>
<br></div>I have not yet written any unit tests. Where would I begin... <br><div><br><span></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 1:02 AM, Bborie Park <span dir="ltr"><<a href="mailto:dustymugs@gmail.com" target="_blank">dustymugs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sweet. Can you create a ticket and attach the patch?<div><br></div><div>Some unit tests would be nice so that expected behavior is maintained... and bugs are caught.<br>
</div><div><div><br></div><div>Thanks!<br>
<div><br></div><div>-bborie</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Sat, Dec 14, 2013 at 7:57 PM, Stephen Mather <span dir="ltr"><<a href="mailto:stephen@smathermather.com" target="_blank">stephen@smathermather.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Ahem-- bugs fixed:<br>
<br>
-- Function: st_rotatex(geometry, double precision, geometry)<br>
<div>CREATE OR REPLACE FUNCTION ST_RotateX(geomA geometry, rotRadians<br>
double precision, pointOrigin geometry)<br>
RETURNS geometry AS<br>
$BODY$<br>
<br>
----- Transform geometry to nullsville (0,0,0) so rotRadians will take<br>
place around the pointOrigin<br>
WITH transformed AS (<br>
SELECT ST_Translate(geomA, -1 * ST_X(pointOrigin), -1 *<br>
ST_Y(pointOrigin), -1 * ST_Z(pointOrigin)) AS the_geom<br>
),<br>
----- Rotate in place<br>
rotated AS (<br>
</div> SELECT ST_RotateX(the_geom, rotRadians) AS the_geom FROM transformed<br>
<div> ),<br>
----- Translate back home<br>
rotTrans AS (<br>
</div> SELECT ST_Translate(the_geom, ST_X(pointOrigin),<br>
ST_Y(pointOrigin), ST_Z(pointOrigin)) AS the_geom<br>
FROM rotated<br>
<div> )<br>
----- profit<br>
SELECT the_geom from rotTrans<br>
<br>
;<br>
<br>
$BODY$<br>
LANGUAGE sql VOLATILE<br>
COST 100;<br>
<br>
<br>
</div></div></div><div><div><div><div>On Sat, Dec 14, 2013 at 8:37 PM, Stephen Mather<br>
<<a href="mailto:stephen@smathermather.com" target="_blank">stephen@smathermather.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I think I avoided doing linear algebra, which is good since I never<br>
> studied it... .<br>
><br>
> This is my cludgy patch for making a version of<br>
><br>
> geometry ST_RotateX(geometry geomA, float rotRadians, geometry pointOrigin)<br>
><br>
> It's not pretty enough to be a real patch ('cause my brain couldn't do<br>
> that whole linear algebra thing, and hence why it's here and not the<br>
> developers list), but thought I'd share it anyway and get impressions,<br>
> and have some brighter minds make sure I don't have some major logic<br>
> failure here:<br>
><br>
> -------<br>
><br>
> DROP FUNCTION st_rotatex(geometry,double precision,geometry);<br>
><br>
> CREATE OR REPLACE FUNCTION ST_RotateX(geomA geometry, rotRadians<br>
> double precision, pointOrigin geometry)<br>
> RETURNS geometry AS<br>
> $BODY$<br>
><br>
> ----- Transform geometry to nullsville (0,0,0) so rotRadians will take<br>
> place around the pointOrigin<br>
> WITH transformed AS (<br>
> SELECT ST_Translate(geomA, -1 * ST_X(pointOrigin), -1 *<br>
> ST_Y(pointOrigin), -1 * ST_Z(pointOrigin)) AS the_geom<br>
> ),<br>
> ----- Rotate in place<br>
> rotated AS (<br>
> SELECT ST_RotateX(the_geom, rotRadians) FROM transformed<br>
> ),<br>
> ----- Translate back home<br>
> rotTrans AS (<br>
> SELECT ST_Translate(geomA, ST_X(pointOrigin), ST_Y(pointOrigin),<br>
> ST_Z(pointOrigin)) AS the_geom<br>
> )<br>
> ----- profit<br>
> SELECT the_geom from rotTrans<br>
><br>
> ;<br>
><br>
> $BODY$<br>
> LANGUAGE sql VOLATILE<br>
> COST 100;<br></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>