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

Issue 345753007: Preprend Test to test function name generated by DEF_TEST() macro. (Closed)

Created:
6 years, 6 months ago by tfarina
Modified:
6 years, 6 months ago
Reviewers:
mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Preprend Test to test function name generated by DEF_TEST() macro. That way when declaring a test with DEF_TEST() macro, you don't have to uniquify the test name because it might colide with the class it is being testing. For example, if you are testing SkBase64 and do: DEF_TEST(SkBase64, reporter) { } That will generate an error because the macro will declare a function named SkBase64 which colides with the type SkBase64. By adding Test to the function name we avoid this problem. Fixed the entries found with the following command line: $ git grep "Test, r" | grep DEF BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Committed: https://skia.googlesource.com/skia/+/9ea53f93e79ba312c4b3943923450a8b4aa57c82

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 2

Patch Set 3 : test_ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -47 lines) Patch
M tests/GrBinHashKeyTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/GrContextFactoryTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/GrOrderedSetTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/GrRedBlackTreeTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/GrSurfaceTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/GrTBSearchTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageFilterTest.cpp View 3 chunks +3 lines, -5 lines 0 comments Download
M tests/RecordingTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/SkBase64Test.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/Test.h View 1 2 1 chunk +33 lines, -33 lines 0 comments Download
M tests/UnitTestTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
tfarina
6 years, 6 months ago (2014-06-23 16:49:27 UTC) #1
mtklein
https://codereview.chromium.org/345753007/diff/20001/tests/Test.h File tests/Test.h (right): https://codereview.chromium.org/345753007/diff/20001/tests/Test.h#newcode142 tests/Test.h:142: static void Test##name(skiatest::Reporter*); \ Let's do test_##name to match ...
6 years, 6 months ago (2014-06-23 17:18:21 UTC) #2
tfarina
https://codereview.chromium.org/345753007/diff/20001/tests/Test.h File tests/Test.h (right): https://codereview.chromium.org/345753007/diff/20001/tests/Test.h#newcode142 tests/Test.h:142: static void Test##name(skiatest::Reporter*); \ On 2014/06/23 17:18:21, mtklein wrote: ...
6 years, 6 months ago (2014-06-23 22:47:32 UTC) #3
mtklein
On 2014/06/23 22:47:32, tfarina wrote: > https://codereview.chromium.org/345753007/diff/20001/tests/Test.h > File tests/Test.h (right): > > https://codereview.chromium.org/345753007/diff/20001/tests/Test.h#newcode142 > ...
6 years, 6 months ago (2014-06-24 00:28:14 UTC) #4
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 6 months ago (2014-06-24 13:35:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tfarina@chromium.org/345753007/40001
6 years, 6 months ago (2014-06-24 13:35:36 UTC) #6
commit-bot: I haz the power
6 years, 6 months ago (2014-06-24 13:50:48 UTC) #7
Message was sent while issue was closed.
Change committed as 9ea53f93e79ba312c4b3943923450a8b4aa57c82

Powered by Google App Engine
This is Rietveld 408576698