fors_point-test.c

00001 /* $Id: fors_point-test.c,v 1.1 2007/08/28 13:33:09 jmlarsen Exp $
00002  *
00003  * This file is part of the FORS Library
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00019  */
00020 
00021 /*
00022  * $Author: jmlarsen $
00023  * $Date: 2007/08/28 13:33:09 $
00024  * $Revision: 1.1 $
00025  * $Name: fors-4_8_6 $
00026  */
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031 
00032 #include <fors_point.h>
00033 #include <test.h>
00034 
00044 static void
00045 test_point(void)
00046 {
00047     fors_point *p1 = fors_point_new(1, 2);
00048     fors_point *p2 = fors_point_new(2, 2);
00049 
00050     test_abs( fors_point_distsq(p1, p2), 1.0, 0.01 );
00051     
00052     fors_point_delete(&p1);
00053     fors_point_delete(&p2);
00054 
00055     return;
00056 }
00057 
00058 
00062 int main(void)
00063 {
00064     TEST_INIT;
00065 
00066     test_point();
00067 
00068     TEST_END;
00069 }
00070 

Generated on Fri Mar 4 09:46:00 2011 for FORS Pipeline Reference Manual by  doxygen 1.4.7