public override bool ProtectedIsAcceptedUsingOracle(CstNode node) { var siblings = node.Siblings().ToList(); var parent = node.Parent; if (parent.SafeName() == "stat" && siblings[0].TokenText == "if") { return(node.TokenText != "true"); } if (parent.SafeName() == "stat" && siblings[0].TokenText == "while") { return(node.TokenText != "true"); } if (parent.SafeName() == "stat" && siblings[0].TokenText == "repeat") { return(node.TokenText != "true"); } var ppp = node.SafeParent().SafeParent().SafeParent(); var pppp = ppp.SafeParent(); if (pppp.SafeName() == "functioncall" && ppp.Prev != null && ppp.Prev.TokenText == "print") { return(node.TokenText != "true"); } return(false); }
public override bool ProtectedIsAcceptedUsingOracle(CstNode node) { var siblings = node.Siblings().ToList(); var parent = node.Parent; if (parent.SafeName() == "stat" && siblings[0].TokenText == "repeat") { return(true); } return(false); }
public override bool ProtectedIsAcceptedUsingOracle(CstNode node) { var siblings = node.Siblings().ToList(); var parent = node.Parent; if (parent.SafeName() == "stat" && siblings[0].TokenText == "repeat") { return true; } return false; }
public override bool ProtectedIsAcceptedUsingOracle(CstNode node) { var siblings = node.Siblings().ToList(); var parent = node.Parent; if (parent.SafeName() == "stat" && siblings[0].TokenText == "if") { return node.TokenText != "true"; } if (parent.SafeName() == "stat" && siblings[0].TokenText == "while") { return node.TokenText != "true"; } if (parent.SafeName() == "stat" && siblings[0].TokenText == "repeat") { return node.TokenText != "true"; } var ppp = node.SafeParent().SafeParent().SafeParent(); var pppp = ppp.SafeParent(); if (pppp.SafeName() == "functioncall" && ppp.Prev != null && ppp.Prev.TokenText == "print") { return node.TokenText != "true"; } return false; }