# Copyright (C) 2006 Arkadiy Vertleyb
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)

# Boost Typeof Library test Jamfile

subproject libs/typeof/test ;

# bring in rules for testing
import testing ;

local rule special-requirements ( toolset variant : properties * )
{
    # Tru64/CXX6.5 hangs on most tests, so just turn it off completely.

    if $(UNIX) && $(OS) = OSF
    {
        switch $(toolset)
        {
            case tru64cxx65* : properties =
                [ replace-properties $(properties) : <build>no ] ;
        }
    }
    
    return $(properties) ;
}

test-suite "typeof" 
    :  
    [ compile type.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : type_native ]
    [ compile type.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : type_emulation ]

    [ compile template_type.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_type_native ]
    [ compile template_type.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_type_emulation ]

    [ compile template_int.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_int_native ]
    [ compile template_int.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_int_emulation ]

    [ compile template_tpl.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_tpl_native ]
    [ compile template_tpl.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_tpl_emulation ]

    [ compile template_enum.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_enum_native ]
    [ compile template_enum.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_enum_emulation ]

    [ compile template_dependent.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_dependent_native ]
    [ compile template_dependent.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_dependent_emulation ]

    [ compile template_multiword.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_multiword_native ]
    [ compile template_multiword.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : template_multiword_emulation ]

    [ compile modifiers.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : modifiers_native ]
    [ compile modifiers.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : modifiers_emulation ]

    [ compile function.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_native ]
    [ compile function.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : function_emulation ]

    [ compile function_binding.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_binding_native ]
    [ compile function_binding.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : function_binding_emulation ]

    [ compile function_ptr.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ptr_native ]
    [ compile function_ptr.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : function_ptr_emulation ]

    [ compile function_ref.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ref_native ]
    [ compile function_ref.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : function_ref_emulation ]

    [ compile member_function.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : member_function_native ]
    [ compile member_function.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : member_function_emulation ]

    [ compile data_member.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : data_member_native ]
    [ compile data_member.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : data_member_emulation ]

    [ compile noncopyable.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : noncopyable_native ]
    [ compile noncopyable.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : noncopyable_emulation ]

    [ compile std.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : std_native ]
    [ compile std.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : std_emulation ]

    [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_NATIVE special-requirements : odr_native ]
    [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_EMULATION special-requirements : odr_emulation ]

    [ compile function_ptr_from_tpl.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ptr_from_tpl_native ]
    [ compile function_ptr_from_tpl.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : function_ptr_from_tpl_emulation ]

    [ compile nested_typedef.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : nested_typedef_native ]
    [ compile nested_typedef.cpp : <define>BOOST_TYPEOF_EMULATION special-requirements : nested_typedef_emulation ]

    [ run odr_no_uns1.cpp odr_no_uns2.cpp : : : <define>BOOST_TYPEOF_EMULATION special-requirements : odr_no_uns ]

    ;
