示例#1
0
        static void IsBoolean(string s, bool v = true, string msg = null)
        {
            RuntimeObj o = ScriptEngine.Evaluate(s);

            Assert.IsInstanceOf <JSEvalBoolean>(o);
            Assert.That(o.ToBoolean(), Is.EqualTo(v), msg ?? s);
        }
示例#2
0
        static void IsBoolean(string s, bool v = true, string msg = null)
        {
            RuntimeObj o = ScriptEngine.Evaluate(s);

            o.Should().BeOfType <BooleanObj>();
            o.ToBoolean().Should().Be(v, msg ?? s);
        }