[libcxx-commits] [libcxx] aac2de1 - [libc++] Remove unnecessary usage of <iostream> in the test suite

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 2 10:00:52 PDT 2020


Author: Louis Dionne
Date: 2020-10-02T13:00:34-04:00
New Revision: aac2de1b1af07448483f8cdb3a588b9504def9ac

URL: https://github.com/llvm/llvm-project/commit/aac2de1b1af07448483f8cdb3a588b9504def9ac
DIFF: https://github.com/llvm/llvm-project/commit/aac2de1b1af07448483f8cdb3a588b9504def9ac.diff

LOG: [libc++] Remove unnecessary usage of <iostream> in the test suite

Tests should strive to be as minimal as possible, since it makes them
relevant on platforms where <iostream> does not work.

Added: 
    

Modified: 
    libcxx/test/support/private_constructor.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/support/private_constructor.h b/libcxx/test/support/private_constructor.h
index 69411a8d9ad7..24f540c6a7fd 100644
--- a/libcxx/test/support/private_constructor.h
+++ b/libcxx/test/support/private_constructor.h
@@ -6,10 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __PRIVATE_CONSTRUCTOR__H
-#define __PRIVATE_CONSTRUCTOR__H
-
-#include <iostream>
+#ifndef TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
+#define TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
 
 struct PrivateConstructor {
 
@@ -25,6 +23,4 @@ bool operator < ( const PrivateConstructor &lhs, const PrivateConstructor &rhs )
 bool operator < ( const PrivateConstructor &lhs, int rhs ) { return lhs.get() < rhs; }
 bool operator < ( int lhs, const PrivateConstructor &rhs ) { return lhs < rhs.get(); }
 
-std::ostream & operator << ( std::ostream &os, const PrivateConstructor &foo ) { return os << foo.get (); }
-
-#endif
+#endif // TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H


        


More information about the libcxx-commits mailing list