summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/tests/gtest/TestFog.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /toolkit/components/glean/tests/gtest/TestFog.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/glean/tests/gtest/TestFog.cpp')
-rw-r--r--toolkit/components/glean/tests/gtest/TestFog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/toolkit/components/glean/tests/gtest/TestFog.cpp b/toolkit/components/glean/tests/gtest/TestFog.cpp
index 2de8f9ba4d..0c1621911e 100644
--- a/toolkit/components/glean/tests/gtest/TestFog.cpp
+++ b/toolkit/components/glean/tests/gtest/TestFog.cpp
@@ -181,6 +181,7 @@ TEST_F(FOGFixture, TestCppMemoryDistWorks) {
// Sum is in bytes, test_only::do_you_remember is in megabytes. So
// multiplication ahoy!
ASSERT_EQ(data.sum, 24UL * 1024 * 1024);
+ ASSERT_EQ(data.count, 2UL);
for (const auto& entry : data.values) {
const uint64_t bucket = entry.GetKey();
const uint64_t count = entry.GetData();
@@ -196,6 +197,7 @@ TEST_F(FOGFixture, TestCppCustomDistWorks) {
DistributionData data =
test_only_ipc::a_custom_dist.TestGetValue("store1"_ns).unwrap().ref();
ASSERT_EQ(data.sum, 7UL + 268435458);
+ ASSERT_EQ(data.count, 2UL);
for (const auto& entry : data.values) {
const uint64_t bucket = entry.GetKey();
const uint64_t count = entry.GetData();
@@ -253,6 +255,10 @@ TEST_F(FOGFixture, TestCppTimingDistWorks) {
DistributionData data =
test_only::what_time_is_it.TestGetValue().unwrap().ref();
+
+ // Cancelled timers should not increase count.
+ ASSERT_EQ(data.count, 2UL);
+
const uint64_t NANOS_IN_MILLIS = 1e6;
// bug 1701847 - Sleeps don't necessarily round up as you'd expect.