ok: add basic unit test support

Plenty TODO remaining.

This can actually kind of run without a test reporter or GrContext:
    $ out/ok test
    784 ok, 56 crashed
    ... lots of stack traces ...
Most tests don't use the reporter unless they're going to fail.

Change-Id: I7333e2c63ade5e671ebf60022d19390f1fc1c93a
Reviewed-on: https://skia-review.googlesource.com/10201
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 41694d3..4999d74 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -969,12 +969,14 @@
     deps = [
       ":experimental_svg_model",
       ":flags",
-      ":gpu_tool_utils",
       ":skia",
       ":tool_utils",
       "//third_party/libpng",
       "//third_party/zlib",
     ]
+    public_deps = [
+      ":gpu_tool_utils",  # Test.h #includes headers from this target.
+    ]
   }
 
   import("gn/bench.gni")
@@ -1155,11 +1157,13 @@
       "tools/ok.cpp",
       "tools/ok_dsts.cpp",
       "tools/ok_srcs.cpp",
+      "tools/ok_test.cpp",
       "tools/ok_vias.cpp",
     ]
     deps = [
       ":gm",
       ":skia",
+      ":tests",
     ]
   }