Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Issue 2703173002: PRESUBMIT: Add check for UNIT_TEST use in .cc files. (Closed)

Created:
3 years, 10 months ago by kjellander_webrtc
Modified:
3 years, 7 months ago
Reviewers:
kwiberg-webrtc
CC:
webrtc-reviews_webrtc.org, qiang.lu, niklas.enbom, yujie_mao (webrtc), peah-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

PRESUBMIT: Add check for UNIT_TEST use in .cc files. Copy of Chromium's check in https://cs.chromium.org/chromium/src/PRESUBMIT.py?rcl=22f522e10dd7a816ec45547fd35a6fa0356b3d21&l=416 BUG=None NOTRY=True

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M PRESUBMIT.py View 2 chunks +18 lines, -0 lines 3 comments Download

Messages

Total messages: 6 (2 generated)
kjellander_webrtc
3 years, 10 months ago (2017-02-20 07:24:06 UTC) #2
kwiberg-webrtc
Good idea, but some nits. And also, do we have any other preprocessor symbols that ...
3 years, 10 months ago (2017-02-20 08:44:46 UTC) #3
kjellander_webrtc
hmm, now I don't remember why I even created this CL. I cannot find anything ...
3 years, 7 months ago (2017-05-11 11:37:48 UTC) #4
kwiberg-webrtc
3 years, 7 months ago (2017-05-11 12:27:06 UTC) #6
Message was sent while issue was closed.
On 2017/05/11 11:37:48, kjellander_webrtc wrote:
> hmm, now I don't remember why I even created this CL.
> I cannot find anything by looking at the old Chromium commits either:
> https://chromiumcodereview.appspot.com/10572054
> 
> I'll just close this instead.

IIRC, the preprocessor symbol UNIT_TEST is defined when compiling unit tests but
not otherwise, and it's not safe to make use of it in .cc files because... I
think it might be that UNIT_TEST is set only for the compilation units where we
compile *_unittest.cc. So in .cc files, UNIT_TEST is either always set or always
unset.

Powered by Google App Engine
This is Rietveld 408576698