summaryrefslogtreecommitdiff
path: root/devel/kyua/files/patch-utils_datetime__test.cpp
blob: 6b384313d2d4af6ead483593cde0e56adf97c57e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- utils/datetime_test.cpp.orig	2017-04-08 05:25:26 UTC
+++ utils/datetime_test.cpp
@@ -532,11 +532,11 @@ ATF_TEST_CASE_BODY(timestamp__subtractio
     ATF_REQUIRE_EQ(datetime::delta(100, 0), ts3 - ts1);
     ATF_REQUIRE_EQ(datetime::delta(99, 999988), ts3 - ts2);
 
-    ATF_REQUIRE_THROW_RE(
-        std::runtime_error,
-        "Cannot subtract 1291970850123456us from 1291970750123468us "
-        ".*negative datetime::delta.*not supported",
-        ts2 - ts3);
+    /*
+     * NOTE (ngie): behavior change for
+     * https://github.com/jmmv/kyua/issues/155 .
+     */
+    ATF_REQUIRE_EQ(datetime::delta::from_microseconds(1), ts2 - ts3);
 }