public void TestBuildGenericWithThreeArguments() { var types = GenericBenchmarksBuilder.GetRunnableBenchmarks(new [] {typeof(ThreeArgGenericBenchmark<,,>)}); Assert.Equal(2, types.Length); Assert.Single(types, typeof(ThreeArgGenericBenchmark<int, char, string>)); Assert.Single(types, typeof(ThreeArgGenericBenchmark<char, string, byte>)); }
public void TestBuildGenericWithConstraints() { var types = GenericBenchmarksBuilder.GetRunnableBenchmarks(new[] { typeof(GenericBenchmarkWithConstraints <,>) }); Assert.Equal(2, types.Length); Assert.Single(types, typeof(GenericBenchmarkWithConstraints <int, char>)); Assert.Single(types, typeof(GenericBenchmarkWithConstraints <char, byte>)); }
public void TestBuildGenericWithOneArgument() { var types = GenericBenchmarksBuilder.GetRunnableBenchmarks(new [] {typeof(OneArgGenericBenchmark<>)}); Assert.Equal(2, types.Length); Assert.Single(types, typeof(OneArgGenericBenchmark<int>)); Assert.Single(types, typeof(OneArgGenericBenchmark<char>)); }
public void TestBuildGenericWithWrongAttributes() { var types = GenericBenchmarksBuilder.GetRunnableBenchmarks(new[] { typeof(GenericBenchmarkWithWrongAttribute <,>) }); Assert.Equal(2, types.Length); Assert.Single(types, typeof(GenericBenchmarkWithWrongAttribute <int, char>)); Assert.Single(types, typeof(GenericBenchmarkWithWrongAttribute <char, string>)); }