Fix 32bit issue in sep_log_api test (#7752)
authorGereon Kremer <gkremer@stanford.edu>
Tue, 7 Dec 2021 01:46:54 +0000 (17:46 -0800)
committerGitHub <noreply@github.com>
Tue, 7 Dec 2021 01:46:54 +0000 (01:46 +0000)
This uses the proper `t.getInt64Value()` getter instead of `std::stoll(t.toString())`, fixing an issue on 32bit platforms.

test/api/cpp/sep_log_api.cpp

index 5795de794e3f5fe95d1396e7a9d446c9387e2fdb..6a2fc9740e8c97e2274b897e26418ca2dfba9c28 100644 (file)
@@ -247,8 +247,7 @@ int validate_getters(void)
        * than the random constant -- if we get a value that is LTE, then
        * something has gone wrong!
        */
-      if (std::stoll(value.toString())
-          <= std::stoll(random_constant.toString()))
+      if (value.getInt64Value() <= random_constant.getInt64Value())
       {
         return -1;
       }