Skip to content

Commit

Permalink
msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Sep 29, 2023
1 parent b9f538b commit 06cd640
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sdk/test/metrics/sync_instruments_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ TEST(SyncInstruments, LongUpDownCounter)
counter.Add(10, opentelemetry::common::KeyValueIterableView<M>({}));
counter.Add(10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
// negative values
counter.Add(-10);
counter.Add(-10, opentelemetry::context::Context{});

counter.Add(-10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}));
counter.Add(-10, opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
opentelemetry::context::Context{});
counter.Add(-10, opentelemetry::common::KeyValueIterableView<M>({}));
counter.Add(-10, opentelemetry::common::KeyValueIterableView<M>({}),
opentelemetry::context::Context{});
}

TEST(SyncInstruments, DoubleUpDownCounter)
Expand Down Expand Up @@ -100,7 +111,6 @@ TEST(SyncInstruments, LongHistogram)
std::unique_ptr<SyncWritableMetricStorage> metric_storage(new SyncMultiMetricStorage());
LongHistogram histogram(instrument_descriptor, std::move(metric_storage));
histogram.Record(10, opentelemetry::context::Context{});
histogram.Record(-10, opentelemetry::context::Context{}); // This is ignored

histogram.Record(10,
opentelemetry::common::KeyValueIterableView<M>({{"abc", "123"}, {"xyz", "456"}}),
Expand Down

0 comments on commit 06cd640

Please sign in to comment.