diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-02-27 22:06:06 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-02-27 22:06:06 +0000 |
commit | d8730ea8b25d692c0656f8cf03f02aecfab2a17c (patch) | |
tree | 7a1c8cac5a1433a8ced46bf6dc0f71675e168d76 /tests/GeometryTest.cpp | |
parent | ed673310e2551e64d8196f7776d7d4c92085f8c2 (diff) |
more tests (need more meat in there)
git-svn-id: http://skia.googlecode.com/svn/trunk@97 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/GeometryTest.cpp')
-rw-r--r-- | tests/GeometryTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/GeometryTest.cpp b/tests/GeometryTest.cpp new file mode 100644 index 0000000000..5b05952c84 --- /dev/null +++ b/tests/GeometryTest.cpp @@ -0,0 +1,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) |