public void ePrematureEOF_Thrown() { var src = @""; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void eUnterminatedString3_Verbatim() { var src = @"a: $""aa aa"; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void eUnterminatedComment2() { var src = @"a: |*aa aa"; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void ePrematureEOF_CouldLogButThrown() { var src = @""; var msgs = new MessageList(); var lxr = new JL(new StringSource(src), msgs, throwErrors: true); lxr.AnalyzeAll(); Assert.IsNotNull(msgs.FirstOrDefault(m => m.Type == MessageType.Error && m.Code == (int)JSONMsgCode.ePrematureEOF)); }
public void Comments12withStrings() { //string is opened but line break var src = @"{ '|* /* //comment text " + "\n\r" + @" */ *|' } "; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void ePrematureEOF_Logged() { var src = @""; var msgs = new MessageList(); var lxr = new JL(new StringSource(src), msgs); lxr.AnalyzeAll(); Aver.IsNotNull(msgs.FirstOrDefault(m => m.Type == MessageType.Error && m.Code == (int)JSONMsgCode.ePrematureEOF)); }
public void eUnterminatedString4_Verbatim() { var src = @"a: $'aa aa"; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void eUnterminatedString2() { var src = @"a: ""aaaa"; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void eUnterminatedComment1() { var src = @"a: /*aa aa"; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }
public void Comments12withStrings() { //string is opened but line break var src = @"{ '|* /* //comment text "+"\n\r"+@" */ *|' } "; var lxr = new JL(new StringSource(src)); lxr.AnalyzeAll(); }