Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48589 - trunk/tools/build/v2/test
From: jurko.gospodnetic_at_[hidden]
Date: 2008-09-04 19:12:27


Author: jurko
Date: 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
New Revision: 48589
URL: http://svn.boost.org/trac/boost/changeset/48589

Log:
Minor stylistic changes in several Boost Build unit tests.
Text files modified:
   trunk/tools/build/v2/test/conditionals.py | 2 +-
   trunk/tools/build/v2/test/default_build.py | 4 ++--
   trunk/tools/build/v2/test/default_features.py | 2 +-
   trunk/tools/build/v2/test/dependency_property.py | 7 ++-----
   trunk/tools/build/v2/test/expansion.py | 8 ++++----
   trunk/tools/build/v2/test/make_rule.py | 2 +-
   trunk/tools/build/v2/test/notfile.py | 6 +-----
   trunk/tools/build/v2/test/regression.py | 2 --
   trunk/tools/build/v2/test/searched_lib.py | 4 ++--
   trunk/tools/build/v2/test/tag.py | 2 +-
   trunk/tools/build/v2/test/unit_test.py | 12 ++++--------
   trunk/tools/build/v2/test/use_requirements.py | 2 +-
   trunk/tools/build/v2/test/wrong_project.py | 4 +---
   13 files changed, 21 insertions(+), 36 deletions(-)

Modified: trunk/tools/build/v2/test/conditionals.py
==============================================================================
--- trunk/tools/build/v2/test/conditionals.py (original)
+++ trunk/tools/build/v2/test/conditionals.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -15,7 +15,7 @@
 # define.
 t.write("a.cpp", """
 #ifdef STATIC
-int main() { return 0; }
+int main() {}
 #endif
 """)
 

Modified: trunk/tools/build/v2/test/default_build.py
==============================================================================
--- trunk/tools/build/v2/test/default_build.py (original)
+++ trunk/tools/build/v2/test/default_build.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -13,7 +13,7 @@
 
 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 @@
 __declspec(dllimport)
 #endif
 void foo();
-int main() { foo(); return 0; }
+int main() { foo(); }
 """)
 
 t.write("b/jamfile.jam", """

Modified: trunk/tools/build/v2/test/default_features.py
==============================================================================
--- trunk/tools/build/v2/test/default_features.py (original)
+++ trunk/tools/build/v2/test/default_features.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -27,7 +27,7 @@
 __declspec(dllimport)
 #endif
 void foo();
-int main() { foo(); return 1; }
+int main() { foo(); }
 """)
 
 t.write("d/jamfile.jam", """

Modified: trunk/tools/build/v2/test/dependency_property.py
==============================================================================
--- trunk/tools/build/v2/test/dependency_property.py (original)
+++ trunk/tools/build/v2/test/dependency_property.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -15,16 +15,13 @@
 
 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

Modified: trunk/tools/build/v2/test/expansion.py
==============================================================================
--- trunk/tools/build/v2/test/expansion.py (original)
+++ trunk/tools/build/v2/test/expansion.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -11,19 +11,19 @@
 
 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.write("test.cpp", """
 #include "header.h"
-int main() { return 0; }
+int main() {}
 """)
 
 t.write("jamfile.jam", """

Modified: trunk/tools/build/v2/test/make_rule.py
==============================================================================
--- trunk/tools/build/v2/test/make_rule.py (original)
+++ trunk/tools/build/v2/test/make_rule.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -48,7 +48,7 @@
 """)
 
 t.write("dir/hello.cpp", """
-int main() { return 1; }
+int main() {}
 """)
 
 # Show only action names.

Modified: trunk/tools/build/v2/test/notfile.py
==============================================================================
--- trunk/tools/build/v2/test/notfile.py (original)
+++ trunk/tools/build/v2/test/notfile.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -28,11 +28,7 @@
 
 t.write("hello.cpp", """
 #include <iostream>
-int main()
-{
- std::cout << "Hello!\\n";
- return 1;
-}
+int main() { std::cout << "Hello!\\n"; }
 """)
 
 

Modified: trunk/tools/build/v2/test/regression.py
==============================================================================
--- trunk/tools/build/v2/test/regression.py (original)
+++ trunk/tools/build/v2/test/regression.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -79,8 +79,6 @@
         std::ifstream ifs( av[ i ] );
         std::cout << ifs.rdbuf();
     }
-
- return 0;
 }
 """)
 

Modified: trunk/tools/build/v2/test/searched_lib.py
==============================================================================
--- trunk/tools/build/v2/test/searched_lib.py (original)
+++ trunk/tools/build/v2/test/searched_lib.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -56,7 +56,7 @@
 
 t.write("main.cpp", """
 void helper();
-int main() { helper(); return 0; }
+int main() { helper(); }
 """)
 
 t.write("helper.cpp", """
@@ -117,7 +117,7 @@
 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", """

Modified: trunk/tools/build/v2/test/tag.py
==============================================================================
--- trunk/tools/build/v2/test/tag.py (original)
+++ trunk/tools/build/v2/test/tag.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -30,7 +30,7 @@
 }
 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")

Modified: trunk/tools/build/v2/test/unit_test.py
==============================================================================
--- trunk/tools/build/v2/test/unit_test.py (original)
+++ trunk/tools/build/v2/test/unit_test.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -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 @@
 
 t.write("test.cpp", """
 void helper();
-int main()
-{
- helper();
- return 0;
-}
+int main() { helper(); }
 """)
 
 t.write("helper.cpp", """

Modified: trunk/tools/build/v2/test/use_requirements.py
==============================================================================
--- trunk/tools/build/v2/test/use_requirements.py (original)
+++ trunk/tools/build/v2/test/use_requirements.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -74,7 +74,7 @@
 
 t.write("a.cpp", """
 #ifdef FOO
-int main() { return 0; }
+int main() {}
 #endif
 """)
 

Modified: trunk/tools/build/v2/test/wrong_project.py
==============================================================================
--- trunk/tools/build/v2/test/wrong_project.py (original)
+++ trunk/tools/build/v2/test/wrong_project.py 2008-09-04 19:12:25 EDT (Thu, 04 Sep 2008)
@@ -13,9 +13,7 @@
 
 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 ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk