test/com/google/javascript/rhino/NodeTest.java
// Verify that annotations on cloned nodes are properly handled.
Verify that annotations on cloned nodes are properly handled.
Verify that annotations on cloned nodes are properly handled .
@Test
  public void testCloneAnnontations2() {
    Node n = getVarRef("a");
    n.putBooleanProp(Node.IS_CONSTANT_NAME, true);
    assertTrue(n.getBooleanProp(Node.IS_CONSTANT_NAME));
    Node nodeClone = n.cloneNode();
    assertTrue(nodeClone.getBooleanProp(Node.IS_CONSTANT_NAME));
    assertTrue(n.getBooleanProp(Node.IS_CONSTANT_NAME));
    assertTrue(nodeClone.getBooleanProp(Node.IS_CONSTANT_NAME));
  }
@ Test public void testCloneAnnontations2 ( ) { Node n = getVarRef ( "a" ) ; n . putBooleanProp ( Node . IS_CONSTANT_NAME , true ) ; assertTrue ( n . getBooleanProp ( Node . IS_CONSTANT_NAME ) ) ; Node nodeClone = n . cloneNode ( ) ; assertTrue ( nodeClone . getBooleanProp ( Node . IS_CONSTANT_NAME ) ) ; assertTrue ( n . getBooleanProp ( Node . IS_CONSTANT_NAME ) ) ; assertTrue ( nodeClone . getBooleanProp ( Node . IS_CONSTANT_NAME ) ) ; }
Verify that annotations on cloned nodes are properly handled.
Verify that annotations on cloned nodes are properly handled .