Source release 15.0.0

This commit is contained in:
John W. Bruce
2019-02-28 16:25:30 -08:00
parent f51edaba5a
commit 66628486b5
2672 changed files with 260431 additions and 762489 deletions

View File

@@ -2,6 +2,7 @@
//
// Unit tests for ValueMetric.
#include <memory>
#include <string>
#include "value_metric.h"
@@ -9,7 +10,6 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "metrics.pb.h"
#include "scoped_ptr.h"
namespace wvcdm {
namespace metrics {
@@ -18,7 +18,7 @@ TEST(ValueMetricTest, StringValue) {
ValueMetric<std::string> metric;
metric.Record("foo");
wvcdm::scoped_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
std::unique_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
ASSERT_EQ("foo", metric_proto->string_value());
ASSERT_FALSE(metric_proto->has_error_code());
}
@@ -27,7 +27,7 @@ TEST(ValueMetricTest, DoubleValue) {
ValueMetric<double> metric;
metric.Record(42.0);
wvcdm::scoped_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
std::unique_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
ASSERT_EQ(42.0, metric_proto->double_value());
ASSERT_FALSE(metric_proto->has_error_code());
}
@@ -36,7 +36,7 @@ TEST(ValueMetricTest, Int32Value) {
ValueMetric<int32_t> metric;
metric.Record(42);
wvcdm::scoped_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
std::unique_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
ASSERT_EQ(42, metric_proto->int_value());
ASSERT_FALSE(metric_proto->has_error_code());
}
@@ -45,7 +45,7 @@ TEST(ValueMetricTest, Int64Value) {
ValueMetric<int64_t> metric;
metric.Record(42);
wvcdm::scoped_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
std::unique_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
ASSERT_EQ(42, metric_proto->int_value());
ASSERT_FALSE(metric_proto->has_error_code());
}
@@ -55,7 +55,7 @@ TEST(ValueMetricTest, SetError) {
metric.Record(42);
metric.SetError(7);
wvcdm::scoped_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
std::unique_ptr<drm_metrics::ValueMetric> metric_proto(metric.ToProto());
ASSERT_EQ(7, metric_proto->error_code());
ASSERT_FALSE(metric_proto->has_int_value());
}