public void SUndefinedTranslateTest() { var processor = ScriptProcessorFactory.GetNew(); SUndefined Undefined = (SUndefined)processor.Undefined; var obj = ScriptOutAdapter.Translate(Undefined); Assert.IsTrue(obj is SUndefined); }
internal void Initialize() { if (Parent == null) { AddVariable(SObject.LITERAL_UNDEFINED, SUndefined.Factory(), true); AddVariable(SObject.LITERAL_NULL, SNull.Factory(), true); AddPrototype(new ObjectPrototype()); AddPrototype(new BooleanPrototype()); AddPrototype(new NumberPrototype()); AddPrototype(new StringPrototype(_processor)); AddPrototype(new ArrayPrototype()); AddPrototype(new ErrorPrototype(_processor)); GlobalFunctions.GetFunctions() .ForEach(AddVariable); } }