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

Function test_include_scan

v2/test/link.py:121–148  ·  view source on GitHub ↗

Make sure that the #include scanner finds the headers

()

Source from the content-addressed store, hash-verified

119 t.cleanup()
120
121def test_include_scan():
122 """Make sure that the #include scanner finds the headers"""
123 t = BoostBuild.Tester()
124 t.write("jamroot.jam", """\
125 import link ;
126 link-directory dir1-link : src/dir1/include : <location>. ;
127 link-directory dir2-link : src/dir2/include : <location>. ;
128 obj test : test.cpp :
129 <include>include
130 <implicit-dependency>dir1-link
131 <implicit-dependency>dir2-link ;
132 """)
133
134 t.write("src/dir1/include/file1.h", "#include <file2.h>\n")
135 t.write("src/dir2/include/file2.h", "int f();\n")
136 t.write("test.cpp", """\
137 #include <file1.h>
138 int main() { f(); }
139 """);
140
141 t.run_build_system(["test"])
142
143 t.expect_addition("bin/$toolset/debug/test.obj")
144
145 t.run_build_system()
146 t.expect_nothing_more()
147
148 t.cleanup()
149
150test_basic()
151test_merge_two()

Callers 1

link.pyFile · 0.85

Calls 5

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_additionMethod · 0.95
expect_nothing_moreMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected