This source file includes following definitions.
- TEST
#include "base/test/statistics_delta_reader.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_samples.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
TEST(StatisticsDeltaReaderTest, Scope) {
UMA_HISTOGRAM_BOOLEAN("Test", true);
StatisticsDeltaReader reader;
scoped_ptr<HistogramSamples> samples(
reader.GetHistogramSamplesSinceCreation("Test"));
EXPECT_FALSE(samples);
UMA_HISTOGRAM_BOOLEAN("Test", true);
samples = reader.GetHistogramSamplesSinceCreation("Test");
EXPECT_TRUE(samples);
EXPECT_EQ(1, samples->TotalCount());
}
}