[GRASS-SVN] r58025 - in grass/trunk/lib/raster3d: . test
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 17 01:04:50 PDT 2013
Author: huhabla
Date: 2013-10-17 01:04:50 -0700 (Thu, 17 Oct 2013)
New Revision: 58025
Added:
grass/trunk/lib/raster3d/test/test.raster3d.lib.html
grass/trunk/lib/raster3d/test/test_raster3d_lib.h
Removed:
grass/trunk/lib/raster3d/test/test.g3d.lib.html
grass/trunk/lib/raster3d/test/test_g3d_lib.h
Modified:
grass/trunk/lib/raster3d/cache.c
grass/trunk/lib/raster3d/test/Makefile
grass/trunk/lib/raster3d/test/test_coordinate_transform.c
grass/trunk/lib/raster3d/test/test_main.c
grass/trunk/lib/raster3d/test/test_put_get_value.c
grass/trunk/lib/raster3d/test/test_put_get_value_large_file.c
grass/trunk/lib/raster3d/test/test_tools.c
Log:
Fixed wrong variable types in cache.c, updated name scheme in the raster3d test framework.
Modified: grass/trunk/lib/raster3d/cache.c
===================================================================
--- grass/trunk/lib/raster3d/cache.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/cache.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -56,8 +56,10 @@
static int cacheWrite_readFun(int tileIndex, void *tileBuf, void *closure)
{
RASTER3D_Map *map = closure;
- size_t index, nBytes;
- size_t pos, offs, offsLast;
+ int index;
+ size_t nBytes;
+ size_t offs, offsLast;
+ long int pos;
pos = map->index[tileIndex];
@@ -121,7 +123,7 @@
return 0;
}
- index = *((int *)((unsigned char *)xdr + nBytes));
+ index = *((int*)((unsigned char *)xdr + nBytes));
map->index[index] = -pos - 2;
map->cachePosLast--;
Modified: grass/trunk/lib/raster3d/test/Makefile
===================================================================
--- grass/trunk/lib/raster3d/test/Makefile 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/Makefile 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../../..
-PGM=test.g3d.lib
+PGM=test.raster3d.lib
LIBES = $(GISLIB) $(RASTER3DLIB) $(RASTERLIB)
DEPENDENCIES = $(GISDEP) $(RASTER3DDEP) $(RASTERDEP)
Deleted: grass/trunk/lib/raster3d/test/test.g3d.lib.html
===================================================================
Copied: grass/trunk/lib/raster3d/test/test.raster3d.lib.html (from rev 57961, grass/trunk/lib/raster3d/test/test.g3d.lib.html)
===================================================================
Modified: grass/trunk/lib/raster3d/test/test_coordinate_transform.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_coordinate_transform.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_coordinate_transform.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,6 +1,6 @@
#include <stdlib.h>
#include <string.h>
-#include "test_g3d_lib.h"
+#include "test_raster3d_lib.h"
#include "grass/interpf.h"
static int test_coordinate_transform(void);
@@ -14,15 +14,15 @@
{
int sum = 0;
- G_message(_("\n++ Running g3d coordinate transform unit tests ++"));
+ G_message(_("\n++ Running raster3d coordinate transform unit tests ++"));
sum += test_coordinate_transform();
sum += test_region();
if (sum > 0)
- G_warning(_("\n-- g3d coordinate transform unit tests failure --"));
+ G_warning(_("\n-- raster3d coordinate transform unit tests failure --"));
else
- G_message(_("\n-- g3d coordinate transform unit tests finished successfully --"));
+ G_message(_("\n-- raster3d coordinate transform unit tests finished successfully --"));
return sum;
}
@@ -39,7 +39,7 @@
RASTER3D_Region region, default_region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(&default_region);
Rast3d_region_copy(®ion, &default_region);
Deleted: grass/trunk/lib/raster3d/test/test_g3d_lib.h
===================================================================
--- grass/trunk/lib/raster3d/test/test_g3d_lib.h 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_g3d_lib.h 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,30 +0,0 @@
-
-/*****************************************************************************
-*
-* MODULE: Grass g3d Library
-* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
-* soerengebbert <at> googlemail <dot> com
-*
-* PURPOSE: Unit and Integration tests
-*
-* COPYRIGHT: (C) 2000 by the GRASS Development Team
-*
-* This program is free software under the GNU General Public
-* License (>=v2). Read the file COPYING that comes with GRASS
-* for details.
-*
-*****************************************************************************/
-
-#ifndef _TEST_RASTER3D_LIB_H_
-#define _TEST_RASTER3D_LIB_H_
-
-#include <grass/raster3d.h>
-#include <grass/gis.h>
-#include <grass/glocale.h>
-
-double compute_time_difference(struct timeval start, struct timeval end);
-int unit_test_coordinate_transform(void);
-int unit_test_put_get_value(void);
-int unit_test_put_get_value_large_file(int depths, int rows, int cols, int tile_size);
-
-#endif
Modified: grass/trunk/lib/raster3d/test/test_main.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_main.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_main.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,7 +1,7 @@
/*****************************************************************************
*
-* MODULE: Grass g3d Library
+* MODULE: Grass raster3d Library
* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
* soerengebbert <at> googlemail <dot> com
*
@@ -17,7 +17,7 @@
#include <stdlib.h>
#include <string.h>
-#include "test_g3d_lib.h"
+#include "test_raster3d_lib.h"
/*- Parameters and global variables -----------------------------------------*/
typedef struct {
@@ -108,7 +108,7 @@
module = G_define_module();
module->description
- = _("Performs unit and integration tests for the g3d library");
+ = _("Performs unit and integration tests for the raster3d library");
/* Get parameters from user */
set_params();
@@ -174,9 +174,9 @@
}
if (returnstat != 0)
- G_warning("Errors detected while testing the g3d lib");
+ G_warning("Errors detected while testing the raster3d lib");
else
- G_message("\n-- g3d lib tests finished successfully --");
+ G_message("\n-- raster3d lib tests finished successfully --");
return (returnstat);
}
Modified: grass/trunk/lib/raster3d/test/test_put_get_value.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_put_get_value.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_put_get_value.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,7 +1,7 @@
/*****************************************************************************
*
-* MODULE: Grass g3d Library
+* MODULE: Grass raster3d Library
* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
* soerengebbert <at> googlemail <dot> com
*
@@ -16,7 +16,7 @@
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
-#include "test_g3d_lib.h"
+#include "test_raster3d_lib.h"
#include "grass/interpf.h"
static int test_put_get_value_dcell(void);
@@ -35,7 +35,7 @@
{
int sum = 0;
- G_message(_("\n++ Running g3d put/get value unit tests ++"));
+ G_message(_("\n++ Running raster3d put/get value unit tests ++"));
//sum += test_put_get_value_dcell();
//sum += test_put_get_value_fcell();
@@ -43,9 +43,9 @@
if (sum > 0)
- G_warning(_("\n-- g3d put/get value unit tests failure --"));
+ G_warning(_("\n-- raster3d put/get value unit tests failure --"));
else
- G_message(_("\n-- g3d put/get value unit tests finished successfully --"));
+ G_message(_("\n-- raster3d put/get value unit tests finished successfully --"));
return sum;
}
@@ -67,7 +67,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
@@ -211,7 +211,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
@@ -337,7 +337,7 @@
RASTER3D_Region window;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
Modified: grass/trunk/lib/raster3d/test/test_put_get_value_large_file.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_put_get_value_large_file.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_put_get_value_large_file.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,7 +1,7 @@
/*****************************************************************************
*
-* MODULE: Grass g3d Library
+* MODULE: Grass raster3d Library
* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
* soerengebbert <at> googlemail <dot> com
*
@@ -16,7 +16,7 @@
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
-#include "test_g3d_lib.h"
+#include "test_raster3d_lib.h"
#include "grass/interpf.h"
#define EPSILON 0.000000001
@@ -34,7 +34,7 @@
{
int sum = 0;
- G_message(_("\n++ Running g3d put/get value large file unit tests ++"));
+ G_message(_("\n++ Running raster3d put/get value large file unit tests ++"));
sum += test_large_file_random(depths, rows, cols, tile_size);
sum += test_large_file_sparse_random(depths, rows, cols, tile_size);
@@ -45,9 +45,9 @@
if (sum > 0)
- G_warning(_("\n-- g3d put/get value large file unit tests failure --"));
+ G_warning(_("\n-- raster3d put/get value large file unit tests failure --"));
else
- G_message(_("\n-- g3d put/get value large file unit tests finished successfully --"));
+ G_message(_("\n-- raster3d put/get value large file unit tests finished successfully --"));
return sum;
}
@@ -65,7 +65,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
@@ -150,7 +150,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
@@ -232,7 +232,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
@@ -332,7 +332,7 @@
RASTER3D_Region region;
RASTER3D_Map *map = NULL;
- /* We need to set up a specific region for the new g3d map.
+ /* We need to set up a specific region for the new raster3d map.
* First we safe the default region. */
Rast3d_get_window(®ion);
Copied: grass/trunk/lib/raster3d/test/test_raster3d_lib.h (from rev 57961, grass/trunk/lib/raster3d/test/test_g3d_lib.h)
===================================================================
--- grass/trunk/lib/raster3d/test/test_raster3d_lib.h (rev 0)
+++ grass/trunk/lib/raster3d/test/test_raster3d_lib.h 2013-10-17 08:04:50 UTC (rev 58025)
@@ -0,0 +1,30 @@
+
+/*****************************************************************************
+*
+* MODULE: Grass raster3d Library
+* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
+* soerengebbert <at> googlemail <dot> com
+*
+* PURPOSE: Unit and Integration tests
+*
+* COPYRIGHT: (C) 2000 by the GRASS Development Team
+*
+* This program is free software under the GNU General Public
+* License (>=v2). Read the file COPYING that comes with GRASS
+* for details.
+*
+*****************************************************************************/
+
+#ifndef _TEST_RASTER3D_LIB_H_
+#define _TEST_RASTER3D_LIB_H_
+
+#include <grass/raster3d.h>
+#include <grass/gis.h>
+#include <grass/glocale.h>
+
+double compute_time_difference(struct timeval start, struct timeval end);
+int unit_test_coordinate_transform(void);
+int unit_test_put_get_value(void);
+int unit_test_put_get_value_large_file(int depths, int rows, int cols, int tile_size);
+
+#endif
Modified: grass/trunk/lib/raster3d/test/test_tools.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_tools.c 2013-10-17 07:48:49 UTC (rev 58024)
+++ grass/trunk/lib/raster3d/test/test_tools.c 2013-10-17 08:04:50 UTC (rev 58025)
@@ -1,7 +1,7 @@
/*****************************************************************************
*
-* MODULE: Grass g3d Library
+* MODULE: Grass raster3d Library
* AUTHOR(S): Soeren Gebbert, Braunschweig (GER) Jun 2011
* soerengebbert <at> googlemail <dot> com
*
@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "test_g3d_lib.h"
+#include "test_raster3d_lib.h"
#include <sys/time.h>
/* *************************************************************** */
More information about the grass-commit
mailing list