skia2/tests/GrDrawTargetTest.cpp
tfarina@chromium.org 8f6884aab8 Cleanup: Sanitize the order of includes under tests/
Initially this was to make sure Test.h appeared after the Sk*.h includes.

Patch generated by the following command line:

$ ~/chromium/src/tools/sort-headers.py tests/*.cpp

BUG=None
TEST=tests
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/145313004

git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 20:56:26 +00:00

37 lines
884 B
C++

/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrContextFactory.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
#include "Test.h"
static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) {
// This used to assert.
SkString result = caps->dump();
SkASSERT(!result.isEmpty());
}
DEF_GPUTEST(GrDrawTarget, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
GrContext* grContext = factory->get(glType);
if (NULL == grContext) {
continue;
}
test_print(reporter, grContext->getGpu()->caps());
}
}
#endif