aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GeometryTest.cpp
blob: 5b05952c84cf045d1cba798dc291cd8da9b6b663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "Test.h"
#include "SkGeometry.h"

static void TestGeometry(skiatest::Reporter* reporter) {
    SkPoint pts[3], dst[5];

    pts[0].set(0, 0);
    pts[1].set(100, 50);
    pts[2].set(0, 100);

    int count = SkChopQuadAtMaxCurvature(pts, dst);
    REPORTER_ASSERT(reporter, count == 1 || count == 2);
}

#include "TestClassDef.h"
DEFINE_TESTCLASS("Geometry", GeometryTestClass, TestGeometry)