test: geometry test for ellipse

pull/84/head
RuiAlonso 4 years ago
parent 3b79292f8f
commit 45cede6783

@ -33,6 +33,27 @@ void main() {
});
});
group('calculateEllipse', () {
test('returns by default 100 points as indicated by precision', () {
final points = calculateEllipse(
center: Vector2.zero(),
bigRadius: 100,
smallRadius: 50,
);
expect(points.length, 100);
});
test('returns as many points as indicated by precision', () {
final points = calculateEllipse(
center: Vector2.zero(),
bigRadius: 100,
smallRadius: 50,
precision: 50,
);
expect(points.length, 50);
});
});
group('calculateBezierCurve', () {
test('fails if step not in range', () {
expect(

Loading…
Cancel
Save