From 63baab8924f589fdfd934ae24613e59f8d3ef635 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 14:31:56 -0400 Subject: [PATCH 1/3] Move instructions into custom/README files --- .../include/gmock/internal/custom/README.md | 16 ++++++ .../gmock/internal/custom/gmock-matchers.h | 4 +- .../gmock/internal/custom/gmock-port.h | 11 +--- .../include/gtest/internal/custom/README.md | 56 +++++++++++++++++++ .../gtest/internal/custom/gtest-port.h | 35 +----------- .../gtest/internal/custom/gtest-printers.h | 4 +- .../include/gtest/internal/custom/gtest.h | 10 +--- 7 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 googlemock/include/gmock/internal/custom/README.md create mode 100644 googletest/include/gtest/internal/custom/README.md diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md new file mode 100644 index 00000000..ef5f9bf4 --- /dev/null +++ b/googlemock/include/gmock/internal/custom/README.md @@ -0,0 +1,16 @@ +# Customization Points + +The custom directory is an injection point for custom user configurations. + +## Header gmock-port.h + +The following macros can be defined: + +### Flag related macros: + +* GMOCK_DECLARE_bool_(name) +* GMOCK_DECLARE_int32_(name) +* GMOCK_DECLARE_string_(name) +* GMOCK_DEFINE_bool_(name, default_val, doc) +* GMOCK_DEFINE_int32_(name, default_val, doc) +* GMOCK_DEFINE_string_(name, default_val, doc) diff --git a/googlemock/include/gmock/internal/custom/gmock-matchers.h b/googlemock/include/gmock/internal/custom/gmock-matchers.h index 227d91f6..14aafaab 100644 --- a/googlemock/include/gmock/internal/custom/gmock-matchers.h +++ b/googlemock/include/gmock/internal/custom/gmock-matchers.h @@ -27,9 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// ============================================================ -// An installation-specific extension point for gmock-matchers.h. -// ============================================================ +// Injection point for custom user configurations. See README for details // // GOOGLETEST_CM0002 DO NOT DELETE diff --git a/googlemock/include/gmock/internal/custom/gmock-port.h b/googlemock/include/gmock/internal/custom/gmock-port.h index ad9ae36f..0030fe91 100644 --- a/googlemock/include/gmock/internal/custom/gmock-port.h +++ b/googlemock/include/gmock/internal/custom/gmock-port.h @@ -27,16 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// Flag related macros: -// GMOCK_DECLARE_bool_(name) -// GMOCK_DECLARE_int32_(name) -// GMOCK_DECLARE_string_(name) -// GMOCK_DEFINE_bool_(name, default_val, doc) -// GMOCK_DEFINE_int32_(name, default_val, doc) -// GMOCK_DEFINE_string_(name, default_val, doc) +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md new file mode 100644 index 00000000..e39b7c6e --- /dev/null +++ b/googletest/include/gtest/internal/custom/README.md @@ -0,0 +1,56 @@ +# Customization Points + +The custom directory is an injection point for custom user configurations. + +## Header gtest.h + +### The following macros can be defined: + +* GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of + OsStackTraceGetterInterface. +* GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). See + testing::TempDir for semantics and signature. + +## Header gtest-port.h + +The following macros can be defined: + +### Flag related macros: + +* GTEST_FLAG(flag_name) +* GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its own + flagfile flag parsing. +* GTEST_DECLARE_bool_(name) +* GTEST_DECLARE_int32_(name) +* GTEST_DECLARE_string_(name) * +* GTEST_DEFINE_bool_(name, default_val, doc) +* GTEST_DEFINE_int32_(name, default_val, doc) +* GTEST_DEFINE_string_(name, default_val, doc) + +### Logging: + +* GTEST_LOG_(severity) +* GTEST_CHECK_(condition) +* Functions LogToStderr() and FlushInfoLog() have to be provided too. + +### Threading: + +* GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. +* GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are + already provided. Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and + GTEST_DEFINE_STATIC_MUTEX_(mutex) +* GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) +* GTEST_LOCK_EXCLUDED_(locks) + +### Underlying library support features + +* GTEST_HAS_CXXABI_H_ + +### Exporting API symbols: + +* GTEST_API_ - Specifier for exported symbols. + +## Header gtest-printers.h + +* See documentation at gtest/gtest-printers.h for details on how to define a + custom printer. diff --git a/googletest/include/gtest/internal/custom/gtest-port.h b/googletest/include/gtest/internal/custom/gtest-port.h index aa5da295..cd85d956 100644 --- a/googletest/include/gtest/internal/custom/gtest-port.h +++ b/googletest/include/gtest/internal/custom/gtest-port.h @@ -27,40 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// Flag related macros: -// GTEST_FLAG(flag_name) -// GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its -// own flagfile flag parsing. -// GTEST_DECLARE_bool_(name) -// GTEST_DECLARE_int32_(name) -// GTEST_DECLARE_string_(name) -// GTEST_DEFINE_bool_(name, default_val, doc) -// GTEST_DEFINE_int32_(name, default_val, doc) -// GTEST_DEFINE_string_(name, default_val, doc) -// -// Logging: -// GTEST_LOG_(severity) -// GTEST_CHECK_(condition) -// Functions LogToStderr() and FlushInfoLog() have to be provided too. -// -// Threading: -// GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. -// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are -// already provided. -// Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and -// GTEST_DEFINE_STATIC_MUTEX_(mutex) -// -// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) -// GTEST_LOCK_EXCLUDED_(locks) -// -// Underlying library support features: -// GTEST_HAS_CXXABI_H_ -// -// Exporting API symbols: -// GTEST_API_ - Specifier for exported symbols. +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/gtest-printers.h b/googletest/include/gtest/internal/custom/gtest-printers.h index 60c1ea05..eb4467ab 100644 --- a/googletest/include/gtest/internal/custom/gtest-printers.h +++ b/googletest/include/gtest/internal/custom/gtest-printers.h @@ -31,8 +31,8 @@ // installation of gTest. // It will be included from gtest-printers.h and the overrides in this file // will be visible to everyone. -// See documentation at gtest/gtest-printers.h for details on how to define a -// custom printer. +// +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/gtest.h b/googletest/include/gtest/internal/custom/gtest.h index 6f7c5e40..4c8e07be 100644 --- a/googletest/include/gtest/internal/custom/gtest.h +++ b/googletest/include/gtest/internal/custom/gtest.h @@ -27,15 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of -// OsStackTraceGetterInterface. -// -// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). -// See testing::TempDir for semantics and -// signature. +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** From 9060e19c87d6a041b3f31b172b300a833cc28109 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 16:23:17 -0400 Subject: [PATCH 2/3] formatting for new READMEs --- .../include/gmock/internal/custom/README.md | 12 ++--- .../include/gtest/internal/custom/README.md | 44 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md index ef5f9bf4..76969a7e 100644 --- a/googlemock/include/gmock/internal/custom/README.md +++ b/googlemock/include/gmock/internal/custom/README.md @@ -8,9 +8,9 @@ The following macros can be defined: ### Flag related macros: -* GMOCK_DECLARE_bool_(name) -* GMOCK_DECLARE_int32_(name) -* GMOCK_DECLARE_string_(name) -* GMOCK_DEFINE_bool_(name, default_val, doc) -* GMOCK_DEFINE_int32_(name, default_val, doc) -* GMOCK_DEFINE_string_(name, default_val, doc) +* `GMOCK_DECLARE_bool_(name)` +* `GMOCK_DECLARE_int32_(name)` +* `GMOCK_DECLARE_string_(name)` +* `GMOCK_DEFINE_bool_(name, default_val, doc)` +* `GMOCK_DEFINE_int32_(name, default_val, doc)` +* `GMOCK_DEFINE_string_(name, default_val, doc)` diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md index e39b7c6e..3a2b8855 100644 --- a/googletest/include/gtest/internal/custom/README.md +++ b/googletest/include/gtest/internal/custom/README.md @@ -6,9 +6,9 @@ The custom directory is an injection point for custom user configurations. ### The following macros can be defined: -* GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of +* `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of OsStackTraceGetterInterface. -* GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). See +* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for testing::TempDir(). See testing::TempDir for semantics and signature. ## Header gtest-port.h @@ -17,38 +17,38 @@ The following macros can be defined: ### Flag related macros: -* GTEST_FLAG(flag_name) -* GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its own - flagfile flag parsing. -* GTEST_DECLARE_bool_(name) -* GTEST_DECLARE_int32_(name) -* GTEST_DECLARE_string_(name) * -* GTEST_DEFINE_bool_(name, default_val, doc) -* GTEST_DEFINE_int32_(name, default_val, doc) -* GTEST_DEFINE_string_(name, default_val, doc) +* `GTEST_FLAG(flag_name)` +* `GTEST_USE_OWN_FLAGFILE_FLAG_` - Define to 0 when the system provides its + own flagfile flag parsing. +* `GTEST_DECLARE_bool_(name)` +* `GTEST_DECLARE_int32_(name)` +* `GTEST_DECLARE_string_(name)` +* `GTEST_DEFINE_bool_(name, default_val, doc)` +* `GTEST_DEFINE_int32_(name, default_val, doc)` +* `GTEST_DEFINE_string_(name, default_val, doc)` ### Logging: -* GTEST_LOG_(severity) -* GTEST_CHECK_(condition) -* Functions LogToStderr() and FlushInfoLog() have to be provided too. +* `GTEST_LOG_(severity)` +* `GTEST_CHECK_(condition)` +* Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too. ### Threading: -* GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. -* GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are - already provided. Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and - GTEST_DEFINE_STATIC_MUTEX_(mutex) -* GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) -* GTEST_LOCK_EXCLUDED_(locks) +* `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. +* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if Mutex and ThreadLocal are + already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` and + `GTEST_DEFINE_STATIC_MUTEX_(mutex)` +* `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` +* `GTEST_LOCK_EXCLUDED_(locks)` ### Underlying library support features -* GTEST_HAS_CXXABI_H_ +* `GTEST_HAS_CXXABI_H_` ### Exporting API symbols: -* GTEST_API_ - Specifier for exported symbols. +* `GTEST_API_` - Specifier for exported symbols. ## Header gtest-printers.h From c203bee2457e9d098fcca3b136dc8316c4f63bdb Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 22:45:53 -0400 Subject: [PATCH 3/3] formatting custom/README.md --- .../include/gmock/internal/custom/README.md | 2 +- .../include/gtest/internal/custom/README.md | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md index 76969a7e..f6c93f61 100644 --- a/googlemock/include/gmock/internal/custom/README.md +++ b/googlemock/include/gmock/internal/custom/README.md @@ -2,7 +2,7 @@ The custom directory is an injection point for custom user configurations. -## Header gmock-port.h +## Header `gmock-port.h` The following macros can be defined: diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md index 3a2b8855..ff391fb4 100644 --- a/googletest/include/gtest/internal/custom/README.md +++ b/googletest/include/gtest/internal/custom/README.md @@ -2,16 +2,16 @@ The custom directory is an injection point for custom user configurations. -## Header gtest.h +## Header `gtest.h` ### The following macros can be defined: * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of - OsStackTraceGetterInterface. -* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for testing::TempDir(). See - testing::TempDir for semantics and signature. + `OsStackTraceGetterInterface`. +* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See + `testing::TempDir` for semantics and signature. -## Header gtest-port.h +## Header `gtest-port.h` The following macros can be defined: @@ -36,9 +36,9 @@ The following macros can be defined: ### Threading: * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. -* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if Mutex and ThreadLocal are - already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` and - `GTEST_DEFINE_STATIC_MUTEX_(mutex)` +* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal` + are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` + and `GTEST_DEFINE_STATIC_MUTEX_(mutex)` * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` * `GTEST_LOCK_EXCLUDED_(locks)` @@ -50,7 +50,7 @@ The following macros can be defined: * `GTEST_API_` - Specifier for exported symbols. -## Header gtest-printers.h +## Header `gtest-printers.h` -* See documentation at gtest/gtest-printers.h for details on how to define a +* See documentation at `gtest/gtest-printers.h` for details on how to define a custom printer.