+ok(Imager->check_file_limits(width => 100, height => 30),
+ "check 100 x 30 (def channels, sample_size) ok")
+ or diag(Imager->errstr);
+ok(Imager->check_file_limits(width => 100, height => 100, channels => 1),
+ "check 100 x 100 x 1 (def sample_size) ok")
+ or diag(Imager->errstr);
+ok(Imager->check_file_limits(width => 100, height => 100, channels => 1),
+ "check 100 x 100 x 1 (def sample_size) ok")
+ or diag(Imager->errstr);
+ok(!Imager->check_file_limits(width => 100, height => 100, channels => 1, sample_size => "float"),
+ "check 100 x 100 x 1 x float should fail");
+ok(!Imager->check_file_limits(width => 100, height => 100, channels => 0),
+ "0 channels should fail");
+is(Imager->errstr, "file size limit - channels 0 out of range",
+ "check error message");
+ok(!Imager->check_file_limits(width => 0, height => 100),
+ "0 width should fail");
+is(Imager->errstr, "file size limit - image width of 0 is not positive",
+ "check error message");
+ok(!Imager->check_file_limits(width => 100, height => 0),
+ "0 height should fail");
+is(Imager->errstr, "file size limit - image height of 0 is not positive",
+ "check error message");
+ok(!Imager->check_file_limits(width => 10, height => 10, sample_size => 0),
+ "0 sample_size should fail");
+is(Imager->errstr, "file size limit - sample_size 0 out of range",
+ "check error message");
+ok(!Imager->check_file_limits(width => 10, height => 10, sample_size => 1000),
+ "1000 sample_size should fail");
+is(Imager->errstr, "file size limit - sample_size 1000 out of range",
+ "check error message");