PathOpsDCubicTest.cpp 793 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright 2012 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include "src/pathops/SkPathOpsCubic.h"
  8. #include "tests/PathOpsTestCommon.h"
  9. #include "tests/Test.h"
  10. static const CubicPts hullTests[] = {
  11. {{{2.6250000819563866, 2.3750000223517418}, {2.833333432674408, 2.3333333432674408}, {3.1111112236976624, 2.3333333134651184}, {3.4074075222015381, 2.3333332538604736}}},
  12. };
  13. static const size_t hullTests_count = SK_ARRAY_COUNT(hullTests);
  14. DEF_TEST(PathOpsCubicHull, reporter) {
  15. for (size_t index = 0; index < hullTests_count; ++index) {
  16. const CubicPts& c = hullTests[index];
  17. SkDCubic cubic;
  18. cubic.debugSet(c.fPts);
  19. char order[4];
  20. cubic.convexHull(order);
  21. }
  22. }