Skip to content

Commit

Permalink
added noop test to cover more lines of code -- for code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 21, 2020
1 parent 987b90c commit e063cb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/test/trace/noop_test.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "opentelemetry/trace/noop.h"
#include "opentelemetry/core/timestamp.h"

#include <map>
#include <memory>
#include <string>

#include <gtest/gtest.h>

using opentelemetry::core::SystemTimestamp;
using opentelemetry::trace::NoopTracer;
using opentelemetry::trace::Tracer;

Expand All @@ -31,5 +33,10 @@ TEST(NoopTest, UseNoopTracers)

EXPECT_EQ(s1->IsRecording(), false);

s1->SetStatus(404, "span unavailable")
s1->SetStatus(404, "span unavailable");

s1->UpdateName("test_name");

SystemTimestamp t1;
s1->AddEvent("test_time_stamp", t1);
}

0 comments on commit e063cb7

Please sign in to comment.