From 7ae209baead7eb3d6f997b66732807103fc80518 Mon Sep 17 00:00:00 2001 From: Edward Cooke Date: Mon, 26 Feb 2024 09:11:29 -0700 Subject: [PATCH] Quoted test changes to not log to stdout --- YamlDotNet.Benchmark/Program.cs | 13 +++---------- YamlDotNet.Test/Serialization/SerializationTests.cs | 2 -- 2 files changed, 3 insertions(+), 12 deletions(-) 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);