Changeset 21007 for lang/cplusplus

Show
Ignore:
Timestamp:
10/09/08 00:17:57 (6 weeks ago)
Author:
tokuhirom
Message:

added node.isSameNode.

Location:
lang/cplusplus/llv8call/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/ext/libxml/node.cc

    r21002 r21007  
    3535ENDSUBMODULE 
    3636 
    37 // REST: 14/50 
     37// REST: 15/50 
    3838 
    39 // TODO: node.isSameNode 
    4039// TODO: node.isEqual 
    4140// TODO: node.nodeValue 
  • lang/cplusplus/llv8call/trunk/ext/libxml/node.h

    r21002 r21007  
    220220END 
    221221 
     222FUNCTION(isSameNode) 
     223    ARG_COUNT(1); 
     224    EXTERNAL_NODE(); 
     225    ARG_node(an, 0); 
     226    return an == node ? True() : False(); 
     227END 
     228 
    222229static inline void setupNodeIM(Handle<ObjectTemplate> OBJECT_TEMPLATE) { 
    223230    BIND_IM("nodeName",            nodeName); 
     
    235242    BIND_IM("nextSibling",         nextSibling); 
    236243    BIND_IM("previousSibling",     previousSibling); 
     244    BIND_IM("isSameNode",          isSameNode); 
    237245    INTERNALCOUNT(2); 
    238246} 
  • lang/cplusplus/llv8call/trunk/t/070_libxml/02_dom.js

    r21003 r21007  
    11require('t/util.js'); 
    22 
    3 plan({tests:35}); 
     3plan({tests:37}); 
    44 
    55check_lib("org.coderepos.libxml"); 
     
    142142}); 
    143143 
     144test(function () { 
     145    is(foo.isSameNode(foo),  true,                    'node.isSameNode()'); 
     146    is(foo.isSameNode(bar),  false,                   'node.isSameNode()'); 
     147}); 
     148 
    144149doc.close(); 
    145150