MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / TEST

Function TEST

src/utilities/core/test/UUID_GTest.cpp:23–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using std::stringstream;
22
23TEST(UUID, Constuctors) {
24 // default constructor should be null
25 UUID null;
26 EXPECT_TRUE(null.isNull());
27
28 // created UUID is not null
29 UUID uuid = createUUID();
30 EXPECT_FALSE(uuid.isNull());
31
32 // copy UUID
33 UUID uuid2(uuid);
34 EXPECT_FALSE(uuid2.isNull());
35 EXPECT_TRUE(uuid == uuid2);
36
37 // from string
38 string str = toString(uuid);
39 UUID uuid3 = toUUID(str);
40 EXPECT_FALSE(uuid3.isNull());
41 EXPECT_TRUE(uuid == uuid3);
42
43 // from bad string
44 UUID uuid4 = toUUID(std::string("Not a UUID"));
45 EXPECT_TRUE(uuid4.isNull());
46}
47
48TEST(UUID, BigSet) {
49 // create a bunch of uuids, insert into set, make sure no uuids collided

Callers

nothing calls this directly

Calls 7

createUUIDFunction · 0.85
toUUIDFunction · 0.85
removeBracesFunction · 0.85
isNullMethod · 0.80
toStringFunction · 0.50
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected