Skip to content

Commit 024893d

Browse files
committed
add googletest-1.12.1
1 parent adefc5a commit 024893d

File tree

20,123 files changed

+278765
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

20,123 files changed

+278765
-1
lines changed

googletest-1.12.1/data/back.png

919 Bytes
Loading

googletest-1.12.1/data/codebrowser.js

+1,379
Large diffs are not rendered by default.

googletest-1.12.1/data/common.css

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
@import "jquery/jquery-ui.css";
2+
3+
/* layout */
4+
body { color:#000000; background-color:#ffffff; padding:0; margin: 0; font-family: Helvetica,sans-serif; }
5+
a { color: #037; border: none; text-decoration: none }
6+
a:hover{ text-decoration: underline }
7+
8+
div#header { position:fixed; top:0; left:0; right:0; background-color: #f5f5f5; z-index:2; height: 5.2em; overflow: clip; }
9+
div#header+hr {position:fixed; top:5.2em; left:0; right:0; z-index:2}
10+
div#header input {-webkit-appearance:searchfield;-moz-appearance:searchfield;appearance:searchfield;}
11+
div#content { margin-top: 5.3em; }
12+
13+
/* Fixme: We could experiment around with max-height: 90 vh? */
14+
#allSideBoxes {
15+
position:fixed; margin-top:1ex; top:5.2em; right:10px; z-index:1;
16+
max-height:30em;
17+
}
18+
.sideBox {
19+
padding:1ex; border-radius:0.5ex; overflow:hide; font-size:smaller; margin-bottom:1em;
20+
max-height:100%;
21+
}
22+
.sideBox h3 { text-align:center; width:100%; cursor: pointer; cursor: hand; margin: 0;}
23+
.sideBox ul {
24+
display:block; overflow:auto; max-width:20em; max-height:20em; list-style:none; margin: 0; padding: 1em;
25+
}
26+
.sideBox li {
27+
list-style-type: none; padding: 0; margin-right: 1ex;
28+
}
29+
30+
.code { border-collapse:collapse; width:100%; padding:0 }
31+
.code { font-family: monospace; }
32+
table.code{ table-layout:fixed; width: 100% } /* This improves performence. The idea is that the second column just overflows */
33+
.code th { width:6.5ex; padding-right:1ex; background-color:#eeeeee ;
34+
text-align:right; color:black; font-weight:normal;
35+
-moz-user-select: none; user-select: none; }
36+
.code td { padding-left: 1ex; white-space: pre }
37+
38+
#footer { font-size: smaller; margin:1ex; color: #333; text-align: right }
39+
#footer img { vertical-align: middle; }
40+
img { border: none; }
41+
input#searchline { margin: 1ex; width: 30em; max-width: 50%; }
42+
#breadcrumb { padding:0; margin: 0 1ex 2ex 1ex; font-size:inherit; font-weight: normal }
43+
hr { margin: 0; border-collapse:collapse; background-color: #e5e5e5; height:1px;border:none; }
44+
p#options { font-size: small; position: absolute; right:1ex; top:48px; margin: 0 1ex 0 0 }
45+
a.logo { float:right }
46+
#breadcrumb_symbol a { color:inherit }
47+
48+
#tooltip {
49+
position:absolute;
50+
display:none;
51+
padding:1em;
52+
padding-top:1ex;
53+
border: 1px solid gray;
54+
background-color: white;
55+
font-size: smaller;
56+
opacity: 0.9;
57+
border-radius: 4px;
58+
max-width: 80%;
59+
box-shadow:1px 1px 7px gray;
60+
z-index:2;
61+
}
62+
#tooltip ul { margin:0; padding-left: 1em }
63+
#tooltip a.showuse {color:inherit; text-decoration:underline}
64+
#tooltip b a { color:inherit }
65+
#tooltip abbr { cursor: help; border-bottom: 1px dashed #000; }
66+
/*#tooltip li { border: 1px solid blue; margin:0 }*/
67+
68+
p.warnmsg { color: #a00; padding: 0 1ex; margin: 0.3ex 0; }
69+
70+
.code a { text-decoration:none; color:inherit }
71+
.code a:hover { text-decoration: none }
72+
73+
.error { border-bottom: 1px dashed red }
74+
.warning { border-bottom: 1px dotted #c90; }
75+
76+
#tooltip i { color: #888; white-space: pre-wrap; font-family: monospace }
77+
#tooltip .ppcond { color: #063; white-space: pre-wrap; font-family: monospace; font-weight:bold }
78+
#tooltip .ppcond a { font-weight: normal; color:inherit }
79+
80+
/* disable the keywords in strings (macro have that) */
81+
.code .string em, .code .string b, .code .string var { color:inherit; font-style:inherit; font-weight:inherit; }
82+
83+
/* Old Macro expansions.*/
84+
.expansion { display: none; }
85+
86+
.fake { display: inline-block; position:relative; bottom: 0.7em; opacity: 0.8; font-size:small }
87+
.fake::before { content: "\2380"; }
88+
.refarg::before { display: inline-block; position:relative; bottom: 0.7em;
89+
opacity: 0.8; font-size:x-small; color: gray; content: "&"; }
90+
91+
@media only screen and (max-width: 30em) {
92+
.code {font-size: smaller;}
93+
p#options {display:none;}
94+
#breadcrumb span { display:none; }
95+
/* This makes sure that there is no horizontal scrollbar on mobile.
96+
Mobile users can use tab to scroll, and google does not consider we are mobile-ready otherwise */
97+
div#content { overflow-x:auto; }
98+
}
99+
@media only screen and (max-width: 60em) {
100+
#allSideBoxes { display: none;}
101+
.inlayHint {
102+
font-size: smaller;
103+
border-radius: 3px;
104+
border: 1px solid #d9d9d9;
105+
-webkit-user-select: none; /* Safari */
106+
-moz-user-select: none; /* Firefox */
107+
-ms-user-select: none; /* IE10+/Edge */
108+
user-select: none; /* Standard */
109+
}

googletest-1.12.1/data/folder.png

560 Bytes
Loading

googletest-1.12.1/data/indexscript.js

+250
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
/****************************************************************************
2+
* Copyright (C) 2012-2016 Woboq GmbH
3+
* Olivier Goffart <contact at woboq.com>
4+
* https://woboq.com/codebrowser.html
5+
*
6+
* This file is part of the Woboq Code Browser.
7+
*
8+
* Commercial License Usage:
9+
* Licensees holding valid commercial licenses provided by Woboq may use
10+
* this file in accordance with the terms contained in a written agreement
11+
* between the licensee and Woboq.
12+
* For further information see https://woboq.com/codebrowser.html
13+
*
14+
* Alternatively, this work may be used under a Creative Commons
15+
* Attribution-NonCommercial-ShareAlike 3.0 (CC-BY-NC-SA 3.0) License.
16+
* http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US
17+
* This license does not allow you to use the code browser to assist the
18+
* development of your commercial software. If you intent to do so, consider
19+
* purchasing a commercial licence.
20+
****************************************************************************/
21+
22+
23+
$(function() {
24+
// ATTENTION: Keep in sync with C++ function of the same name in filesystem.cpp and `Generator::escapeAttrForFilename`
25+
var replace_invalid_filename_chars = function (str) {
26+
if(window.ecma_script_api_version && window.ecma_script_api_version >= 2) {
27+
return str.replace(new RegExp(':', 'g'), '.');
28+
}
29+
30+
return str;
31+
}
32+
33+
// remove trailing slash
34+
root_path = root_path.replace(/\/$/, "");
35+
if(!root_path) root_path = ".";
36+
37+
38+
//compute the length of the common prefix between two strings
39+
// (copied from codebrowser.js)
40+
var prefixLen = function( s1 , s2) {
41+
var maxMatchLen = Math.min(s1.length, s2.length);
42+
var res = -1;
43+
while (++res < maxMatchLen) {
44+
if (s1.charAt(res) != s2.charAt(res))
45+
break;
46+
}
47+
return res * 256 + 256 - s1.length;
48+
}
49+
50+
// Google text search (different than codebrowser.js)
51+
var text_search = function(text) {
52+
var location = "" + (window.location);
53+
window.location = "http://google.com/search?sitesearch=" + encodeURIComponent(location) + "&q=" + encodeURIComponent(text);
54+
}
55+
56+
var fileIndex = [];
57+
var searchTerms = {}
58+
var functionDict = {};
59+
var file = path;
60+
61+
var searchline = $("input#searchline");
62+
63+
//BEGIN copied from codebrowser.js
64+
65+
// callback for jqueryui's autocomple activate
66+
var activate = function(event,ui) {
67+
var val = ui.item.value;
68+
var type = searchTerms[val] && searchTerms[val].type;
69+
if (type == "file") {
70+
window.location = root_path + '/' + searchTerms[val].file + ".html";
71+
} else if (type == "ref") {
72+
var ref = searchTerms[val].ref;
73+
var url = root_path + "/refs/" + replace_invalid_filename_chars(ref);
74+
$.get(url, function(data) {
75+
var res = $("<data>"+data+"</data>");
76+
var def = res.find("def");
77+
var result = { len: -1 };
78+
def.each( function() {
79+
var cur = { len : -1,
80+
f : $(this).attr("f"),
81+
l : $(this).attr("l") }
82+
83+
cur.len = prefixLen(cur.f, file)
84+
if (cur.len >= result.len) {
85+
result = cur;
86+
result.isMarcro = ($(this).attr("macro"));
87+
}
88+
});
89+
90+
if (result.len >= 0) {
91+
var newloc = root_path + "/" + result.f + ".html#" +
92+
(result.isMarcro ? result.l : ref );
93+
window.location = newloc;
94+
}
95+
});
96+
} else {
97+
text_search(val);
98+
}
99+
};
100+
101+
var getFnNameKey = function (request) {
102+
if (request.indexOf('/') != -1 || request.indexOf('.') != -1)
103+
return false;
104+
var mx = request.match(/::([^:]{2})[^:]*$/);
105+
if (mx)
106+
return mx[1].toLowerCase().replace(/[^a-z]/, '_');
107+
request = request.replace(/^:*/, "");
108+
if (request.length < 2)
109+
return false;
110+
var k = request.substr(0, 2).toLowerCase();
111+
return k.replace(/[^a-z]/, '_')
112+
}
113+
114+
var autocomplete = function(request, response) {
115+
var term = $.ui.autocomplete.escapeRegex(request.term);
116+
var rx1 = new RegExp(term, 'i');
117+
var rx2 = new RegExp("(^|::)"+term.replace(/^:*/, ''), 'i');
118+
var functionList = [];
119+
var k = getFnNameKey(request.term)
120+
if (k && Object.prototype.hasOwnProperty.call(functionDict,k)) {
121+
functionList = functionDict[k].filter(
122+
function(word) { return word.match(rx2) });
123+
}
124+
var l = fileIndex.filter( function(word) { return word.match(rx1); });
125+
l = l.concat(functionList);
126+
l = l.slice(0,1000); // too big lists are too slow
127+
response(l);
128+
};
129+
130+
searchline.autocomplete( {source: autocomplete, select: activate, minLength: 4 } );
131+
132+
searchline.keypress(function(e) {
133+
var value = searchline.val();
134+
if(e.which == 13) {
135+
activate({}, { item: { value: value } });
136+
}
137+
});
138+
139+
// When the content changes, fetch the list of function that starts with ...
140+
searchline.on('input', function() {
141+
var value = $(this).val();
142+
var k = getFnNameKey(value);
143+
if (k && !Object.prototype.hasOwnProperty.call(functionDict, k)) {
144+
functionDict[k] = []
145+
$.get(root_path + '/fnSearch/' + k, function(data) {
146+
var list = data.split("\n");
147+
for (var i = 0; i < list.length; ++i) {
148+
var sep = list[i].indexOf('|');
149+
var ref = list[i].slice(0, sep);
150+
var name = list[i].slice(sep+1);
151+
searchTerms[name] = { type:"ref", ref: ref };
152+
functionDict[k].push(name);
153+
}
154+
if (searchline.is(":focus")) {
155+
searchline.autocomplete("search", searchline.val());
156+
}
157+
});
158+
}
159+
});
160+
161+
// Pasting should show the autocompletion
162+
searchline.on("paste", function() { setTimeout(function() {
163+
searchline.autocomplete("search", searchline.val());
164+
}, 0);
165+
});
166+
167+
//END copied from codebrowser.js
168+
169+
170+
$.get(root_path + '/fileIndex', function(data) {
171+
var list = data.split("\n");
172+
list.sort();
173+
174+
fileIndex = list;
175+
for (var i = 0; i < list.length; ++i) {
176+
searchTerms[list[i]] = { type:"file", file: list[i] };
177+
}
178+
179+
180+
function openFolder() {
181+
var t = $(this);
182+
var state = {};
183+
if (history)
184+
state = history.state || state;
185+
if (!this._opened) {
186+
this._opened = true;
187+
var p = t.attr("data-path") + "/";
188+
var subPath = path=="" ? p : p.substr(path.length);
189+
t.text("[-]");
190+
var content = $("<table/>");
191+
var dict = {};
192+
var toOpenNow = [];
193+
for (var i=0; i < fileIndex.length; ++i) {
194+
var f = fileIndex[i];
195+
if (f.indexOf(p) == 0) {
196+
var sl = f.indexOf('/', p.length + 1);
197+
198+
if (sl !== -1) {
199+
var name = f.substr( p.length, sl - p.length);
200+
if (dict[name])
201+
continue;
202+
dict[name] = true;
203+
content.append("<tr><td class='folder'><a class='opener' data-path='" + p + name + "' href='"+subPath + name+"'>[+]</a> " +
204+
"<a href='" + subPath + name + "/'>" + name + "/</a></td></tr>\n");
205+
if (state[p+name])
206+
toOpenNow.push(p+name);
207+
} else {
208+
var name = f.substr(p.length);
209+
content.append("<tr><td class='file'> <a href='" + subPath + name + ".html'>" + name + "</a></td></tr>\n");
210+
}
211+
}
212+
}
213+
content.find(".opener").click(openFolder);
214+
t.parent().append(content);
215+
state[t.attr("data-path")]=true;
216+
toOpenNow.forEach(function(toOpen) {
217+
var e = $("a[data-path='"+toOpen+"']").get(0)
218+
if (e)
219+
openFolder.call(e);
220+
});
221+
} else {
222+
t.parent().find("> table").empty();
223+
t.text("[+]");
224+
this._opened = false;
225+
state[t.attr("data-path")]=false;
226+
}
227+
if (history && history.replaceState)
228+
history.replaceState(state, undefined);
229+
return false;
230+
}
231+
232+
$(".opener").click(openFolder);
233+
var state;
234+
if (history)
235+
state = history.state;
236+
if (state) {
237+
$(".opener").each(function(e) {
238+
if (state[$(this).attr("data-path")])
239+
openFolder.call(this);
240+
});
241+
}
242+
});
243+
244+
$("#footer").before("<div id='whatisit'><h3>What is this ?</h3><p>This is an online code browser that allows you to browse C/C++ code just like in your IDE, "
245+
+ "with <b>semantic highlighting</b> and contextual <b>tooltips</b> that show you the usages and cross references.<br/>"
246+
+ "Open a C or C++ file and try it by hovering over the symbols!<br />"
247+
+ "Or take the <a href='https://woboq.com/codebrowser-features.html'>feature tour</a>."
248+
+ "</p></div>")
249+
});
250+

0 commit comments

Comments
 (0)