forked from xuezhulian/Coverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcovinfomodel.py
33 lines (27 loc) · 875 Bytes
/
lcovinfomodel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python
__author__ = "yuencong"
__date__ = "2019-03-20"
__license__ = "GPL"
class LcovInfo:
def __init__(self):
self.classinfos = set()
def lcovclassinfo(self,classname):
for classinfo in self.classinfos:
if classinfo.classname == classname:
return classinfo
classinfo = LcovClassInfo(classname)
self.classinfos.add(classinfo)
return classinfo
def description(self):
print '---------- LCOV INFO'
for classinfo in self.classinfos:
classinfo.description()
class LcovClassInfo:
def __init__(self,classname):
self.classname = classname
self.hitlines = set()
self.nohitlines = set()
def description(self):
print '---------- LCOV CLASS NAME:%s'%self.classname
print '---------- LCOV CLASS HIT LINES:%s'%self.hitlines
print '---------- LCOV CLASS NO HIT LINES:%s'%self.nohitlines