#include "location.h" /*use assert()*/ #include /*use strcmp*/ #include 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()"); } 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()"); } int main(){ test_lct_lat(); test_lct_lon(); }