Make tests faster

This commit is contained in:
Malte Rosenbjerg 2020-05-06 23:39:45 +02:00
parent 4abd656b74
commit 560c9c8d98

View file

@ -219,13 +219,6 @@ public void Convert(VideoType type, ArgumentContainer container)
} }
} }
public void ConvertFromPipe(VideoType type, ArgumentContainer container)
{
ConvertFromPipe(type, container, PixelFormat.Format24bppRgb);
ConvertFromPipe(type, container, PixelFormat.Format32bppArgb);
ConvertFromPipe(type, container, PixelFormat.Format48bppRgb);
}
public void ConvertFromPipe(VideoType type, ArgumentContainer container, PixelFormat fmt) public void ConvertFromPipe(VideoType type, ArgumentContainer container, PixelFormat fmt)
{ {
var output = Input.OutputLocation(type); var output = Input.OutputLocation(type);
@ -294,7 +287,7 @@ public void Video_ToMP4_Args()
public void Video_ToMP4_Args_Pipe() public void Video_ToMP4_Args_Pipe()
{ {
var container = new ArgumentContainer { new VideoCodecArgument(VideoCodec.LibX264) }; var container = new ArgumentContainer { new VideoCodecArgument(VideoCodec.LibX264) };
ConvertFromPipe(VideoType.Mp4, container); ConvertFromPipe(VideoType.Mp4, container, PixelFormat.Format24bppRgb);
} }
[TestMethod] [TestMethod]
@ -395,7 +388,7 @@ public void Video_ToTS_Args_Pipe()
{ {
new ForceFormatArgument(VideoCodec.MpegTs) new ForceFormatArgument(VideoCodec.MpegTs)
}; };
ConvertFromPipe(VideoType.Ts, container); ConvertFromPipe(VideoType.Ts, container, PixelFormat.Format32bppArgb);
} }
[TestMethod] [TestMethod]
@ -423,7 +416,7 @@ public void Video_ToOGV_Resize_Args_Pipe()
new ScaleArgument(VideoSize.Ed), new ScaleArgument(VideoSize.Ed),
new VideoCodecArgument(VideoCodec.LibTheora) new VideoCodecArgument(VideoCodec.LibTheora)
}; };
ConvertFromPipe(VideoType.Ogv, container); ConvertFromPipe(VideoType.Ogv, container, PixelFormat.Format48bppRgb);
} }
[TestMethod] [TestMethod]
@ -448,10 +441,9 @@ public void Video_ToMP4_Resize_Args_Pipe()
{ {
var container = new ArgumentContainer var container = new ArgumentContainer
{ {
new ScaleArgument(VideoSize.Ld),
new VideoCodecArgument(VideoCodec.LibX264) new VideoCodecArgument(VideoCodec.LibX264)
}; };
ConvertFromPipe(VideoType.Mp4, container); ConvertFromPipe(VideoType.Mp4, container, PixelFormat.Format24bppRgb);
} }
[TestMethod] [TestMethod]