Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
581 B
28 lines
581 B
9 years ago
|
/**
|
||
|
* @fileoverview Description of this file.
|
||
|
*/
|
||
|
|
||
|
goog.require('goog.testing.asserts');
|
||
|
|
||
|
var global = Function('return this')();
|
||
|
|
||
|
// The Google Closure assert functions start with assert, eg.
|
||
|
// assertThrows
|
||
|
// assertNotThrows
|
||
|
// assertTrue
|
||
|
// ...
|
||
|
//
|
||
|
// The one exception is the "fail" function.
|
||
|
function shouldExport(str) {
|
||
|
return str.lastIndexOf('assert') === 0 || str == 'fail';
|
||
|
}
|
||
|
|
||
|
for (var key in global) {
|
||
|
if ((typeof key == "string") && global.hasOwnProperty(key) &&
|
||
|
shouldExport(key)) {
|
||
|
exports[key] = global[key];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
exports.COMPILED = COMPILED
|