From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- toolkit/components/glean/tests/gtest/TestFog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'toolkit/components/glean/tests/gtest') 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. -- cgit v1.2.3