testsuite fix

Mike Stump mikestump@comcast.net
Tue Feb 9 01:51:00 GMT 2016


I’m running the pretty printer test cases on a target with status wrappers, and that system works by printing the return code on that output.  It is dependent upon the last line being terminated by “\n”, as the code that looks for the return code requires the return code at the start of a line.

The below patch added newlines to the ends of all files, so that the status wrappers always work.

Ok?


$ git diff
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
index e217f42..9851f4f 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
@@ -20,6 +20,7 @@
 
 #include <tuple>
 #include <string>
+#include <iostream>
 
 int
 main()
@@ -30,6 +31,7 @@ main()
   std::tuple<std::string, int, std::tuple<>> t2{ "Johnny", 5, {} };
 // { dg-final { regexp-test t2 {std::(__7::)?tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = {<std::(__7::)?tuple<>> = empty std::(__7::)?tuple, <No data fields>}}} } }
 
+  std::cout << "\n";
   return 0; // Mark SPOT
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
index 90f9a62..3bfe53b 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
@@ -144,6 +144,7 @@ main()
   use(uoms);
   use(uptr->s);
 
+  std::cout << "\n";
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc
index 4384321..941f2dc 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc
@@ -93,6 +93,7 @@ main()
   __gnu_cxx::slist<int>::iterator slliter = sll.begin();
 // { dg-final { note-test slliter {47} } }
 
+  std::cout << "\n";
   return 0;                    // Mark SPOT
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc
index fb64ed8..dc852c5 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc
@@ -26,6 +26,7 @@
 #include <experimental/string_view>
 #include <string>
 #include <map>
+#include <iostream>
 
 using std::experimental::any;
 using std::experimental::optional;
@@ -66,6 +67,7 @@ main()
   any am = *om;
 // { dg-final { note-test am {std::experimental::any containing std::map with 3 elements = {[1] = 2, [3] = 4, [5] = 6}} } }
 
+  std::cout << "\n";
   return 0;                    // Mark SPOT
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
index bc2c9c5..013bc0d 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc
@@ -77,6 +77,7 @@ main()
   use(wp1);
   use(wp2);
 
+  std::cout << "\n";
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
index 4bc8403..5f98b25 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
@@ -96,6 +96,7 @@ main()
   __gnu_cxx::slist<int>::iterator slliter = sll.begin();
 // { dg-final { note-test slliter {47} } }
 
+  std::cout << "\n";
   return 0;                    // Mark SPOT
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
index db80ea8..86a3de5 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc
@@ -93,6 +93,7 @@ main()
   __gnu_cxx::slist<int>::iterator slliter = sll.begin();
 // { dg-final { note-test slliter {47} } }
 
+  std::cout << "\n";
   return 0;                    // Mark SPOT
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/tr1.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/tr1.cc
index a0b83fd..52dca4d 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/tr1.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/tr1.cc
@@ -84,6 +84,7 @@ main()
   use(eums);
   use(uoms);
 
+  std::cout << "\n";
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc
index 48774eb..8f9a1f8 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/whatis.cc
@@ -286,6 +286,7 @@ main()
   placeholder(&unord2_ptr);
   placeholder(&unord2_holder);
 
+  std::cout << "\n";
   return 0;
 }
 



More information about the Libstdc++ mailing list