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

Unified Diff: tests/TestTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 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 | « tests/Test.h ('k') | tests/TextBlobCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TestTest.cpp
diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp
index 66c9b2df5c53cc9b0312267ebc15da48d95746e7..7443ffe325cc5991004f6bd3c96474e233f09b8e 100644
--- a/tests/TestTest.cpp
+++ b/tests/TestTest.cpp
@@ -29,36 +29,26 @@ DEF_GPUTEST(TestGpuFactory, reporter, factory) {
// This is an example of a GPU test that tests a property that should work for all GPU contexts.
// Note: Some of the contexts might not produce a rendering output.
#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_ALL_CONTEXTS(TestGpuAllContexts, reporter, context) {
+DEF_GPUTEST_FOR_ALL_CONTEXTS(TestGpuAllContexts, reporter, ctxInfo) {
REPORTER_ASSERT(reporter, reporter);
- REPORTER_ASSERT(reporter, context);
+ REPORTER_ASSERT(reporter, ctxInfo.fGrContext);
}
#endif
// This is an example of a GPU test that tests a property that should work for all GPU contexts that
// produce a rendering output.
#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TestGpuRenderingContexts, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(TestGpuRenderingContexts, reporter, ctxInfo) {
REPORTER_ASSERT(reporter, reporter);
- REPORTER_ASSERT(reporter, context);
+ REPORTER_ASSERT(reporter, ctxInfo.fGrContext);
}
#endif
// This is an example of a GPU test that tests a property that uses the null GPU context. It should
// be used if the test tests some behavior that is mocked with the null context.
#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_NULL_CONTEXT(TestGpuNullContext, reporter, context) {
+DEF_GPUTEST_FOR_NULL_CONTEXT(TestGpuNullContext, reporter, ctxInfo) {
REPORTER_ASSERT(reporter, reporter);
- REPORTER_ASSERT(reporter, context);
-}
-#endif
-
-// This is an example of a GPU test that tests a property that should work for all GPU contexts.
-// It uses the additional GLTestContext* glContext to implement the test.
-#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_ALL_CONTEXTS(TestGpuGrContextAndGLContext, reporter, context, glContext) {
- REPORTER_ASSERT(reporter, reporter);
- REPORTER_ASSERT(reporter, context);
- REPORTER_ASSERT(reporter, glContext);
+ REPORTER_ASSERT(reporter, ctxInfo.fGrContext);
}
#endif
« no previous file with comments | « tests/Test.h ('k') | tests/TextBlobCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698