Commit cc44ed78 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2384] Test case of reused unit

parent acd2c55e
......@@ -105,6 +105,9 @@ TEST_F(RRTTLTest, fromTextUnit) {
EXPECT_EQ(60 * 60 + 3, RRTTL("1H3S").getValue());
EXPECT_EQ(2 * 24 * 60 * 60 + 75 * 60 + 4, RRTTL("75M2D4").getValue());
// Awkward, but allowed case - the same unit used twice.
EXPECT_EQ(20 * 3600, RRTTL("12H8H").getValue());
// Missing before unit.
EXPECT_THROW(RRTTL("W5H"), InvalidRRTTL);
EXPECT_THROW(RRTTL("5hW"), InvalidRRTTL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment