public void ParseLanguageExpression_InvalidIndexRecordSet() { //------------Setup for test-------------------------- var data = CreateEnvironmentWithData(); //------------Execute Test--------------------------- var x = EvaluationFunctions.parseLanguageExpressionStrict("[[rec(1)", 1); //------------Assert Results------------------------- Assert.AreEqual(x.IsWarewolfAtomExpression, true); }
public void ParseLanguageExpressionStrict_IndexExpression() { //------------Setup for test-------------------------- var data = CreateEnvironmentWithData(); //------------Execute Test--------------------------- var x = EvaluationFunctions.parseLanguageExpressionStrict("[[rec([[a]]).a]]", 1); //------------Assert Results------------------------- Assert.AreEqual(x.IsRecordSetExpression, true); var rec = x as LanguageAST.LanguageExpression.RecordSetExpression; Assert.IsTrue(rec.Item.Index.IsIndexExpression); }