feat: adjust struct-location
This commit is contained in:
parent
c483541c29
commit
6447c61b1c
|
@ -6,20 +6,17 @@
|
|||
/*use strcmp*/
|
||||
#include <string.h>
|
||||
|
||||
char lat[11]="+052.26594";
|
||||
char lon[10]="+10.52673";
|
||||
|
||||
static void test_lct_lat(){
|
||||
struct location lctn;
|
||||
strcpy(lctn.lat, "+052.26594");
|
||||
strcpy(lctn.lon, "+10.52673");
|
||||
struct location lctnGet=getLocation(lctn.lat, lctn.lon);
|
||||
assert(strcmp(lctn.lat, lctnGet.lat)==0 && "test_lct_lat()");
|
||||
struct location lctnGet=getLocation(lat, lon);
|
||||
assert(strcmp(lat, lctnGet.lat)==0 && "test_lct_lat()");
|
||||
}
|
||||
|
||||
static void test_lct_lon(){
|
||||
struct location lctn;
|
||||
strcpy(lctn.lat, "+052.26594");
|
||||
strcpy(lctn.lon, "+10.52673");
|
||||
struct location lctnGet=getLocation(lctn.lat, lctn.lon);
|
||||
assert(strcmp(lctn.lat, lctnGet.lat)==0 && "test_lct_lon()");
|
||||
struct location lctnGet=getLocation(lat, lon);
|
||||
assert(strcmp(lon, lctnGet.lon)==0 && "test_lct_lon()");
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
|
Loading…
Reference in New Issue