From a5ae4e6391e02c59c017f06bb265174841ef6750 Mon Sep 17 00:00:00 2001 From: Kirill Osenkov Date: Mon, 7 Dec 2020 14:47:38 -0800 Subject: [PATCH] Add a unit-test for https://github.com/benaadams/Ben.Demystifier/issues/109 --- test/Ben.Demystifier.Test/TypeNameTests.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/Ben.Demystifier.Test/TypeNameTests.cs diff --git a/test/Ben.Demystifier.Test/TypeNameTests.cs b/test/Ben.Demystifier.Test/TypeNameTests.cs new file mode 100644 index 0000000..837e8a1 --- /dev/null +++ b/test/Ben.Demystifier.Test/TypeNameTests.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics; +using Xunit; + +namespace Ben.Demystifier.Test +{ + public class TypeNameTests + { + [Fact] + public void NestedGenericTypes() + { + try + { + Throw(new Generic<(int, string)>.Nested()); + } + catch (Exception ex) + { + var text = ex.ToStringDemystified(); + } + } + + public void Throw(Generic<(int a, string b)>.Nested nested) + { + throw null; + } + } + + public class Generic { public struct Nested { } } +} \ No newline at end of file