@@ -39,7 +39,9 @@ using ::tensorstore::internal_metrics::FormatCollectedMetric;
3939using ::tensorstore::internal_metrics::IsCollectedMetricNonZero;
4040using ::tensorstore::internal_metrics::Units;
4141using ::testing::ElementsAre;
42+ using ::testing::Eq;
4243using ::testing::Pair;
44+ using ::testing::VariantWith;
4345
4446TEST (CollectTest, IsCollectedMetricNonZero) {
4547 CollectedMetric metric;
@@ -287,10 +289,10 @@ TEST(CollectTest, CollectedMetricDeltaSizeMismatch) {
287289 EXPECT_EQ (" a" , c.metric_name );
288290
289291 ASSERT_EQ (2 , c.values .size ());
290- EXPECT_THAT (c.values [0 ].value , 2 );
291- EXPECT_THAT (c.values [0 ].max_value , 10 );
292- EXPECT_THAT (c.values [1 ].value , 13 );
293- EXPECT_THAT (c.values [1 ].max_value , 111 );
292+ EXPECT_THAT (c.values [0 ].value , VariantWith< int64_t >( Eq ( 2 )) );
293+ EXPECT_THAT (c.values [0 ].max_value , VariantWith< int64_t >( Eq ( 10 )) );
294+ EXPECT_THAT (c.values [1 ].value , VariantWith< int64_t >( Eq ( 13 )) );
295+ EXPECT_THAT (c.values [1 ].max_value , VariantWith< int64_t >( Eq ( 111 )) );
294296
295297 ASSERT_EQ (1 , c.histograms .size ());
296298 EXPECT_EQ (5 , c.histograms [0 ].count );
0 commit comments