public void DecomposeUnsafeMutableAddressor()
        {
            var func = "_$s17unitHelpFrawework10AKBalancerC20ComponentDescriptionSSvau";
            var tlf  = Decomposer.Decompose(func, false) as TLUnsafeMutableAddressor;

            Assert.IsNotNull(tlf, "tlf");
        }
        public void DecomposeUnsafeRawPointer()
        {
            var func = "_$s17unitHelpFrawework3FooSVyF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
        }
        public void DecomposeGlobalVariable()
        {
            var func = "_$s17unitHelpFrawework7aGlobalSbvp";
            var vari = Decomposer.Decompose(func, false) as TLVariable;

            Assert.IsNotNull(vari, "vari");
        }
        public void DecomposeUnsafeMutableAddressor1()
        {
            var func = "_$s17unitHelpFrawework10AKDurationV16secondsPerMinuteSivau";
            var tlf  = Decomposer.Decompose(func, false) as TLUnsafeMutableAddressor;

            Assert.IsNotNull(tlf, "tlf");
        }
        public void DecomposeUnsafeMutableAddressor3()
        {
            var func = "_$s17unitHelpFrawework10AKMetalBarV12pregainRangeSNySdGvau";
            var tlf  = Decomposer.Decompose(func, false) as TLUnsafeMutableAddressor;

            Assert.IsNotNull(tlf, "tlf");
        }
        public void TestStructMeta()
        {
            var func = "_$s17unitHelpFrawework7AStructVN";
            var def  = Decomposer.Decompose(func, true) as TLDefinition;

            Assert.IsNotNull(def, "def");
        }
        public void TestTLFunctionPublicMaterializer1()
        {
            var funcName = "";
            var func     = Decomposer.Decompose(funcName, true) as TLFunction;

            Assert.IsNotNull(func, "func");
        }
        public void TestTLFunctionUsingClass()
        {
            var funcName = "_$s17unitHelpFrawework13xamarin_MontyC3valyyAA0E0CF";
            var func     = Decomposer.Decompose(funcName, true) as TLFunction;

            Assert.IsNotNull(func, "func");
        }
        public void DecomposeProtocolConformanceDescriptor()
        {
            var func = "_$sSayxG5Macaw12InterpolableABMc";
            var tlf  = Decomposer.Decompose(func, false) as TLProtocolConformanceDescriptor;

            Assert.IsNotNull(tlf);
        }
        public void DecomposeMetadataPattern()
        {
            var func = "_$s17unitHelpFrawework3FooCMP";
            var gmp  = Decomposer.Decompose(func, false) as TLGenericMetadataPattern;

            Assert.IsNotNull(gmp, "gmp");
            Assert.AreEqual("unitHelpFrawework.Foo", gmp.Class.ClassName.ToFullyQualifiedName(true), "classname");
        }
        public void DemcomposeReturnsInt64()
        {
            var func = "_$s17unitHelpFrawework5MontyC3vals5Int64VyF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.IsTrue(tlf.Signature.ReturnType is SwiftClassType, "is swift class type");
        }
        public void DemcomposeCConventionCall()
        {
            var func = "_$s17unitHelpFrawework12callSomeFuncyyyyXCF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.IsTrue(tlf.Signature.Parameters is SwiftCFunctionPointerType, "not a c function pointer type");
        }
        public void DecomposeGlobalAddressor()
        {
            var func = "_$s17unitHelpFrawework7aGlobalSbvau";
            var tlf  = Decomposer.Decompose(func, false) as TLUnsafeMutableAddressor;

            Assert.IsNotNull(tlf, "tlf");
            Assert.IsNotNull(tlf.OfType, "OfType");
        }
        public void DecomposeStructConstructor()
        {
            var func = "_$s17unitHelpFrawework7AStructVACycfC";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.IsTrue(tlf.Signature is SwiftConstructorType, "is constructor");
        }
        public void DecomposeThrowingFunction()
        {
            var func = "_$s17unitHelpFrawework7throwIt7doThrowSiSb_tKF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.IsTrue(tlf.Signature.CanThrow, "CanThrow");
        }
        public void DecomposeModuleDescriptor()
        {
            var func = "_$s8itsAFiveMXM";
            var tlf  = Decomposer.Decompose(func, false) as TLModuleDescriptor;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual("itsAFive", tlf.Module.Name);
        }
        public void DecomposeVariable1()
        {
            var func = "_$s17unitHelpFrawework12callbackUgenSo8NSObjectCvp";
            var tlf  = Decomposer.Decompose(func, false) as TLVariable;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual("callbackUgen", tlf.Name.Name, "name match");
        }
        public void DecomposeCurryThunk()
        {
            var func = "_$s17unitHelpFrawework13AKAudioPlayerV25internalCompletionHandler33_3D85A716E8AC30D62D97E78DB643A23DLLyyFTc";
            var tlf  = Decomposer.Decompose(func, false) as TLThunk;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual(ThunkType.Curry, tlf.Thunk, "curry thunk");
        }
        public void DecomposeMetaclass()
        {
            var func = "_$s8AudioKit11AKOperationCMm";
            var mc   = Decomposer.Decompose(func, false) as TLMetaclass;

            Assert.IsNotNull(mc, "mc");
            Assert.AreEqual("AudioKit.AKOperation", mc.Class.ClassName.ToFullyQualifiedName(true));
        }
        public void DecomposeFieldOffset()
        {
            var func = "_$s17unitHelpFrawework24AKVariableDelayAudioUnitC12rampDurationSdvpWvd";
            var tlf  = Decomposer.Decompose(func, false) as TLFieldOffset;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual("rampDuration", tlf.Identifier.Name, "name");
        }
        public void DecomposeGenericWithConstraints()
        {
            var func = "_$s17unitHelpFrawework03ChaD0V6reseed4withyx_tSTRzs6UInt32V7ElementRtzlF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "Failed to decompose function");
            Assert.AreEqual(1, tlf.Signature.GenericArguments.Count, "Expected 1 generic argument");
            Assert.AreEqual(2, tlf.Signature.GenericArguments [0].Constraints.Count, "Expected 2 generic constraints");
        }
        public void DecomposeMultiProtoConstraints()
        {
            var func = "_$s17unitHelpFrawework16xamarin_FooDuppy3foo1ayAA0E0CyxG_xtAA6DownerRzAA5UpperRzlF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual(1, tlf.Signature.GenericArguments.Count, "genric argument count");
            Assert.AreEqual(2, tlf.Signature.GenericArguments [0].Constraints.Count, "constraints count");
        }
        public void DecomposeFuncArgInitializer1()
        {
            var func = "_$s17unitHelpFrawework10AKMIDINodeC11createError33_3D85A716E8AC30D62D97E78DB643A23DLL7message4codeSo7NSErrorCSS_SitFfA0_";
            var init = Decomposer.Decompose(func, false) as TLDefaultArgumentInitializer;

            Assert.IsNotNull(init, "init");
            Assert.AreEqual(1, init.ArgumentIndex, "argument index");
            Assert.IsTrue(init.Signature is SwiftUncurriedFunctionType, "uncurried function");
        }
        public void DecomposeFuncArgInitializer()
        {
            var func = "_$s17unitHelpFrawework10AKMIDINodeC10enableMIDI4port4nameys6UInt32V_SStFfA_";
            var init = Decomposer.Decompose(func, false) as TLDefaultArgumentInitializer;

            Assert.IsNotNull(init, "init");
            Assert.AreEqual(0, init.ArgumentIndex, "argument index");
            Assert.IsTrue(init.Signature is SwiftUncurriedFunctionType, "uncurried function");
        }
        public void DecomposeMultiGeneric()
        {
            var func = "_$s17unitHelpFrawework3foo1a1b1c1dyx_q_q0_q1_tr2_lF";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual(4, tlf.Signature.ParameterCount, "parameter count");
            Assert.IsTrue(tlf.Signature.ContainsGenericParameters, "contains generic parameters");
            Assert.AreEqual(4, tlf.Signature.GenericArguments.Count(), "generic argument count");
        }
        public void DecomposeStaticProp()
        {
            var func = "_$s17unitHelpFrawework11aFinalClassC11aStaticPropSbvpZ";

            var tlv = Decomposer.Decompose(func, false) as TLVariable;

            Assert.IsNotNull(tlv, "tlv");
            Assert.IsTrue(tlv.IsStatic, "IsStatic");
            Assert.IsNotNull(tlv.Class, "Class");
        }
        public void DecomposeStaticVariable()
        {
            var func = "_$s8AudioKit10AKBalancerC20ComponentDescriptionSSvpZ";
            var tlf  = Decomposer.Decompose(func, false) as TLVariable;

            Assert.IsNotNull(tlf, "tlf");
            Assert.AreEqual("AudioKit.AKBalancer", tlf.Class.ClassName.ToFullyQualifiedName(true));
            Assert.AreEqual("ComponentDescription", tlf.Name.Name);
            Assert.IsTrue(tlf.IsStatic);
        }
        public void DecomposePrivateNameProp()
        {
            var func = "_$s17unitHelpFrawework11AKPinkNoiseC10internalAU33_3D85A716E8AC30D62D97E78DB643A23DLLSivg";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            var prop = tlf.Signature as SwiftPropertyType;

            Assert.IsNotNull(prop.PrivateName, "PrivateName");
        }
        public void DecomposeWillSet()
        {
            var func = "_$s17unitHelpFrawework20AKPinkNoiseAudioUnitC9amplitudeSivw";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            var prop = tlf.Signature as SwiftPropertyType;

            Assert.IsNotNull(prop, "prop");
            Assert.AreEqual(PropertyType.WillSet, prop.PropertyType, "PropertyType");
        }
        public void DecomposerMaterializerWithPrivateName()
        {
            var func = "";
            var tlf  = Decomposer.Decompose(func, false) as TLFunction;

            Assert.IsNotNull(tlf, "tlf");
            var prop = tlf.Signature as SwiftPropertyType;

            Assert.IsNotNull(prop, "prop");
            Assert.AreEqual(PropertyType.Materializer, prop.PropertyType, "PropertyType");
        }