MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / TEST

Function TEST

test/Overall_scan/QMachine/CBitFactory.test.cpp:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "gtest/gtest.h"
4
5USING_QPANDA
6
7
8TEST(CBitFactoryInfaceTest, test) {
9 CBitFactory cbitFac = CBitFactory::GetFactoryInstance();
10 auto cbit = cbitFac.CreateCBitFromName("c1");
11 EXPECT_STREQ("c1", cbit->getName().c_str());
12
13 cbit->setOccupancy(true);
14 EXPECT_TRUE(cbit->getOccupancy());
15
16 EXPECT_EQ(1,cbit->get_addr());
17
18
19}

Callers

nothing calls this directly

Calls 5

CreateCBitFromNameMethod · 0.80
get_addrMethod · 0.80
getNameMethod · 0.45
setOccupancyMethod · 0.45
getOccupancyMethod · 0.45

Tested by

no test coverage detected