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

Unified Diff: site/dev/contrib/tests.md

Issue 954523004: Add testing section of docs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove content, update build description Created 5 years, 10 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
« no previous file with comments | « site/dev/contrib/testing.md ('k') | site/dev/testing/buildbot.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/dev/contrib/tests.md
diff --git a/site/dev/contrib/tests.md b/site/dev/contrib/tests.md
deleted file mode 100644
index fbe84dfeff2eb565076364bbef1d34d2932d1db2..0000000000000000000000000000000000000000
--- a/site/dev/contrib/tests.md
+++ /dev/null
@@ -1,65 +0,0 @@
-Writing Unit and Rendering Tests
-================================
-
-Writing a Unit Test
--------------------
-
-1. Add a file `tests/NewUnitTest.cpp`:
-
- <!--?prettify lang=cc?-->
-
- /*
- * Copyright ........
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file.
- */
- #include "Test.h"
- DEF_TEST(NewUnitTest, reporter) {
- if (1 + 1 != 2) {
- ERRORF(reporter, "%d + %d != %d", 1, 1, 2);
- }
- bool lifeIsGood = true;
- REPORTER_ASSERT(reporter, lifeIsGood);
- }
-
-2. Add a line to `gyp/tests.gypi`:
-
- '../tests/NewUnitTest.cpp',
-
-3. Recompile and run test:
-
- ./gyp_skia
- ninja -C out/Debug dm
- out/Debug/dm --match NewUnitTest
-
-Writing a Rendering Test
-------------------------
-
-1. Add a file `gm/newgmtest.cpp`:
-
- <!--?prettify lang=cc?-->
-
- /*
- * Copyright ........
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file.
- */
- #include "gm.h"
- DEF_SIMPLE_GM(newgmtest, canvas, 128, 128) {
- canvas->clear(SK_ColorWHITE);
- SkPaint p;
- p.setStrokeWidth(2);
- canvas->drawLine(16, 16, 112, 112, p);
- }
-
-2. Add a line to `gyp/gmslides.gypi`:
-
- '../gm/newgmtest.cpp',
-
-3. Recompile and run test:
-
- ./gyp_skia
- ninja -C out/Debug dm
- out/Debug/dm --match newgmtest
« no previous file with comments | « site/dev/contrib/testing.md ('k') | site/dev/testing/buildbot.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698