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

Add additional tests to cover more cases

[SVN r29343]
Beman Dawes 21 лет назад
Родитель
Сommit
8ff6cee303

+ 16 - 0
tools/regression/test/run-fail-warn.cpp

@@ -0,0 +1,16 @@
+//  (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()
+{
+  short s;
+  unsigned long ul;
+  s = s & ul; // warning from many compilers
+  if ( s == ul ) {} // warning from GCC
+
+  std::cout << "example of output from a run-time failure\n";
+  return 1;
+}

+ 12 - 0
tools/regression/test/run_fail-fail-warn.cpp

@@ -0,0 +1,12 @@
+//  (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)
+
+int main()
+{
+  short s;
+  unsigned long ul;
+  s = s & ul; // warning from many compilers
+  if ( s == ul ) {} // warning from GCC
+  return 0;
+}

+ 8 - 0
tools/regression/test/run_fail-fail.cpp

@@ -0,0 +1,8 @@
+//  (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)
+
+int main()
+{
+  return 0;
+}

+ 16 - 0
tools/regression/test/run_fail-pass-warn.cpp

@@ -0,0 +1,16 @@
+//  (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()
+{
+  short s;
+  unsigned long ul;
+  s = s & ul; // warning from many compilers
+  if ( s == ul ) {} // warning from GCC
+
+  std::cout << "example of output from a run-time failure\n";
+  return 1;
+}

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

@@ -0,0 +1,11 @@
+//  (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;
+}

粤ICP备19079148号