forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nishant Bansal <[email protected]>
- Loading branch information
1 parent
d0ef2dc
commit c0c5f30
Showing
7 changed files
with
415 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MODULE_TOPDIR = ../../.. | ||
|
||
PGM=test.gparson.lib | ||
|
||
LIBES = $(PARSONLIB) $(GPARSONLIB) $(GISLIB) | ||
DEPENDENCIES = $(PARSONDEP) $(GPARSONDEP) $(GISDEP) | ||
|
||
include $(MODULE_TOPDIR)/include/Make/Module.make | ||
|
||
default: cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
Take a look at the module command line help for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/***************************************************************************** | ||
* | ||
* MODULE: Grass gparson Library | ||
* | ||
* PURPOSE: Unit 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_GPARSON_LIB_H_ | ||
#define _TEST_GPARSON_LIB_H_ | ||
|
||
#include <grass/gparson.h> | ||
|
||
/* parson wrapper tests */ | ||
int unit_test_parson_wrapper(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/**************************************************************************** | ||
* | ||
* MODULE: test.gparson.lib | ||
* | ||
* | ||
* PURPOSE: Unit tests for the gparson library | ||
* | ||
* COPYRIGHT: (C) 2007 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. | ||
* | ||
*****************************************************************************/ | ||
|
||
#include <stdlib.h> | ||
#include <grass/gis.h> | ||
#include <grass/glocale.h> | ||
#include <grass/gparson.h> | ||
#include "test_gparson_lib.h" | ||
#include "grass/gparson.h" | ||
|
||
/* ************************************************************************* */ | ||
|
||
/* ************************************************************************* */ | ||
/* ************************************************************************* */ | ||
|
||
/* ************************************************************************* */ | ||
int main(int argc, char *argv[]) | ||
{ | ||
struct GModule *module; | ||
int returnstat = 0; | ||
|
||
/* Initialize GRASS */ | ||
G_gisinit(argv[0]); | ||
|
||
module = G_define_module(); | ||
module->description = _("Performs unit tests " | ||
"for the gparson library"); | ||
|
||
if (G_parser(argc, argv)) | ||
exit(EXIT_FAILURE); | ||
|
||
/*Run the unit tests */ | ||
returnstat += unit_test_parson_wrapper(); | ||
|
||
if (returnstat != 0) | ||
G_warning("Errors detected while testing the gparson lib"); | ||
else | ||
G_message("\n-- gparson lib tests finished successfully --"); | ||
|
||
return (returnstat); | ||
} |
Oops, something went wrong.