@@ -463,62 +463,38 @@ for N in @tN([Float64, Float32])
463463 @test_throws MethodError rationalize (U2)
464464
465465 # affine_map (part 2)
466- @static if VERSION < v " 1.12"
467- # TODO this should work with older versions, see below
468- @test_broken affine_map (N[1 0 ; 0 1 ; 0 0 ], U, N[1 , 1 , 3 ])
469- else
470- X = affine_map (N[1 0 ; 0 1 ; 0 0 ], U, N[1 , 1 , 3 ])
471- @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 0 , 1 ], N (3 )))
472- end
466+ X = affine_map (N[1 0 ; 0 1 ; 0 0 ], U, N[1 , 1 , 3 ])
467+ @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 0 , 1 ], N (3 )))
473468
474469 # exponential_map
475470 U2 = exponential_map (ones (N, 2 , 2 ), U)
476471 @test isidentical (U2, U)
477472
478473 # linear_map (part 2)
479- @static if VERSION < v " 1.12"
480- # TODO this should work with older versions, see below
481- @test_broken linear_map (N[1 0 ; 0 1 ; 0 0 ], U)
482- else
483- X = linear_map (N[1 0 ; 0 1 ; 0 0 ], U)
484- @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 0 , 1 ], N (0 )))
485- end
474+ X = linear_map (N[1 0 ; 0 1 ; 0 0 ], U)
475+ @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 0 , 1 ], N (0 )))
486476end
487477
488478for N in [Float64]
489479 U = Universe {N} (2 )
490480
491481 # affine_map (part 3)
492482 @static if isdefined (@__MODULE__ , :Polyhedra ) && isdefined (@__MODULE__ , :CDDLib )
493- @static if VERSION < v " 1.12"
494- # TODO these should work with older versions, see below
495- @test_broken affine_map (N[1 2 ; 0 0 ], U, N[1 , 1 ])
496- @test_broken affine_map (ones (N, 2 , 2 ), U, N[2 , 0 ])
497- @test_broken affine_map (zeros (N, 2 , 2 ), U, N[2 , 0 ])
498- else
499- X = affine_map (N[1 2 ; 0 0 ], U, N[1 , 1 ]) # projection to axis
500- @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 1 ], N (1 )))
501- X = affine_map (ones (N, 2 , 2 ), U, N[2 , 0 ]) # projection to line
502- @test X isa HPolyhedron{N} && isequivalent (X, Line2D (N[1 , - 1 ], N (2 )))
503- X = affine_map (zeros (N, 2 , 2 ), U, N[2 , 0 ]) # zero map
504- @test X isa HPolyhedron{N} && isequivalent (X, Singleton (N[2 , 0 ]))
505- end
483+ X = affine_map (N[1 2 ; 0 0 ], U, N[1 , 1 ]) # projection to axis
484+ @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 1 ], N (1 )))
485+ X = affine_map (ones (N, 2 , 2 ), U, N[2 , 0 ]) # projection to line
486+ @test X isa HPolyhedron{N} && isequivalent (X, Line2D (N[1 , - 1 ], N (2 )))
487+ X = affine_map (zeros (N, 2 , 2 ), U, N[2 , 0 ]) # zero map
488+ @test X isa HPolyhedron{N} && isequivalent (X, Singleton (N[2 , 0 ]))
506489 end
507490
508491 # linear_map (part 3)
509492 @static if isdefined (@__MODULE__ , :Polyhedra ) && isdefined (@__MODULE__ , :CDDLib )
510- @static if VERSION < v " 1.12"
511- # TODO these should work with older versions, see below
512- @test_broken linear_map (N[1 2 ; 0 0 ], U)
513- @test_broken linear_map (ones (N, 2 , 2 ), U)
514- @test_broken linear_map (zeros (N, 2 , 2 ), U)
515- else
516- X = linear_map (N[1 2 ; 0 0 ], U) # projection to axis
517- @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 1 ], N (0 )))
518- X = linear_map (ones (N, 2 , 2 ), U) # projection to line
519- @test X isa HPolyhedron{N} && isequivalent (X, Line2D (N[1 , - 1 ], N (0 )))
520- X = linear_map (zeros (N, 2 , 2 ), U) # zero map
521- @test X isa HPolyhedron{N} && isequivalent (X, ZeroSet {N} (2 ))
522- end
493+ X = linear_map (N[1 2 ; 0 0 ], U) # projection to axis
494+ @test X isa HPolyhedron{N} && isequivalent (X, Hyperplane (N[0 , 1 ], N (0 )))
495+ X = linear_map (ones (N, 2 , 2 ), U) # projection to line
496+ @test X isa HPolyhedron{N} && isequivalent (X, Line2D (N[1 , - 1 ], N (0 )))
497+ X = linear_map (zeros (N, 2 , 2 ), U) # zero map
498+ @test X isa HPolyhedron{N} && isequivalent (X, ZeroSet {N} (2 ))
523499 end
524500end
0 commit comments