mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Add more tests.
[SVN r15851]
This commit is contained in:
28
test/conditionals.py
Normal file
28
test/conditionals.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Test conditional properties
|
||||
|
||||
from BoostBuild import Tester, List
|
||||
import os
|
||||
from string import strip
|
||||
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("a.cpp", """
|
||||
#ifdef SHARED
|
||||
int main() {}
|
||||
#endif
|
||||
""")
|
||||
t.write("Jamfile", "exe a : a.cpp : <shared>true:<define>SHARED ;")
|
||||
t.run_build_system("shared=true")
|
||||
t.expect_addition("bin/gcc/debug/shared-true/main-target-a/a")
|
||||
|
||||
t.write("Jamfile", """
|
||||
project : requirements <shared>true:<define>SHARED ;
|
||||
exe a : a.cpp ;
|
||||
""")
|
||||
t.run_build_system("shared=true")
|
||||
t.expect_addition("bin/gcc/debug/shared-true/a")
|
||||
|
||||
t.cleanup()
|
||||
16
test/default_build.py
Normal file
16
test/default_build.py
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Test that default build clause actually has any effect.
|
||||
|
||||
from BoostBuild import Tester
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("Jamfile", "exe a : a.cpp : : debug release ;")
|
||||
t.write("a.cpp", "int main() {}")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/gcc/debug/a")
|
||||
t.expect_addition("bin/gcc/release/a")
|
||||
|
||||
t.cleanup()
|
||||
@@ -29,4 +29,4 @@ import chain
|
||||
import default_build
|
||||
import main_properties
|
||||
import use_requirements
|
||||
|
||||
import conditionals
|
||||
|
||||
28
v2/test/conditionals.py
Normal file
28
v2/test/conditionals.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Test conditional properties
|
||||
|
||||
from BoostBuild import Tester, List
|
||||
import os
|
||||
from string import strip
|
||||
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("a.cpp", """
|
||||
#ifdef SHARED
|
||||
int main() {}
|
||||
#endif
|
||||
""")
|
||||
t.write("Jamfile", "exe a : a.cpp : <shared>true:<define>SHARED ;")
|
||||
t.run_build_system("shared=true")
|
||||
t.expect_addition("bin/gcc/debug/shared-true/main-target-a/a")
|
||||
|
||||
t.write("Jamfile", """
|
||||
project : requirements <shared>true:<define>SHARED ;
|
||||
exe a : a.cpp ;
|
||||
""")
|
||||
t.run_build_system("shared=true")
|
||||
t.expect_addition("bin/gcc/debug/shared-true/a")
|
||||
|
||||
t.cleanup()
|
||||
16
v2/test/default_build.py
Normal file
16
v2/test/default_build.py
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Test that default build clause actually has any effect.
|
||||
|
||||
from BoostBuild import Tester
|
||||
t = Tester()
|
||||
|
||||
t.write("project-root.jam", "import gcc ;")
|
||||
t.write("Jamfile", "exe a : a.cpp : : debug release ;")
|
||||
t.write("a.cpp", "int main() {}")
|
||||
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/gcc/debug/a")
|
||||
t.expect_addition("bin/gcc/release/a")
|
||||
|
||||
t.cleanup()
|
||||
@@ -29,4 +29,4 @@ import chain
|
||||
import default_build
|
||||
import main_properties
|
||||
import use_requirements
|
||||
|
||||
import conditionals
|
||||
|
||||
Reference in New Issue
Block a user