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

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

Issue 885133002: documentation: Writing Unit and Rendering Tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Another Patch Set Created 5 years, 11 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 | « no previous file | site/dev/contrib/tests.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/dev/contrib/submit.md
diff --git a/site/dev/contrib/submit.md b/site/dev/contrib/submit.md
index fcbcf2077d48db5711ff3cd1d704ca07d311e072..a66e7271ac1058ec243a93465f314ed2f97a4f87 100644
--- a/site/dev/contrib/submit.md
+++ b/site/dev/contrib/submit.md
@@ -32,41 +32,9 @@ Adding a unit test
If you are willing to change Skia codebase, it's nice to add a test at the same
time. Skia has a simple unittest framework so you can add a case to it.
-Test code is located under the 'tests' directory. Assuming we are adding
-tests/FooTest.cpp, The test code will look like:
+Test code is located under the 'tests' directory.
-<!--?prettify?-->
-~~~~
-/*
- * 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(TestFoo, reporter) {
- int x = 2 * 3;
- if (x != 6) {
- ERRORF(reporter, "x should be 6, but is %d", x);
- return;
- }
- REPORTER_ASSERT(reporter, 1 + 1 == 2);
-}
-~~~~
-
-And we need to add this new file to gyp/tests.gyp. Note that file names are
-sorted alphabetically.
-
-<!--?prettify?-->
-~~~~
-'sources': [
- '../tests/AAClipTest.cpp'
- '../tests/FooTest.cpp',
- '../tests/XfermodeTest.cpp',
-],
-~~~~
+See [Writing Unit and Rendering Tests](tests) for details.
Unit tests are best, but if your change touches rendering and you can't think of
an automated way to verify the results, consider writing a GM test or a new page
@@ -74,7 +42,6 @@ of SampleApp. Also, if your change is the GPU code, you may not be able to write
it as part of the standard unit test suite, but there are GPU-specific testing
paths you can extend.
-
Submitting a patch
------------------
« no previous file with comments | « no previous file | site/dev/contrib/tests.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698