Index: dm/DMUtil.cpp |
diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d41daa7bd32b9a4c50306e4e37ae71fd6b4ed643 |
--- /dev/null |
+++ b/dm/DMUtil.cpp |
@@ -0,0 +1,21 @@ |
+#include "DMUtil.h" |
+ |
+namespace DM { |
+ |
+SkString underJoin(const char* a, const char* b) { |
+ SkString s; |
+ s.appendf("%s_%s", a, b); |
+ return s; |
+} |
+ |
+SkString png(SkString s) { |
+ s.appendf(".png"); |
+ return s; |
+} |
+ |
+bool meetsExpectations(const skiagm::Expectations& expectations, |
+ const skiagm::GmResultDigest& digest) { |
+ return expectations.ignoreFailure() || expectations.match(digest); |
+} |
+ |
+} // namespace DM |