[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #OTA-964622]: udunits2 error message


Are you executing the program "testUnits" and getting an error or are you
executing code that you extracted from that program? If the former, then
the package's unit-test has a serious problem. If the latter, then you likely
didn't extract sufficient context for the test (previous modifications to the 
variable "unitSystem" come to mind).

> Apologies for troubling you again...
> I'm having some problems using the time related functions from udunits2.
> From the test script supplied along with the distribution, executing the
> highlighted code gives me this error 'galileanInitConverterFromProduct():
> No "second" unit defined'
> static void
> test_utNewBaseUnit(void)
> {
> ..........
> second = ut_new_base_unit(unitSystem);
> CU_ASSERT_PTR_NULL(ut_offset_by_time(second,
> ut_encode_time(1970, 1, 1, 0, 0, 0)));
> CU_ASSERT_EQUAL(ut_get_status(), UT_NO_SECOND);
> ..........
> }
> "second' is not NULL but it appears that  second->common.system->second
> == NULL, which is probably why the error shows.
> I'm simply executing the supplied test script but it's probably incomplete.
> Does something else need to be initialized/set?
> What am I missing in the test script?

Steve Emmerson

Ticket Details
Ticket ID: OTA-964622
Department: Support UDUNITS
Priority: Normal
Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.