public void TestIsTrueMemoryAccessorFunction()
        {
            var expr  = new FunctionCallExpression("byte", new ExpressionBase[] { new IntegerConstantExpression(0x1234) });
            var scope = AchievementScriptInterpreter.GetGlobalScope();

            ParseErrorExpression error;

            Assert.That(expr.IsTrue(scope, out error), Is.Null);
            Assert.That(error, Is.Null);
        }
        public void TestIsTrueUserFunctionReturningBoolean()
        {
            var userFunc = Parse("function u() => always_true()");
            var expr     = new FunctionCallExpression("u", new ExpressionBase[0]);
            var scope    = new InterpreterScope(AchievementScriptInterpreter.GetGlobalScope());

            scope.AddFunction(userFunc);

            ParseErrorExpression error;

            Assert.That(expr.IsTrue(scope, out error), Is.True);
            Assert.That(error, Is.Null);
        }