mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Toenshoff" <toensh...@me.com>
Subject Re: Review Request 40142: Corrected include order for gtest and gmock according to Styleguide.
Date Wed, 11 Nov 2015 01:00:40 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40142/#review106002
-----------------------------------------------------------

Ship it!


Given that gmock ist not (and never should be, according to its authors) installed on the
user machine but used as bundled dependencies, this could be done using quotation-marks;

```
#include "gmock/gmock.h"
```

However, the differences of sharp brackets and quotation-marks appears to be pretty much implementation
specific, when looking at the standard. 

>6.10.2 Source file inclusion
>Constraints

>1 A #include directive shall identify a header or source file that can be processed by
the
>implementation.
>Semantics

>2 A preprocessing directive of the form
># include <h-char-sequence> new-line
>searches a sequence of implementation-defined places for a header identified uniquely
by
>the specified sequence between the < and > delimiters, and causes the replacement
of that
>directive by the entire contents of the header. How the places are specified or the header
>identified is implementation-defined.

>3 A preprocessing directive of the form
># include "q-char-sequence" new-line
>causes the replacement of that directive by the entire contents of the source file identified
>by the specified sequence between the " delimiters. The named source file is searched
>for in an implementation-defined manner. If this search is not supported, or if the search
>fails, the directive is reprocessed as if it read
># include <h-char-sequence> new-line
>with the identical contained sequence (including > characters, if any) from the original
>directive

So our Mesos practice is not defined by standard limitations as the standard leaves pretty
much everything to the implementation. On the other hand, the Mesos practice is definitely
not uncommon - Xcode for example recommends using quotes for "user headers" and brackets for
anthing else. For this specific case of a bundled but not installable dependency, I think
we should stick with sharp brackets as this will allow quick recognition of non Mesos headers.

Thanks for this, Joerg!

- Till Toenshoff


On Nov. 10, 2015, 6:30 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40142/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2015, 6:30 p.m.)
> 
> 
> Review request for mesos and Jan Schlicht.
> 
> 
> Bugs: MESOS-3879
>     https://issues.apache.org/jira/browse/MESOS-3879
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Corrected include order for gtest and gmock according to Styleguide.
> 
> 
> Diffs
> -----
> 
>   src/tests/common/http_tests.cpp 8f63a2125b94646eac2a65d687508cdcbf239c1c 
>   src/tests/common/recordio_tests.cpp db5e5c9d7241ba2d5d9486a9299177dfb0c505c7 
>   src/tests/containerizer.hpp dfa2c5bf733e944f2c22a36d0c071470dc90083d 
>   src/tests/containerizer/composing_containerizer_tests.cpp d66f5198114c7bd67107ee056c2062d3118d1b4c

>   src/tests/containerizer/docker_containerizer_tests.cpp 4bb65afd0ee61cafef68e064a697fdce65d60058

>   src/tests/containerizer/external_containerizer_test.cpp 4f152a4b01a8ea3d6c07aaef13319c67e0d6f99f

>   src/tests/containerizer/isolator_tests.cpp a7072124c7e5cf38ed41779c2d9e023e089bf28f

>   src/tests/containerizer/port_mapping_tests.cpp 73634f88b3fc46fce66b17259c5f90b8d1c86f86

>   src/tests/containerizer/provisioner_docker_tests.cpp 9227666868801335003aeb0fa21e6b8f0e94f2cb

>   src/tests/containerizer/sched_tests.cpp 00723d01cd2cc37410d6f9fdd2de080063b7ccd8 
>   src/tests/credentials_tests.cpp 9d9de814bb1617d64f57dbf9425fe1e8135d2f46 
>   src/tests/environment.hpp 9cf14bcc8f7d386f6aa26b686d3f953c969aaf63 
>   src/tests/environment.cpp fd6ac2f88ef8f694c2a19018b6b4e4e34f08bd72 
>   src/tests/fault_tolerance_tests.cpp 3e353e42e1051ff3d9e3be3707ff6bc7b5f348c8 
>   src/tests/fetcher_cache_tests.cpp 0b3245105b4c1efae54f0bc34f672290819a6f0b 
>   src/tests/gc_tests.cpp 35701706bb16ff33d38d0dc6594bde0e011590f5 
>   src/tests/group_tests.cpp 13e89c33617997aac2024a3de7beedb2fb28e03c 
>   src/tests/hierarchical_allocator_tests.cpp d422448606403fb39b077513ff73c6b9d41d2765

>   src/tests/log_tests.cpp 4ff7a6a425dfa672f680b7072cbafad05b6249bf 
>   src/tests/main.cpp 970a8b06e1c04cb6545353c8d36f5707c153d49b 
>   src/tests/master_allocator_tests.cpp 52fa472cbf764e0ed1dd334336f69774eb8c702b 
>   src/tests/master_authorization_tests.cpp 0d1f2b5d9ce1a998651798624238f635aeac4995 
>   src/tests/master_contender_detector_tests.cpp 84652b1fb57d36b3a7f05beda0a2af179c3ca3e8

>   src/tests/master_slave_reconciliation_tests.cpp 7b0b983cae090ca5166d9fb1905fff88d3f21600

>   src/tests/master_tests.cpp a754e3b3e78c639a473f79c1b24c505cc47ba1a9 
>   src/tests/master_validation_tests.cpp 1dff6a353442cabe2eed9c136f30668d01305e25 
>   src/tests/partition_tests.cpp 6a6524e98d552b8107a765563e1c3f4140805bc3 
>   src/tests/reconciliation_tests.cpp d9dde93e14b143a01cf9af055df081f4d034e080 
>   src/tests/registrar_zookeeper_tests.cpp 29832b43cb8c6d201ebdba6f268d7dfaddd9caa2 
>   src/tests/reservation_tests.cpp 4bc2b313572a8cd76fa798ac745c319a7c11df0e 
>   src/tests/scheduler_driver_tests.cpp 4963f5d672737e4bb8f173f0cbd6c504a5d91b71 
>   src/tests/scheduler_event_call_tests.cpp 898cbbb58ac5391b8bd0cb94012410014cc3a606 
>   src/tests/scheduler_tests.cpp 0afeca377dd422865cc9615c85a14b65512dfa6a 
>   src/tests/slave_recovery_tests.cpp 648babec6307127ff28692de7c4868af3ac123a3 
>   src/tests/slave_tests.cpp ddd01104d044b54664b3b1eefdde3f73b8f6d598 
>   src/tests/sorter_tests.cpp 0db9a046007c1e89edb2af1e5d63cbc40934e2af 
>   src/tests/state_tests.cpp 7cee17ddeeb0bf6a9f08d990031e2fbb14a10126 
>   src/tests/status_update_manager_tests.cpp 82a985518276ac1015056a450634429840607524

>   src/tests/teardown_tests.cpp 89eb3144b458c8d3fe2b9bca03f93ac352f99f4b 
>   src/tests/zookeeper.hpp ed341125595f3cb766af3d2c05e57b306a9e464e 
>   src/tests/zookeeper.cpp 6ce008fbd1dda1fce10cd45e2d4d6051e1fc5a41 
>   src/tests/zookeeper_tests.cpp 7d1c0665f06e067637861424aa647d6e4d3f9c85 
> 
> Diff: https://reviews.apache.org/r/40142/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message