Closed
Bug 1149285
Opened 9 years ago
Closed 9 years ago
Add a DeserializedEdge gmock matcher and use it in the gtests for DeserializedNode's ubi::node
Categories
(DevTools :: Memory, defect)
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
3.35 KB,
patch
|
vporof
:
review+
|
Details | Diff | Splinter Review |
(In reply to Jim Blandy :jimb from bug 1024774 comment #167) > @@ +63,5 @@ > > + edge1.referent = referent1->id; > > + mocked.addEdge(Move(edge1)); > > + EXPECT_CALL(mocked, > > + getEdgeReferent(Field(&DeserializedEdge::referent, > > + referent1->id))) > > For the future, it'd be nice to add a DeserializedEdge matcher to > DevTools.h. Then we could just say exactly what we mean.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfitzgerald
Assignee | ||
Updated•9 years ago
|
Has STR: --- → irrelevant
Assignee | ||
Updated•9 years ago
|
Blocks: memory-testing
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8683877 -
Flags: review?(vporof)
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=96facaa9168c
Comment 3•9 years ago
|
||
Comment on attachment 8683877 [details] [diff] [review] Abstract out edge matching with a custom gmock matcher Review of attachment 8683877 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/shared/heapsnapshot/tests/gtest/DeserializedNodeUbiNodes.cpp @@ +64,5 @@ > nullptr, > 10)); > DeserializedEdge edge1(referent1->id); > mocked.addEdge(Move(edge1)); > + EXPECT_CALL(mocked, getEdgeReferent(EdgeTo(referent1->id))) Whoa EXPECT_CALL is cool. ::: devtools/shared/heapsnapshot/tests/gtest/DevTools.h @@ +280,5 @@ > > +// Matches an edge whose referent is the node with the given id. > +MATCHER_P(EdgeTo, id, "") { > + return Matcher<const DeserializedEdge&>(Field(&DeserializedEdge::referent, id)) > + .MatchAndExplain(arg, result_listener); All of the code in here is gorgeous.
Attachment #8683877 -
Flags: review?(vporof) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 5•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/55759fa6f9dc
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•