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

            Assert.IsInstanceOf <JSEvalNumber>(o);
            Assert.That(o.ToDouble(), Is.EqualTo(v), msg ?? s);
        }
示例#2
0
        static void IsNumber(string s, double v, string msg = null)
        {
            RuntimeObj o = ScriptEngine.Evaluate(s);

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