@@ -305,6 +305,28 @@ void main() {
305305 expect (() {
306306 CatmullRomSpline (const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero], tension: 2.0 );
307307 }, throwsAssertionError);
308+ expect (() {
309+ CatmullRomSpline (
310+ const < Offset > [Offset (double .infinity, 0.0 ), Offset .zero, Offset .zero, Offset .zero],
311+ ).generateSamples ();
312+ }, throwsAssertionError);
313+ expect (() {
314+ CatmullRomSpline (
315+ const < Offset > [Offset (0.0 , double .infinity), Offset .zero, Offset .zero, Offset .zero],
316+ ).generateSamples ();
317+ }, throwsAssertionError);
318+ expect (() {
319+ CatmullRomSpline (
320+ startHandle: const Offset (0.0 , double .infinity),
321+ const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero],
322+ ).generateSamples ();
323+ }, throwsAssertionError);
324+ expect (() {
325+ CatmullRomSpline (
326+ endHandle: const Offset (0.0 , double .infinity),
327+ const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero],
328+ ).generateSamples ();
329+ }, throwsAssertionError);
308330 });
309331
310332 test ('CatmullRomSpline interpolates values properly when precomputed' , () {
@@ -353,6 +375,24 @@ void main() {
353375 expect (() {
354376 CatmullRomSpline .precompute (const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero], tension: 2.0 );
355377 }, throwsAssertionError);
378+ expect (() {
379+ CatmullRomSpline .precompute (const < Offset > [Offset (double .infinity, 0.0 ), Offset .zero, Offset .zero, Offset .zero]);
380+ }, throwsAssertionError);
381+ expect (() {
382+ CatmullRomSpline .precompute (const < Offset > [Offset (0.0 , double .infinity), Offset .zero, Offset .zero, Offset .zero]);
383+ }, throwsAssertionError);
384+ expect (() {
385+ CatmullRomSpline .precompute (
386+ startHandle: const Offset (0.0 , double .infinity),
387+ const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero],
388+ );
389+ }, throwsAssertionError);
390+ expect (() {
391+ CatmullRomSpline .precompute (
392+ endHandle: const Offset (0.0 , double .infinity),
393+ const < Offset > [Offset .zero, Offset .zero, Offset .zero, Offset .zero],
394+ );
395+ }, throwsAssertionError);
356396 });
357397
358398 test ('CatmullRomCurve interpolates given points correctly' , () {
0 commit comments