MCPcopy Create free account
hub / github.com/boostorg/build / test_basic

Function test_basic

test/dependency_test.py:12–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11
12def test_basic():
13 t = BoostBuild.Tester(["-d3", "-d+12"], pass_d0=False, use_test_config=False)
14
15 t.write("a.cpp", """
16#include <a.h>
17# include "a.h"
18#include <x.h>
19int main() {}
20""")
21 t.write("a.h", "\n")
22 t.write("a_c.c", """\
23#include <a.h>
24# include "a.h"
25#include <x.h>
26""")
27 t.write("b.cpp", """\
28#include "a.h"
29int main() {}
30""")
31 t.write("b.h", "\n")
32 t.write("c.cpp", """\
33#include "x.h"
34int main() {}
35""")
36 t.write("e.cpp", """\
37#include "x.h"
38int main() {}
39""")
40 t.write("x.foo", "")
41 t.write("y.foo", "")
42
43 t.write("src1/a.h", '#include "b.h"\n')
44 t.write("src1/b.h", '#include "c.h"\n')
45 t.write("src1/c.h", "\n")
46 t.write("src1/z.h", """\
47extern int dummy_variable_suppressing_empty_file_warning_on_hp_cxx_compiler;
48""")
49
50 t.write("src2/b.h", "\n")
51
52 t.write("jamroot.jam", """\
53import foo ;
54import types/cpp ;
55import types/exe ;
56
57project test : requirements <include>src1 ;
58
59exe a : x.foo a.cpp a_c.c ;
60exe b : b.cpp ;
61
62# Because of <define>FOO, c.cpp will be compiled to a different directory than
63# everything for main target "a". Therefore, without <implicit-dependency>, C
64# preprocessor processing that module will not find "x.h", which is part of
65# "a"'s dependency graph.
66#
67# --------------------------
68# More detailed explanation:
69# --------------------------

Callers 1

dependency_test.pyFile · 0.70

Calls 7

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_additionMethod · 0.95
touchMethod · 0.95
expect_touchMethod · 0.95
expect_nothing_moreMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected