Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/wrapper.py @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 825 bytes
Line 
1#!/usr/bin/python
2
3# Copyright 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 that the user can define his own rule that will call builtin main
8#  target rule and that this will work.
9
10from BoostBuild import Tester, List
11
12t = Tester()
13
14t.write("Jamfile", """ my-test : test.cpp ;
15
16
17""")
18
19t.write("test.cpp", """
20int main()
21{
22    return 0;
23}
24
25""")
26
27t.write("project-root.jam", """ using testing ;
28
29rule my-test ( name ? : sources + )
30{
31    {
32        name ?= test ;
33        unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ;
34    }   
35}
36
37IMPORT $(__name__) : my-test : : my-test ;
38
39
40""")
41
42t.run_build_system()
43t.expect_addition("bin/$toolset/debug/test.passed")
44
45t.cleanup()
46
Note: See TracBrowser for help on using the repository browser.