# Hamigaki Iostreams Library Test Jamfile

#  Copyright Takeshi Mouri 2006.
#  Use, modification, and distribution are subject to the
#  Boost Software License, Version 1.0. (See accompanying file
#  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#  See http://hamigaki.sourceforge.jp/libs/iostreams for library home page.

subproject libs/iostreams/test ;

import testing ;

DEPENDS all : test ;

{

template iostreams
    : # sources
        <lib>../build/hamigaki_iostreams
    : # build requirements
    : # build variants
    ;

rule iostreams-test ( sources + : requirements * )
{
    return [
        run $(sources)
        :
        :
        :
        <define>BOOST_ALL_NO_LIB=1
        <cw-8_3><*><define>BOOST_THREAD_USE_LIB=1
        <include>$(HAMIGAKI_ROOT)  <sysinclude>$(HAMIGAKI_ROOT)
        <include>$(BOOST_INCLUDE)  <sysinclude>$(BOOST_INCLUDE)
        <library-path>$(BOOST_LIBPATH)
        <threading>multi
        <vc-8_0><*><cflags>-wd4996
        <vc-8_0><*><cflags>-wd4819
        <vc-8_0><*><linkflags>-INCREMENTAL:NO
        <vc-7_1><*><linkflags>-INCREMENTAL:NO
        find-boost-unit_test_framework-lib
        $(requirements)
    ] ;
}

rule intialize_suite {
    TEST_SUITE =
        [ iostreams-test background_copy_test.cpp : find-boost-thread-lib ]
        [ iostreams-test base64_test.cpp : ]
        [ iostreams-test concatenate_test.cpp : ]
        [ iostreams-test file_test.cpp : ]
        [ iostreams-test file_descriptor_test.cpp <template>iostreams : ]
        [ iostreams-test huffman_test.cpp : ]
        [ iostreams-test lazy_restrict_test.cpp : ]
        [ iostreams-test lzhuf_test.cpp : ]
        [ iostreams-test lzss_test.cpp : ]
        [ iostreams-test modified_lzss_test.cpp : ]
        [ iostreams-test repeat_test.cpp : ]
        [ iostreams-test tmp_file_test.cpp <template>iostreams : ]
        [ iostreams-test urlsafe_base64_test.cpp : ]
    ;

    if $(TEST_BIG_FILE)
    {
        TEST_SUITE +=
            [ iostreams-test big_fd_test.cpp <template>iostreams : ]
        ;
    }

}

intialize_suite ;

test-suite "iostreams"
    : $(TEST_SUITE)
    ;

}
