From 16fa166716bb45b1ae93a304ff86221447bb470e Mon Sep 17 00:00:00 2001
From: duckdoom5 <duckdoom5@users.noreply.github.com>
Date: Mon, 3 Mar 2025 18:32:56 +0100
Subject: [PATCH] Fix test compiler error

Don't skip function bodies to force template instantiations
---
 tests/dotnet/CSharp/CSharp.Gen.cs | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/tests/dotnet/CSharp/CSharp.Gen.cs b/tests/dotnet/CSharp/CSharp.Gen.cs
index 5c9f45ce..58f00fa0 100644
--- a/tests/dotnet/CSharp/CSharp.Gen.cs
+++ b/tests/dotnet/CSharp/CSharp.Gen.cs
@@ -25,6 +25,7 @@ namespace CppSharp.Tests
             base.Setup(driver);
 
             driver.ParserOptions.UnityBuild = true;
+            driver.ParserOptions.SkipFunctionBodies = false;
             driver.ParserOptions.AddSupportedFunctionTemplates("FunctionTemplate");
 
             driver.Options.GenerateFreeStandingFunctionsClassName = t => t.FileNameWithoutExtension + "Cool";
@@ -42,7 +43,7 @@ namespace CppSharp.Tests
             driver.Options.GenerateClassTemplates = true;
 
             var disableNativeToManaged = new ClassGenerationOptions { GenerateNativeToManaged = false };
-            driver.Options.GetClassGenerationOptions = e => 
+            driver.Options.GetClassGenerationOptions = e =>
             {
                 return e.Name == "ClassWithoutNativeToManaged" ? disableNativeToManaged : null;
             };
@@ -237,16 +238,12 @@ namespace CppSharp.Tests
                 var specialization = type.GetClassTemplateSpecialization();
                 var typePrinter = new CSharpTypePrinter(null);
                 typePrinter.PushContext(TypePrinterContextKind.Native);
-                return new CustomType(string.Format($@"{
-                    specialization.Visit(typePrinter)}{
-                    (Type.IsAddress() ? "*" : string.Empty)}", specialization.Visit(typePrinter),
+                return new CustomType(string.Format($@"{specialization.Visit(typePrinter)}{(Type.IsAddress() ? "*" : string.Empty)}", specialization.Visit(typePrinter),
                     Type.IsAddress() ? "*" : string.Empty));
             }
 
             return new CustomType(
-                $@"global::System.Collections.Generic.{
-                    (ctx.MarshalKind == MarshalKind.DefaultExpression ? "List" : "IList")}<{
-                    ctx.GetTemplateParameterList()}>");
+                $@"global::System.Collections.Generic.{(ctx.MarshalKind == MarshalKind.DefaultExpression ? "List" : "IList")}<{ctx.GetTemplateParameterList()}>");
         }
 
         public override void MarshalToNative(MarshalContext ctx)
@@ -292,9 +289,7 @@ namespace CppSharp.Tests
         {
             if (ctx.Kind == TypePrinterContextKind.Native)
             {
-                return new CustomType($@"global::CSharp.QString.{
-                    Helpers.InternalStruct}{
-                    (ctx.Type.IsAddress() ? "*" : string.Empty)}");
+                return new CustomType($@"global::CSharp.QString.{Helpers.InternalStruct}{(ctx.Type.IsAddress() ? "*" : string.Empty)}");
             }
             return new CILType(typeof(string));
         }