Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: tests/TraceMemoryDumpTest.cpp

Issue 1300103004: Introduce interface for memory dumps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkTraceMemoryDump.h ('K') | « src/core/SkTraceMemoryDump.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TraceMemoryDumpTest.cpp
diff --git a/tests/TraceMemoryDumpTest.cpp b/tests/TraceMemoryDumpTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..00c30870e82e577f17268f2575e80846d749821d
--- /dev/null
+++ b/tests/TraceMemoryDumpTest.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkTraceMemoryDump.h"
+
+#include "SkString.h"
+#include "Test.h"
+
+/*
+ * Build test for SkTraceMemoryDump.
+ */
+SkTraceMemoryDump::~SkTraceMemoryDump() {}
ericrk 2015/08/19 12:45:28 This is a bit odd? shouldn't be needed if you inli
Primiano Tucci (use gerrit) 2015/08/20 08:48:01 Done.
+
+class TestSkTraceMemoryDump : public SkTraceMemoryDump {
+public:
+ TestSkTraceMemoryDump() {}
+ virtual ~TestSkTraceMemoryDump() {}
ericrk 2015/08/19 12:45:28 override not virtual?
Primiano Tucci (use gerrit) 2015/08/20 08:48:01 Done.
+
+ void DumpScalarValue(const SkString &dumpName, const char *name,
+ const char *units, uint64_t value) override {}
+
+ void SetMemoryBacking(const SkString &dumpName, const SkString &backingType,
+ const SkString &backingObjectId) override{};
+ void SetDiscardableMemoryBacking(
+ const SkString &dumpName,
+ const SkDiscardableMemory &discardableMemoryObject) override {}
+};
+
+DEF_TEST(SkTraceMemoryDump, reporter) {
+ TestSkTraceMemoryDump x;
+ x.DumpScalarValue(SkString("foo"), "size", "bytes", 42);
+}
« src/core/SkTraceMemoryDump.h ('K') | « src/core/SkTraceMemoryDump.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698