Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
2142e8e6
Commit
2142e8e6
authored
Dec 05, 2011
by
Yoshitaka Aharen
Browse files
[trac510] Modify testcase incrementCounterItem as suggested on
ticket #510.
parent
402c03af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/statistics/tests/counter_unittest.cc
View file @
2142e8e6
...
...
@@ -58,6 +58,17 @@ TEST_F(CounterTest, incrementCounterItem) {
EXPECT_EQ
(
counter
.
get
(
ITEM1
),
1
);
EXPECT_EQ
(
counter
.
get
(
ITEM2
),
2
);
EXPECT_EQ
(
counter
.
get
(
ITEM3
),
3
);
// Increment counters once more
counter
.
inc
(
ITEM1
);
counter
.
inc
(
ITEM2
);
counter
.
inc
(
ITEM2
);
counter
.
inc
(
ITEM3
);
counter
.
inc
(
ITEM3
);
counter
.
inc
(
ITEM3
);
// Check if the counters have expected values
EXPECT_EQ
(
counter
.
get
(
ITEM1
),
2
);
EXPECT_EQ
(
counter
.
get
(
ITEM2
),
4
);
EXPECT_EQ
(
counter
.
get
(
ITEM3
),
6
);
}
TEST_F
(
CounterTest
,
invalidCounterSize
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment