1#!/usr/bin/python 2 3# Copyright 2003, 2004 Vladimir Prus 4# Distributed under the Boost Software License, Version 1.0. 5# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 6 7# Test the unit_test rule. 8 9import BoostBuild 10 11t = BoostBuild.Tester(use_test_config=False) 12 13# Create the needed files. 14t.write("jamroot.jam", """ 15using testing ; 16lib helper : helper.cpp ; 17unit-test test : test.cpp : <library>helper ; 18""") 19 20t.write("test.cpp", """ 21void helper(); 22int main() { helper(); } 23""") 24 25t.write("helper.cpp", """ 26void 27#if defined(_WIN32) 28__declspec(dllexport) 29#endif 30helper() {} 31""") 32 33t.run_build_system(["link=static"]) 34t.expect_addition("bin/$toolset/debug/link-static*/test.passed") 35 36t.cleanup() 37