MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / TEST

Function TEST

unitTests/test_types.cpp:16–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14// More info about tm : http://www.cplusplus.com/reference/ctime/tm/
15
16TEST(ExivTime, getsTimeFromValidString) {
17 tm tmInstance;
18 ASSERT_EQ(0, exifTime("2007:05:24 12:31:55", &tmInstance));
19 ASSERT_EQ(107, tmInstance.tm_year); // Years since 1900
20 ASSERT_EQ(4, tmInstance.tm_mon);
21 ASSERT_EQ(24, tmInstance.tm_mday);
22 ASSERT_EQ(12, tmInstance.tm_hour);
23 ASSERT_EQ(31, tmInstance.tm_min);
24 ASSERT_EQ(55, tmInstance.tm_sec);
25}
26
27TEST(ExivTime, doesNotGetTimeWithBadFormedString) {
28 tm tmInstance;

Callers

nothing calls this directly

Calls 15

exifTimeFunction · 0.85
floatToRationalCastFunction · 0.85
parseRationalFunction · 0.85
parseUint32Function · 0.85
c_dataMethod · 0.80
dataMethod · 0.80
read_uint8Method · 0.80
read_uint16Method · 0.80
read_uint32Method · 0.80
read_uint64Method · 0.80
write_uint8Method · 0.80
write_uint16Method · 0.80

Tested by

no test coverage detected