From a49b38bcc8e6fb4678915e759f85bb94f374af47 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 15 Oct 2015 18:08:15 +0200 Subject: MacGui: add a test for custom anamorphic --- macosx/HandBrake Tests/HBJobTests.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'macosx/HandBrake Tests') diff --git a/macosx/HandBrake Tests/HBJobTests.m b/macosx/HandBrake Tests/HBJobTests.m index 19351bbfb..c5044b7a6 100644 --- a/macosx/HandBrake Tests/HBJobTests.m +++ b/macosx/HandBrake Tests/HBJobTests.m @@ -88,4 +88,26 @@ XCTAssertEqual(self.title.autoCropRight, self.job.picture.cropRight); } +- (void)testCustomAnamorphic +{ + HBMutablePreset *preset = [self.preset mutableCopy]; + + preset[@"UsesPictureSettings"] = @1; + + preset[@"PictureWidth"] = @720; + preset[@"PictureHeight"] = @576; + + preset[@"PicturePAR"] = @"custom"; + preset[@"PicturePARWidth"] = @64; + preset[@"PicturePARHeight"] = @45; + + HBJob *job = [self.job copy]; + [job applyPreset:preset]; + + XCTAssertEqual(job.picture.width, 720); + XCTAssertEqual(job.picture.height, 576); + + XCTAssertEqual(job.picture.displayWidth, 1064); +} + @end -- cgit v1.2.3