public void ParseError_TwoProjectLevelErrors() { Vbc t = new Vbc(); t.BuildEngine = new MockEngine(); string error1 = "vbc : error BC30205: Error in project-level import '<xmlns='bye'>, <xmlns='byebye'>' at '<xmlns='bye'>, ' : End of statement expected."; string error2 = "vbc : error BC30573: Error in project-level import '<xmlns=\"hi\">' at '<xmlns=\"hi\">' : XML namespace prefix '' is already declared"; t.ParseVBErrorOrWarning(error1, MessageImportance.High); t.ParseVBErrorOrWarning(error2, MessageImportance.High); Assert.IsTrue((t.BuildEngine as MockEngine).Errors >= 2, "Should be at least two errors"); (t.BuildEngine as MockEngine).AssertLogContains("BC30573"); (t.BuildEngine as MockEngine).AssertLogContains("BC30205"); }
public void ParseError_StandardVbcErrorWithColon() { Vbc t = new Vbc(); t.BuildEngine = new MockEngine(); string error1 = "d:\\scratch\\607654\\Module1.vb(5) : error BC30800: Method arguments must be enclosed in parentheses : Don't you think?"; string error2 = ""; string error3 = " Ed Sub"; string error4 = " ~~~"; t.ParseVBErrorOrWarning(error1, MessageImportance.High); t.ParseVBErrorOrWarning(error2, MessageImportance.High); t.ParseVBErrorOrWarning(error3, MessageImportance.High); t.ParseVBErrorOrWarning(error4, MessageImportance.High); Assert.IsTrue((t.BuildEngine as MockEngine).Errors >= 1, "Should be at least one error"); (t.BuildEngine as MockEngine).AssertLogContains("BC30800"); (t.BuildEngine as MockEngine).AssertLogContains("(5,8)"); }
public void ParseError_StandardVbcError() { Vbc t = new Vbc(); t.BuildEngine = new MockEngine(); string error1 = "d:\\scratch\\607654\\Module1.vb(5) : error BC30451: Name 'Ed' is not declared."; string error2 = ""; string error3 = " Ed Sub"; string error4 = " ~~ "; t.ParseVBErrorOrWarning(error1, MessageImportance.High); t.ParseVBErrorOrWarning(error2, MessageImportance.High); t.ParseVBErrorOrWarning(error3, MessageImportance.High); t.ParseVBErrorOrWarning(error4, MessageImportance.High); Assert.IsTrue((t.BuildEngine as MockEngine).Errors >= 1, "Should be at least one error"); (t.BuildEngine as MockEngine).AssertLogContains("BC30451"); (t.BuildEngine as MockEngine).AssertLogContains("(5,5)"); }
public void ParseError_ProjectLevelVbcError() { Vbc t = new Vbc(); t.BuildEngine = new MockEngine(); string error = "vbc : error BC30573: Error in project-level import '<xmlns=\"hi\">' at '<xmlns=\"hi\">' : XML namespace prefix '' is already declared"; t.ParseVBErrorOrWarning(error, MessageImportance.High); Assert.IsTrue((t.BuildEngine as MockEngine).Errors >= 1, "Should be at least one error"); (t.BuildEngine as MockEngine).AssertLogContains("BC30573"); }
public void ParseError_StandardVbcErrorFollowedByProjectLevel() { Vbc t = new Vbc(); t.BuildEngine = new MockEngine(); string error1 = "d:\\scratch\\607654\\Module1.vb(5) : error BC30800: Method arguments must be enclosed in parentheses : Don't you think?"; string error2 = ""; string error3 = " Ed Sub"; string error4 = " ~~~"; string error5 = "vbc : error BC30573: Error in project-level import '<xmlns=\"hi\">' at '<xmlns=\"hi\">' : XML namespace prefix '' is already declared"; t.ParseVBErrorOrWarning(error1, MessageImportance.High); t.ParseVBErrorOrWarning(error2, MessageImportance.High); t.ParseVBErrorOrWarning(error3, MessageImportance.High); t.ParseVBErrorOrWarning(error4, MessageImportance.High); t.ParseVBErrorOrWarning(error5, MessageImportance.High); Assert.IsTrue((t.BuildEngine as MockEngine).Errors >= 2, "Should be at least two errors"); (t.BuildEngine as MockEngine).AssertLogContains("BC30573"); (t.BuildEngine as MockEngine).AssertLogContains("BC30800"); }