LCOV - code coverage report
Current view: top level - tests - test_as2js_node.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 18 18 100.0 %
Date: 2014-11-22 Functions: 9 9 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef TEST_AS2JS_NODE_H
       2             : #define TEST_AS2JS_NODE_H
       3             : /* test_as2hs_node.h -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2014 */
       4             : 
       5             : /*
       6             : 
       7             : Copyright (c) 2005-2014 Made to Order Software Corp.
       8             : 
       9             : http://snapwebsites.org/project/as2js
      10             : 
      11             : Permission is hereby granted, free of charge, to any
      12             : person obtaining a copy of this software and
      13             : associated documentation files (the "Software"), to
      14             : deal in the Software without restriction, including
      15             : without limitation the rights to use, copy, modify,
      16             : merge, publish, distribute, sublicense, and/or sell
      17             : copies of the Software, and to permit persons to whom
      18             : the Software is furnished to do so, subject to the
      19             : following conditions:
      20             : 
      21             : The above copyright notice and this permission notice
      22             : shall be included in all copies or substantial
      23             : portions of the Software.
      24             : 
      25             : THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
      26             : ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
      27             : LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
      28             : FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
      29             : EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
      30             : LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
      31             : WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
      32             : ARISING FROM, OUT OF OR IN CONNECTION WITH THE
      33             : SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
      34             : SOFTWARE.
      35             : 
      36             : */
      37             : 
      38             : 
      39             : #include <cppunit/extensions/HelperMacros.h>
      40             : 
      41             : 
      42             : #include    "as2js/node.h"
      43             : 
      44             : 
      45          75 : class As2JsNodeUnitTests : public CPPUNIT_NS::TestFixture
      46             : {
      47           6 :     CPPUNIT_TEST_SUITE( As2JsNodeUnitTests );
      48           3 :         CPPUNIT_TEST( test_type );
      49           3 :         CPPUNIT_TEST( test_compare );
      50           3 :         CPPUNIT_TEST( test_conversions );
      51           3 :         CPPUNIT_TEST( test_tree );
      52           3 :         CPPUNIT_TEST( test_param );
      53           3 :         CPPUNIT_TEST( test_position );
      54           3 :         CPPUNIT_TEST( test_links );
      55           3 :         CPPUNIT_TEST( test_variables );
      56           3 :         CPPUNIT_TEST( test_labels );
      57           3 :         CPPUNIT_TEST( test_attributes );
      58             : 
      59             :         // the display capability is for debug purposes but
      60             :         // we test it to make sure that we display the right
      61             :         // information
      62           3 :         CPPUNIT_TEST( test_display_all_types );
      63           3 :         CPPUNIT_TEST( test_display_unicode_string );
      64           3 :         CPPUNIT_TEST( test_display_flags );
      65           3 :         CPPUNIT_TEST( test_display_attributes );
      66           3 :         CPPUNIT_TEST( test_display_tree );
      67          15 :     CPPUNIT_TEST_SUITE_END();
      68             : 
      69             : public:
      70             :     //void setUp();
      71             : 
      72             : protected:
      73             :     void test_type();
      74             :     void test_compare();
      75             :     void test_conversions();
      76             :     void test_tree();
      77             :     void test_param();
      78             :     void test_position();
      79             :     void test_links();
      80             :     void test_variables();
      81             :     void test_labels();
      82             :     void test_attributes();
      83             :     void test_display_all_types();
      84             :     void test_display_unicode_string();
      85             :     void test_display_flags();
      86             :     void test_display_attributes();
      87             :     void test_display_tree();
      88             : 
      89             :     // helper functions
      90             :     bool in_conflict(size_t j, as2js::Node::attribute_t attr, as2js::Node::attribute_t a) const;
      91             : };
      92             : 
      93             : #endif
      94             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.10