Просмотр исходного кода

Rename existing tests to clarify expected results. Add additional tests to cover more cases, including some which Phil Richards discovered were being reported incorrectly by compiler_status.cpp

[SVN r29691]
Beman Dawes 21 лет назад
Родитель
Сommit
7fe7dae43b

+ 26 - 12
tools/regression/test/Jamfile

@@ -17,16 +17,30 @@ DEPENDS all : test ;
     # look in BOOST_ROOT for sources first, just in this Jamfile
     # look in BOOST_ROOT for sources first, just in this Jamfile
     local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ;
     local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ;
     
     
-    run compile-fail.cpp ;
-    run run-fail.cpp ;
-    run run-fail-warn.cpp ;
-    run run-note-fail.cpp ;
-    run run-note-pass.cpp ;
-    run run-note-warn.cpp ;
-    run run-pass.cpp ;
-    run run-pass-warn.cpp ;
-    run-fail run_fail-fail.cpp ;
-    run-fail run_fail-fail-warn.cpp ;
-    run-fail run_fail-pass.cpp ;
-    run-fail run_fail-pass-warn.cpp ;
+
+#  Test naming convention: the portion of the name before the tilde ("~")
+#  identifies the bjam test type. The portion after the tilde
+#  identifies the correct result to be reported by compiler_status.
+
+    compile compile~fail.cpp ;
+    compile compile~pass.cpp ;
+    compile compile~warn.cpp ;
+    
+    compile-fail compile-fail~fail.cpp ;
+    compile-fail compile-fail~pass.cpp ;
+    
+    run run~compile-fail.cpp ;
+    run run~fail.cpp ;
+    run run~fail-note.cpp ;
+    run run~fail-warn.cpp ;
+    run run~note.cpp ;
+    run run~pass.cpp ;
+    run run~warn.cpp ;
+    run run~warn-note.cpp ;
+    
+    run-fail run-fail~compile-fail.cpp ;
+    run-fail run-fail~fail.cpp ;
+    run-fail run-fail~fail-warn.cpp ;
+    run-fail run-fail~pass.cpp ;
+    run-fail run-fail~warn.cpp ;
 }
 }

+ 10 - 0
tools/regression/test/compile-fail~fail.cpp

@@ -0,0 +1,10 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+int main() { return 0; }
+

+ 4 - 0
tools/regression/test/compile-fail.cpp → tools/regression/test/compile-fail~pass.cpp

@@ -2,4 +2,8 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #error example of a compile failure
 #error example of a compile failure

+ 9 - 0
tools/regression/test/compile~fail.cpp

@@ -0,0 +1,9 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+#error example of a compile failure

+ 9 - 0
tools/regression/test/compile~pass.cpp

@@ -0,0 +1,9 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+int main() { return 0; }

+ 4 - 0
tools/regression/test/run-pass-warn.cpp → tools/regression/test/compile~warn.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 // provoke one or more compiler warnings
 // provoke one or more compiler warnings
 
 
 int main(int argc, char * argv[] )
 int main(int argc, char * argv[] )

+ 9 - 0
tools/regression/test/run-fail~compile-fail.cpp

@@ -0,0 +1,9 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+#error example of a compile failure

+ 4 - 0
tools/regression/test/run_fail-fail-warn.cpp → tools/regression/test/run-fail~fail-warn.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 int main()
 int main()
 {
 {
   short s;
   short s;

+ 4 - 0
tools/regression/test/run_fail-fail.cpp → tools/regression/test/run-fail~fail.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 int main()
 int main()
 {
 {
   return 0;
   return 0;

+ 4 - 0
tools/regression/test/run-fail.cpp → tools/regression/test/run-fail~pass.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 4 - 0
tools/regression/test/run_fail-pass-warn.cpp → tools/regression/test/run-fail~warn.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 0 - 11
tools/regression/test/run_fail-pass.cpp

@@ -1,11 +0,0 @@
-//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
-//  Software License, Version 1.0. (See accompanying file
-//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <iostream>
-
-int main()
-{
-  std::cout << "example of output from a run-time failure\n";
-  return 1;
-}

+ 9 - 0
tools/regression/test/run~compile-fail.cpp

@@ -0,0 +1,9 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+#error example of a compile failure

+ 4 - 0
tools/regression/test/run-note-fail.cpp → tools/regression/test/run~fail-note.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 4 - 0
tools/regression/test/run-fail-warn.cpp → tools/regression/test/run~fail-warn.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 14 - 0
tools/regression/test/run~fail.cpp

@@ -0,0 +1,14 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+#include <iostream>
+
+int main()
+{
+  return 1;
+}

+ 4 - 0
tools/regression/test/run-note-pass.cpp → tools/regression/test/run~note.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 4 - 0
tools/regression/test/run-pass.cpp → tools/regression/test/run~pass.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 int main()
 int main()
 {
 {
   return 0;
   return 0;

+ 4 - 0
tools/regression/test/run-note-warn.cpp → tools/regression/test/run~warn-note.cpp

@@ -2,6 +2,10 @@
 //  Software License, Version 1.0. (See accompanying file
 //  Software License, Version 1.0. (See accompanying file
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
 #include <iostream>
 #include <iostream>
 
 
 int main()
 int main()

+ 18 - 0
tools/regression/test/run~warn.cpp

@@ -0,0 +1,18 @@
+//  (C) Copyright Beman Dawes 2003.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  Test naming convention: the portion of the name before the tilde ("~")
+//  identifies the bjam test type. The portion after the tilde
+//  identifies the correct result to be reported by compiler_status.
+
+// provoke one or more compiler warnings
+
+int main(int argc, char * argv[] )
+{
+  short s;
+  unsigned long ul;
+  s = s & ul; // warning from many compilers
+  if ( s == ul ) {} // warning from GCC
+  return 0;
+}

粤ICP备19079148号