Beispiel #1
0
        public void ConstantMapTest()
        {
            HoistedIdentifierMap gl = new();
            TypeIdentifierMap    tp = new();

            FrameworkIntegration.PopulateWithFrameworkSymbols(gl, tp);

            string[] constants = { "PI", "E", "TAU", "PHI" };
            foreach (string c in constants)
            {
                Assert.IsTrue(gl.TryGet(c, out var sym));
                Assert.IsInstanceOf <ConstantSymbolNode <Rational> >(sym);
            }
        }
Beispiel #2
0
        public void IntegrationTest()
        {
            HoistedIdentifierMap gl = new();
            TypeIdentifierMap    tp = new();

            FrameworkIntegration.PopulateWithFrameworkSymbols(gl, tp);

            string[] types = { "String", "Int", "Char", "Complex", "Bool", "Rational" };
            foreach (string t in types)
            {
                Assert.IsTrue(tp.TryGet(t, out _));
            }

            Assert.IsTrue(gl.TryGet("Output", out _));
        }