2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Minor stylistic changes in several Boost Build unit tests.

[SVN r48589]
This commit is contained in:
Jurko Gospodnetić
2008-09-04 23:12:25 +00:00
parent 1a332dc93e
commit 5a9ccbf6ec
13 changed files with 21 additions and 36 deletions

View File

@@ -15,7 +15,7 @@ t = BoostBuild.Tester()
# define.
t.write("a.cpp", """
#ifdef STATIC
int main() { return 0; }
int main() {}
#endif
""")

View File

@@ -13,7 +13,7 @@ t = BoostBuild.Tester()
t.write("jamroot.jam", "import gcc ;")
t.write("jamfile.jam", "exe a : a.cpp : : debug release ;")
t.write("a.cpp", "int main() { return 0; }\n")
t.write("a.cpp", "int main() {}\n")
t.run_build_system()
t.expect_addition("bin/$toolset/debug/a.exe")
@@ -71,7 +71,7 @@ t.write("a/a.cpp", """
__declspec(dllimport)
#endif
void foo();
int main() { foo(); return 0; }
int main() { foo(); }
""")
t.write("b/jamfile.jam", """

View File

@@ -27,7 +27,7 @@ t.write("hello.cpp", """
__declspec(dllimport)
#endif
void foo();
int main() { foo(); return 1; }
int main() { foo(); }
""")
t.write("d/jamfile.jam", """

View File

@@ -15,16 +15,13 @@ import string
t = BoostBuild.Tester()
t.write("jamroot.jam", "")
t.write("jamfile.jam", """
t.write("jamroot.jam", """
lib foo : foo.cpp ;
exe hello : hello.cpp ;
exe hello2 : hello.cpp : <library>foo ;
""")
t.write("hello.cpp", """
int main() { return 0; }
""")
t.write("hello.cpp", "int main() {}\n")
t.write("foo.cpp", """
#ifdef _WIN32

View File

@@ -11,19 +11,19 @@ t = BoostBuild.Tester()
t.write("a.cpp", """
#ifdef CF_IS_OFF
int main() { return 0; }
int main() {}
#endif
""")
t.write("b.cpp", """
#ifdef CF_1
int main() { return 0; }
int main() {}
#endif
""")
t.write("c.cpp", """
#ifdef FOO
int main() { return 0; }
int main() {}
#endif
""")
@@ -62,7 +62,7 @@ t.rm("bin")
t.write("test.cpp", """
#include "header.h"
int main() { return 0; }
int main() {}
""")
t.write("jamfile.jam", """

View File

@@ -48,7 +48,7 @@ make hello1.cpp : hello.cpp : common.copy ;
""")
t.write("dir/hello.cpp", """
int main() { return 1; }
int main() {}
""")
# Show only action names.

View File

@@ -28,11 +28,7 @@ actions valgrind
t.write("hello.cpp", """
#include <iostream>
int main()
{
std::cout << "Hello!\\n";
return 1;
}
int main() { std::cout << "Hello!\\n"; }
""")

View File

@@ -79,8 +79,6 @@ int main( int ac, char * av[] )
std::ifstream ifs( av[ i ] );
std::cout << ifs.rdbuf();
}
return 0;
}
""")

View File

@@ -56,7 +56,7 @@ lib test_lib : : <name>test_lib <search>lib ;
t.write("main.cpp", """
void helper();
int main() { helper(); return 0; }
int main() { helper(); }
""")
t.write("helper.cpp", """
@@ -117,7 +117,7 @@ t.rm("bin/$toolset/debug/main.exe")
t.write("jamfile.jam", "exe main : main.cpp d/d2//a ;")
t.write("main.cpp", """
void foo();
int main() { foo(); return 0; }
int main() { foo(); }
""")
t.write("d/d2/jamfile.jam", """

View File

@@ -30,7 +30,7 @@ rule tag ( name : type ? : property-set )
}
exe a : a.cpp ;
""")
t.write("version-1.32.0/a.cpp", "int main() { return 0; }\n")
t.write("version-1.32.0/a.cpp", "int main() {}\n")
t.run_build_system(subdir="version-1.32.0")
t.expect_addition("version-1.32.0/bin/$toolset/debug/a.exe")

View File

@@ -1,8 +1,8 @@
#!/usr/bin/python
# Copyright 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Copyright 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Test the unit_test rule.
@@ -19,11 +19,7 @@ unit-test test : test.cpp : <library>helper ;
t.write("test.cpp", """
void helper();
int main()
{
helper();
return 0;
}
int main() { helper(); }
""")
t.write("helper.cpp", """

View File

@@ -74,7 +74,7 @@ foo() {}
t.write("a.cpp", """
#ifdef FOO
int main() { return 0; }
int main() {}
#endif
""")

View File

@@ -13,9 +13,7 @@ import BoostBuild
t = BoostBuild.Tester()
t.write("a.cpp", """
int main() { return 0; }
""")
t.write("a.cpp", "int main() {}\n")
t.write("jamroot.jam", """
using some_tool ;