public static void TestDoStatement() { SetUpTypeParser(); MakeMethod.DoStatement("Examples.AStr = \"Some string contents\" ; "); if (AStr != "Some string contents") { MessageBox.Show("Error in TestDoStatement"); } }
public static void TestDoStatement2() { SetUpTypeParser(); MakeMethod.DoStatement(@" Examples.Counter = 0 ; foreach ( var s in Examples.ColoursList ) { if (s == ""red"") Examples.Counter = Examples.Counter + 1 ; }"); //Note, I have only implemented the ++ and -- operator after a single identifier. X++ is ok, Y.X++ is not. ++X and ++X.Y and not implemented. if (Counter != 3) { MessageBox.Show("Error in TestDoStatement2"); } }