Index: ext/googletest/googletest/scripts/gen_gtest_pred_impl.py =================================================================== diff -u -N -r4a481bbe77043e0bda2435c6d62a02700b3e46c5 -r3d5880c6661c3ed500e0c1c739a923ae9ede0364 --- ext/googletest/googletest/scripts/gen_gtest_pred_impl.py (.../gen_gtest_pred_impl.py) (revision 4a481bbe77043e0bda2435c6d62a02700b3e46c5) +++ ext/googletest/googletest/scripts/gen_gtest_pred_impl.py (.../gen_gtest_pred_impl.py) (revision 3d5880c6661c3ed500e0c1c739a923ae9ede0364) @@ -115,11 +115,10 @@ #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ -// Makes sure this header is not included before gtest.h. -#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ -# error Do not include gtest_pred_impl.h directly. Include gtest.h instead. -#endif // GTEST_INCLUDE_GTEST_GTEST_H_ +#include "gtest/gtest.h" +namespace testing { + // This header implements a family of generic predicate assertion // macros: // @@ -295,16 +294,17 @@ return """ +} // namespace testing + #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ """ def GenerateFile(path, content): - """Given a file path and a content string, overwrites it with the - given content.""" - + """Given a file path and a content string + overwrites it with the given content. + """ print 'Updating file %s . . .' % path - f = file(path, 'w+') print >>f, content, f.close() @@ -314,8 +314,8 @@ def GenerateHeader(n): """Given the maximum arity n, updates the header file that implements - the predicate assertions.""" - + the predicate assertions. + """ GenerateFile(HEADER, HeaderPreamble(n) + ''.join([ImplementationForArity(i) for i in OneTo(n)])