Searched refs:lines (Results 1 - 20 of 20) sorted by relevance

/gem5/ext/googletest/googlemock/scripts/generator/cpp/
H A Dgmock_class.py128 lines = []
139 lines.extend(['namespace %s {' % n for n in class_node.namespace]) # }
140 lines.append('')
151 lines.append('template <' + ', '.join(template_decls) + '>')
155 lines.append('class Mock%s : public %s {' # }
157 lines.append('%spublic:' % (' ' * (_INDENT // 2)))
160 _GenerateMethods(lines, source, class_node)
163 if lines:
165 if len(lines) == 2:
166 del lines[
[all...]
H A Dgmock_class_test.py37 def StripLeadingWhitespace(self, lines):
38 """Strip leading whitespace in each line in 'lines'."""
39 return '\n'.join([s.lstrip() for s in lines.split('\n')])
41 def assertEqualIgnoreLeadingWhitespace(self, expected_lines, lines):
43 self.assertEqual(expected_lines, self.StripLeadingWhitespace(lines))
49 """Convert C++ source to Google Mock output source lines."""
323 lines = gmock_class._GenerateMocks(filename, cpp_source, ast_list, None)
324 return '\n'.join(lines)
/gem5/util/
H A Dfind_copyrights.py15 def find_copyright_block(lines, lang_type):
18 for i,line in enumerate(lines):
33 for i,line in enumerate(lines):
50 for i,line in enumerate(lines):
126 def get_data(lang_type, lines):
129 for start,end in find_copyright_block(lines, lang_type):
130 joined = ''.join(lines[start:end+1])
149 line = lines[i]
158 line = lines[j].strip()
243 lines
[all...]
H A Don-chip-network-power-area.py160 lines = string.split(subprocess.check_output(
162 assert len(lines) >= 1
165 [l1,l2,l3] = lines[0].partition(" ")
H A Dgem5img.py136 lines = out.splitlines()
137 # Make sure the first few lines of the output look like what we expect.
138 assert(lines[0][0] == '#')
139 assert(lines[1] == 'unit: sectors')
140 assert(lines[2] == '')
142 chunks = lines[3].split()
H A Dhgstyle.py72 lines = mdiff.splitnewlines(file_data)
77 # only the lines that are new in both
81 mod_regions.append(0, len(lines))
/gem5/ext/googletest/googletest/scripts/
H A Dpump.py163 def StartsWith(lines, pos, string):
164 """Returns True iff the given position in lines starts with 'string'."""
166 return lines[pos.line][pos.column:].startswith(string)
174 # We found regex in lines
186 def FindFirst(lines, token_table, cursor):
187 """Finds the first occurrence of any string in strings in lines."""
191 for line in lines[start.line:]:
202 return MakeToken(lines, found_start, found_end, token_type)
204 # We failed to find str in lines
208 def SubString(lines, star
[all...]
H A Dcommon.py47 """Runs the shell command and returns its stdout as a list of lines."""
50 lines = [line.strip() for line in f.readlines()]
52 return lines
H A Dupload.py513 lines = []
515 lines.append('--' + BOUNDARY)
516 lines.append('Content-Disposition: form-data; name="%s"' % key)
517 lines.append('')
518 lines.append(value)
520 lines.append('--' + BOUNDARY)
521 lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' %
523 lines.append('Content-Type: %s' % GetContentType(filename))
524 lines.append('')
525 lines
[all...]
/gem5/ext/googletest/googlemock/scripts/
H A Dupload.py513 lines = []
515 lines.append('--' + BOUNDARY)
516 lines.append('Content-Disposition: form-data; name="%s"' % key)
517 lines.append('')
518 lines.append(value)
520 lines.append('--' + BOUNDARY)
521 lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' %
523 lines.append('Content-Type: %s' % GetContentType(filename))
524 lines.append('')
525 lines
[all...]
/gem5/ext/ply/doc/
H A Dmakedoc.py71 lines = data.splitlines() variable
78 for s in lines:
/gem5/util/style/
H A Dverifiers.py262 lines = list(f)
267 for i,line in enumerate(lines):
383 lines = [ l.rstrip('\n') for l in old ]
384 language = lang_type(filename, lines[0])
385 sort_lines = list(self.sort_includes(lines, filename, language))
424 self.ui.write("Warning: cannot automatically fix overly long lines.\n")
H A Dsort_includes.py222 def __call__(self, lines, filename, language):
251 for line in lines:
261 # Skip empty lines while processing includes
/gem5/ext/ply/ply/
H A Dcpp.py256 # Given an input string, this function splits it into lines. Trailing whitespace
264 lines = [x.rstrip() for x in input.splitlines()]
265 for i in xrange(len(lines)):
267 while lines[i].endswith('\\') and (j < len(lines)):
268 lines[i] = lines[i][:-1]+lines[j]
269 lines[j] = ""
272 input = "\n".join(lines)
[all...]
H A Dlex.py836 lines = f.readlines()
846 for l in lines:
H A Dyacc.py187 # a tuple of (startline,endline) representing the range of lines
2724 # Split the doc string into lines
2837 lines = f.readlines()
2843 for linen,l in enumerate(lines):
/gem5/src/python/m5/util/
H A Dcode_formatter.py269 lines = format[:i].splitlines(True)
270 colno = i - reduce(lambda x,y: x+y, (len(z) for z in lines))
271 lineno = len(lines)
/gem5/util/minorview/
H A Dview.py371 lines = list(inst.table_line() for inst in insts)
382 for line in lines:
386 for line in lines:
416 line = lines[i]
H A Dmodel.py399 'lines': Id,
518 """Find instructions/lines mentioned in the blob's event
556 self.lines = {}
596 self.lines[line.id.lineSeqNum] = line
622 return self.lines.get(key, None)
1029 for lines which are None"""
1035 '\' and dropping lines that start with '#'s"""
1038 # Discard comment lines
/gem5/ext/googletest/googletest/src/
H A Dgtest.cc1198 // lines prefixed with ' ' for no change, '-' for deletion and '+' for
1273 std::vector<std::string> lines; local
1284 lines.push_back(str.substr(start, i - start - 1));
1291 lines.push_back(str.substr(start, end - start));
1292 return lines;
5264 std::vector<std::string> lines; local
5265 SplitString(contents, '\n', &lines);
5266 for (size_t i = 0; i < lines.size(); ++i) {
5267 if (lines[i].empty())
5269 if (!ParseGoogleTestFlag(lines[
[all...]

Completed in 69 milliseconds