]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/unit_test.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / unit_test.py
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
9 import BoostBuild
10
11 t = BoostBuild.Tester(use_test_config=False)
12
13 # Create the needed files.
14 t.write("jamroot.jam", """
15 using testing ;
16 lib helper : helper.cpp ;
17 unit-test test : test.cpp : <library>helper ;
18 """)
19
20 t.write("test.cpp", """
21 void helper();
22 int main() { helper(); }
23 """)
24
25 t.write("helper.cpp", """
26 void
27 #if defined(_WIN32)
28 __declspec(dllexport)
29 #endif
30 helper() {}
31 """)
32
33 t.run_build_system(["link=static"])
34 t.expect_addition("bin/$toolset/debug/link-static/test.passed")
35
36 t.cleanup()