Beispiel #1
0
        public void Resolved()
        {
            NativeParameter param = new NativeParameter();

            Assert.False(param.IsImmediateResolved);
            param.NativeType = new NativeBuiltinType(BuiltinType.NativeByte);
            Assert.True(param.IsImmediateResolved);
            param.Name = "foo";
            Assert.True(param.IsImmediateResolved);
        }
Beispiel #2
0
        public void Sal3()
        {
            NativeParameter param = new NativeParameter("p");

            param.SalAttribute = new NativeSalAttribute(SalEntryType.Deref);
            param.NativeType   = new NativeBuiltinType(BuiltinType.NativeChar);

            NativeProcedure p1 = new NativeProcedure("p1");

            p1.Signature.ReturnType = new NativeBuiltinType(BuiltinType.NativeChar);
            p1.Signature.Parameters.Add(param);

            var ns = new BasicSymbolStorage();

            ns.AddProcedure(p1);

            NativeProcedure retp1 = null;

            Assert.True(ns.TryGetGlobalSymbol(p1.Name, out retp1));
            Assert.Equal("Deref", retp1.Signature.Parameters[0].SalAttribute.DisplayName);
        }
Beispiel #3
0
        public void Pre()
        {
            NativeParameter param = new NativeParameter();

            Assert.NotNull(param.Name);
        }
Beispiel #4
0
        public void Sal1()
        {
            NativeParameter param = new NativeParameter();

            Assert.NotNull(param.SalAttribute);
        }