Line | |
---|
1 | #include "gtest/gtest.h"
|
---|
2 | #include "ariba/utility/system/SystemQueue.h"
|
---|
3 |
|
---|
4 | using namespace ::testing;
|
---|
5 | using namespace ariba::utility;
|
---|
6 |
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Tests if the SystemQueue is initialized empty and not running.
|
---|
10 | */
|
---|
11 | TEST(SystemQueue, Instantiation)
|
---|
12 | {
|
---|
13 | SystemQueue& sysq = SystemQueue::instance();
|
---|
14 |
|
---|
15 | EXPECT_FALSE( sysq.isRunning() );
|
---|
16 | EXPECT_TRUE( sysq.isEmpty() );
|
---|
17 | }
|
---|
18 |
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Tests whether calling the SystemQueue::instance() always returns the same object.
|
---|
22 | *
|
---|
23 | * NOTE: This is an easy case, since this is the same compile unit..
|
---|
24 | * But can't hurt to test it anyway.
|
---|
25 | */
|
---|
26 | TEST(SystemQueue, Singleton)
|
---|
27 | {
|
---|
28 | SystemQueue& sysq = SystemQueue::instance();
|
---|
29 | SystemQueue& sysq2 = SystemQueue::instance();
|
---|
30 |
|
---|
31 | // cout << &sysq << endl;
|
---|
32 | ASSERT_TRUE( &sysq == &sysq2 );
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.