]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/sdk/test/common/empty_attributes_test.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / sdk / test / common / empty_attributes_test.cc
CommitLineData
1e59de90
TL
1// Copyright The OpenTelemetry Authors
2// SPDX-License-Identifier: Apache-2.0
3
4#include "opentelemetry/sdk/common/empty_attributes.h"
5
6#include <gtest/gtest.h>
7
8TEST(EmptyAttributesTest, TestSize)
9{
10 EXPECT_EQ(opentelemetry::sdk::GetEmptyAttributes().size(), 0);
11}
12
13// Test that GetEmptyAttributes() always returns the same KeyValueIterableView
14TEST(EmptyAttributesTest, TestMemory)
15{
16 auto attributes1 = opentelemetry::sdk::GetEmptyAttributes();
17 auto attributes2 = opentelemetry::sdk::GetEmptyAttributes();
18 EXPECT_EQ(memcmp(&attributes1, &attributes2, sizeof(attributes1)), 0);
19}