Check whether usage requirements are propagated via "alias". In case they are not, linking will fail as there will be no main() function defined anywhere in the source.
(t)
| 63 | ############################################################################### |
| 64 | |
| 65 | def test_alias_source_usage_requirements(t): |
| 66 | """ |
| 67 | Check whether usage requirements are propagated via "alias". In case they |
| 68 | are not, linking will fail as there will be no main() function defined |
| 69 | anywhere in the source. |
| 70 | |
| 71 | """ |
| 72 | t.write("jamroot.jam", """\ |
| 73 | lib l : l.cpp : : : <define>WANT_MAIN ; |
| 74 | alias la : l ; |
| 75 | exe main : main.cpp la ; |
| 76 | """) |
| 77 | |
| 78 | t.write("l.cpp", """\ |
| 79 | void |
| 80 | #if defined(_WIN32) |
| 81 | __declspec(dllexport) |
| 82 | #endif |
| 83 | foo() {} |
| 84 | """) |
| 85 | |
| 86 | t.write("main.cpp", """\ |
| 87 | #ifdef WANT_MAIN |
| 88 | int main() {} |
| 89 | #endif |
| 90 | """) |
| 91 | |
| 92 | t.run_build_system() |
| 93 | |
| 94 | |
| 95 | ############################################################################### |
no test coverage detected