summaryrefslogtreecommitdiff
path: root/test/unit/context/context_black.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-08-23 16:28:21 -0700
committerAina Niemetz <aina.niemetz@gmail.com>2018-08-23 16:28:21 -0700
commit11a34205808098e503f145b2a779078dd509729e (patch)
treebd4a69d62192273d4de237d8c7252448cef41c95 /test/unit/context/context_black.h
parent860ae582f334bea2835806b0d5044ca1b6e90d76 (diff)
Add missing overrides in unit tests (#2362)
Diffstat (limited to 'test/unit/context/context_black.h')
-rw-r--r--test/unit/context/context_black.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h
index 63b60edc9..b4be4197c 100644
--- a/test/unit/context/context_black.h
+++ b/test/unit/context/context_black.h
@@ -36,12 +36,10 @@ struct MyContextNotifyObj : public ContextNotifyObj {
ContextNotifyObj(context, pre),
nCalls(0) {
}
-
- virtual ~MyContextNotifyObj() {}
- void contextNotifyPop() {
- ++nCalls;
- }
+ ~MyContextNotifyObj() override {}
+
+ void contextNotifyPop() override { ++nCalls; }
};
class MyContextObj : public ContextObj {
@@ -75,18 +73,15 @@ public:
nSaves(0) {
}
- virtual ~MyContextObj() {
- destroy();
- }
+ ~MyContextObj() override { destroy(); }
- ContextObj* save(ContextMemoryManager* pcmm) {
+ ContextObj* save(ContextMemoryManager* pcmm) override
+ {
++nSaves;
return new(pcmm) MyContextObj(*this);
}
- void restore(ContextObj* contextObj) {
- nCalls = notify.nCalls;
- }
+ void restore(ContextObj* contextObj) override { nCalls = notify.nCalls; }
void makeCurrent() {
ContextObj::makeCurrent();
@@ -99,17 +94,13 @@ private:
Context* d_context;
-public:
+ public:
+ void setUp() override { d_context = new Context; }
- void setUp() {
- d_context = new Context;
- }
-
- void tearDown() {
- delete d_context;
- }
+ void tearDown() override { delete d_context; }
- void testContextPushPop() {
+ void testContextPushPop()
+ {
// Test what happens when the context is popped below 0
// the interface doesn't declare any exceptions
d_context->push();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback