summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBTitle.m6
-rw-r--r--macosx/HandBrake Tests/HBJobTests.m22
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