| 12 | // --------------------------------------------------------------------------- |
| 13 | |
| 14 | TEST(OidToHex, FullLengthIs40) { |
| 15 | TestRepo repo; |
| 16 | repo.write_file("f", "hello"); |
| 17 | git_oid oid = repo.commit("init"); |
| 18 | |
| 19 | std::string hex = oid_to_hex(&oid); |
| 20 | EXPECT_EQ(hex.size(), 40u); |
| 21 | // only hex digits |
| 22 | EXPECT_TRUE(hex.find_first_not_of("0123456789abcdef") == std::string::npos); |
| 23 | } |
| 24 | |
| 25 | TEST(OidToHex, ShortLengthIs7) { |
| 26 | TestRepo repo; |
nothing calls this directly
no test coverage detected