diff --git a/YamlDotNet.Benchmark/Program.cs b/YamlDotNet.Benchmark/Program.cs index 00802d175..9fc2ebd9a 100644 --- a/YamlDotNet.Benchmark/Program.cs +++ b/YamlDotNet.Benchmark/Program.cs @@ -1,11 +1,4 @@ -using YamlDotNet.Serialization; +using BenchmarkDotNet.Running; +using YamlDotNet.Benchmark; -var serializer = new SerializerBuilder() - .WithQuotingNecessaryStrings() - .Build(); - -var s = "\t, something"; -var yaml = serializer.Serialize(s); -Console.WriteLine(yaml); -var deserializer = new DeserializerBuilder().Build(); -var value = deserializer.Deserialize(yaml); +BenchmarkSwitcher.FromAssembly(typeof(YamlStreamBenchmark).Assembly).Run(args); diff --git a/YamlDotNet.Test/Serialization/SerializationTests.cs b/YamlDotNet.Test/Serialization/SerializationTests.cs index a67c9ae5b..f89f8c05c 100644 --- a/YamlDotNet.Test/Serialization/SerializationTests.cs +++ b/YamlDotNet.Test/Serialization/SerializationTests.cs @@ -2438,7 +2438,6 @@ public void TabsGetQuotedWhenQuoteNecessaryStringsIsOn() var s = "\t, something"; var yaml = serializer.Serialize(s); - Console.WriteLine(yaml); var deserializer = new DeserializerBuilder().Build(); var value = deserializer.Deserialize(yaml); Assert.Equal(s, value); @@ -2453,7 +2452,6 @@ public void SpacesGetQuotedWhenQuoteNecessaryStringsIsOn() var s = " , something"; var yaml = serializer.Serialize(s); - Console.WriteLine(yaml); var deserializer = new DeserializerBuilder().Build(); var value = deserializer.Deserialize(yaml); Assert.Equal(s, value);