diff options
author | Damiano Galassi <[email protected]> | 2015-10-15 18:08:15 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-16 11:23:56 +0200 |
commit | a49b38bcc8e6fb4678915e759f85bb94f374af47 (patch) | |
tree | 29de0d179103c731e3a89ede1e21576ce56ee773 /macosx | |
parent | d0121047eb1ae2e0167ffc0bda347f65c344fbd9 (diff) |
MacGui: add a test for custom anamorphic
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBTitle.m | 6 | ||||
-rw-r--r-- | macosx/HandBrake Tests/HBJobTests.m | 22 |
2 files changed, 22 insertions, 6 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index 4fca7c072..59855ca15 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -46,12 +46,6 @@ extern NSString *keySubTrackSrtCharCode; @implementation HBTitle -- (instancetype)init -{ - NSAssert(false, @"[HBTitle init] should not be called"); - return nil; -} - - (instancetype)initWithTitle:(hb_title_t *)title featured:(BOOL)featured { self = [super init]; 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 |