The typical shape of this node is:
IUnaryOperatorNode IExpressionNode <-- getOperandNode()
-a
IUnaryOperatorNode "-" IIdentifierNode "a"
155156157158159160161162163
} @Test public void testVisitUnaryOperatorNode_PreIncrement() { IUnaryOperatorNode node = getUnaryNode("++a"); asBlockWalker.visitUnaryOperator(node); assertOut("++a"); }
163164165166167168169170171
} @Test public void testVisitUnaryOperatorNode_PostDecrement() { IUnaryOperatorNode node = getUnaryNode("a--"); asBlockWalker.visitUnaryOperator(node); assertOut("a--"); }
171172173174175176177178179
} @Test public void testVisitUnaryOperatorNode_PreDecrement() { IUnaryOperatorNode node = getUnaryNode("--a"); asBlockWalker.visitUnaryOperator(node); assertOut("--a"); }
255256257258259260261262263
} @Test public void testVisitUnaryOperatorNode_BitwiseNot() { IUnaryOperatorNode node = getUnaryNode("~a"); asBlockWalker.visitUnaryOperator(node); assertOut("~a"); }
435436437438439440441442443
} @Test public void testVisitUnaryOperatorNode_LogicalNot() { IUnaryOperatorNode node = getUnaryNode("!a"); asBlockWalker.visitUnaryOperator(node); assertOut("!a"); }
560561562563564565566567568
} @Test public void testVisitUnaryOperator_Delete() { IUnaryOperatorNode node = getUnaryNode("delete a"); asBlockWalker.visitUnaryOperator(node); assertOut("delete a"); }
671672673674675676677678679
} @Test public void testVisitUnaryOperatorNode_Typeof() { IUnaryOperatorNode node = getUnaryNode("typeof(a)"); asBlockWalker.visitUnaryOperator(node); assertOut("typeof(a)"); }
680681682683684685686687688
@Test public void testVisitUnaryOperatorNode_Typeof_NoParens() { // TODO (mschmalle) the notation without parenthesis is also valid in AS/JS IUnaryOperatorNode node = getUnaryNode("typeof a"); asBlockWalker.visitUnaryOperator(node); assertOut("typeof(a)"); }
688689690691692693694695696
} @Test public void testVisitUnaryOperatorNode_Void() { IUnaryOperatorNode node = getUnaryNode("void a"); asBlockWalker.visitUnaryOperator(node); assertOut("void a"); }
147148149150151152153154155
} @Test public void testVisitUnaryOperatorNode_PostIncrement() { IUnaryOperatorNode node = getUnaryNode("a++"); asBlockWalker.visitUnaryOperator(node); assertOut("a++"); }