Discontinue repository (#143)
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 11e5fe7..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-# Generated by pub
-.dart_tool/
-.packages
-pubspec.lock
-
-# Other generated files
-benchmark/data/pubspec.link.yaml
-benchmark/data/pubspec.link.lock
-benchmark/data/hostname.txt
-benchmark/data/latest_vm.pb.json
-benchmark/lib/generated
-out
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index ad8dd94..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-language: dart
-sudo: false
-
-# Only run one instance of the formatter and the analyzer, rather than running
-# them against each Dart version.
-matrix:
- include:
- - dart: dev
- dart_task: dartfmt
- - dart: dev
- env: PROTOC_VERSION=3.0.0
- install: ./tool/travis/setup.sh
- script: ./tool/travis/test.sh
- - dart: dev
- env: PROTOC_VERSION=3.3.0
- install: ./tool/travis/setup.sh
- script: ./tool/travis/analyze.sh
- - dart: stable
- env: PROTOC_VERSION=3.3.0
- install: ./tool/travis/setup.sh
- script: ./tool/travis/analyze.sh
- - dart: dev
- env: PROTOC_VERSION=3.3.0
- install: ./tool/travis/setup.sh
- script: ./tool/travis/test.sh
- - dart: stable
- env: PROTOC_VERSION=3.3.0
- install: ./tool/travis/setup.sh
- script: ./tool/travis/test.sh
-
-branches:
- only: [master]
-
-cache:
- directories:
- - $HOME/.pub-cache
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 7c12ae6..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-# Below is a list of people and organizations that have contributed
-# to the Dart project. Names should be added to the list like so:
-#
-# Name/Organization <email address>
-
-Google Inc.
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 3f25578..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,276 +0,0 @@
-## 0.12.0
-
-* Breaking change: Handle identifiers starting with a leading underscore.
- This covers message names, enum names, enum value identifiers and file names.
-
- Before, these would appear in the generated Dart code as private identifiers.
- Now the underscore is moved to the end.
-
- Field names and extension field names already had all underscores removed, and these are not
- affected by this change.
-
- If there is a conflicting name with a trailing underscore defined later in the same scope, a
- disambiguation will happen that can potentially lead to existing identifiers getting a new name in
- the generated Dart.
-
- For example:
-
- ```
- message _Foo {}
- message Foo_ {}
- ```
-
- `_Foo` will get the name `Foo_` and `Foo_` will now end up being called `Foo__`.
-
-## 0.11.0
-
-* Breaking change: Support for [map fields](https://developers.google.com/protocol-buffers/docs/proto3#maps)
- Generated files require package:protobuf version 0.10.5 or newer.
- Protobuf map fields such as:
-
- message Foo {
- map<int32, string> map_field = 1;
- }
- are now no longer represented as List<Foo_MapFieldEntry> but as Map<int, String>.
-
- All code handling these fields needs to be updated.
-
-## 0.10.5
-
-* Generated files now import `dart:async` with a prefix to prevent name
- collisions.
-
-## 0.10.4
-
-* Change the fully qualified message name of generated messages to use
- `BuilderInfo.qualifiedMessageName`.
- Requires package:protobuf version 0.10.4 or newer.
-
-## 0.10.3
-
-* Remove runtime `as` check of enum `valueOf` by using correctly typed `Map` of
- values.
- Generated files must require package:protobuf version 0.10.3 or newer.
-
-## 0.10.2
-
-* Add link to source file in generated code.
-
-## 0.10.1
-
-* Prefix generated Dart proto imports by proto file path instead of by package.
- Tighten up member name checks for generated enum classes.
-
-## 0.10.0
-
-* Breaking change: Support for [any](https://developers.google.com/protocol-buffers/docs/proto3#any) messages.
- Generated files require package:protobuf version 0.10.1 or newer.
- `BuilderInfo.messageName` will now be the fully qualified name for generated messages.
-
-## 0.9.0
-
-* Breaking change: Add `copyWith()` to message classes and update `getDefault()` to use `freeze()`.
- Requires package:protobuf version 0.10.0 or newer.
-
-## 0.8.2
-
-* Generated code now imports 'package:protobuf/protobuf.dart' prefixed.
- This avoids name clashes between user defined message names and the protobuf library.
-
-## 0.8.1
-
-* Adjust dependencies to actually be compatible with Dart 2.0 stable.
-
-## 0.8.0+1
-
-* Dart SDK upper constraint raised to declare compatibility with Dart 2.0 stable.
-
-## 0.8.0
-
-* Breaking change: Generated RpcClient stubs use the generic invoke method.
- Requires package:protobuf version 0.8.0 or newer.
-* Dart 2 fixes.
-
-## 0.7.11
-
-* Dart 2 fix.
-
-## 0.7.10
-
-* Small performance tweak for DDC.
-
-## 0.7.9
-
-* Add fast getters for common types.
-* Only pass index instead of tag and index in generated code.
-* Fix uses-dynamic-as-bottom error in generated gRPC code.
-
-## 0.7.8
-
-* Added enumValues to FieldInfo.
-
-## 0.7.7
-
-* Avoid name clashes between import prefix and field names.
-* Avoid name clashes between generated enum and extension class names.
-* Updated gRPC client stub generation to match latest changes to dart-lang/grpc-dart.
-
-## 0.7.6
-
-* Updated gRPC client stub generation to produce code matching latest changes to
- dart-lang/grpc-dart.
-
-## 0.7.5
-
-* Use real generic syntax instead of comment-based.
-* Support 2.0.0 dev SDKs.
-
-## 0.7.4
-
-* Added call options to gRPC client stubs.
-
-## 0.7.3
-
-### gRPC support
-
-* Added gRPC stub generation.
-* Updated descriptor.proto from google/protobuf v3.3.0.
-
-## 0.7.2
-
-* Added CHANGELOG.md
-
-## 0.7.1
-
-* Enable executable for `pub global` usage. Protoc plugin can now be installed by running `pub global activate protoc_plugin`.
-* Ensure generated extension class names don't conflict with message class names.
-* `Function` will soon be a reserved keyword, so don't generate classes with that name.
-* Strong mode tweaks and lint fixes.
-
-## 0.7.0 - Not released
-
-* Change how to customize the Dart name of a field to using a `dart_name` option.
-* Implemented support for adding external mixins to generate Dart protos.
-
-## 0.6.0+1 - Not released
-
-* Fix missing import when an extension uses an enum in the same .proto file.
-
-## 0.6.0 - Not released
-
-* Move protobuf enums to a separate .pbenum.dart file.
-* Move server-side stubs to .pbserver.dart.
-
-## 0.5.2 - Not released
-
-* Generate separate .pbjson.dart files for constants.
-
-## 0.5.1
-
-### Strong mode and Bazel
-
-* Fixed all analyzer diagnostics in strong mode.
-* Added experimental support for Bazel.
-
-## 0.5.0
-
-### Performance improvements
-
-This release requires 0.5.0 of the protobuf library.
-
-* significantly improved performance for getters, setters, and hazzers
-* Each enum type now has a $json constant that contains its metadata.
-
-## 0.4.1
-
-### Fixed imports, $checkItem, $json
-
-* Fixed all warnings, including in generated code.
-* Started generating $checkItem function for verifying the values of repeated fields
-* Fixed service stubs to work when a message is in a different package
-* Started generating JSON constants to get the original descriptor data for services
-
-## 0.4.0
-
-### Getters for message fields changed
-
-This release changes how getters work for message fields, to detect a common mistake.
-
-Previously, the protobuf API didn't report any error for an incorrect usage of setters. For example, if field "foo" is a message field of type Foo, this code would silently have no effect:
-
-var msg = new SomeMessage();
-msg.foo.bar = 123;
-This is because "msg.foo" would call "new Foo()" and return it without saving it.
-
-The example can be fixed like this:
-
-var msg = new SomeMessage();
-msg.foo = new Foo();
-msg.foo.bar = 123;
-Or equivalently:
-
-var msg = new SomeMessage()
- ..foo = (new Foo()..bar = 123);
-Starting in 0.4.0, the default value of "msg.foo" is an immutable instance of Foo. You can read
-the default value of a field the same as before, but writes will throw UnsupportedError.
-
-## 0.3.11
-
-* Fixes issues with reserved names
-
-## 0.3.10
-
-* Adds support for generating stubs from service definitions.
-
-## 0.3.9
-
-* Modify dart_options support so that it supports alternate mixins.
-* Move the experimental map implementation to PbMapMixin
-
-For now, new mixins can only be added using a patch:
-
-* add the new class to the protobuf library
-* add the class to the list in mixin.dart.
-
-## 0.3.8
-
-### Added option for experimental map API
-
-* Changed the Map API so that operator [] and operator []= support dotted keys such as "foo.bar".
-
-This new API is subject to change without notice, but if you want to try it out anyway, see the unit test.
-
-## 0.3.7 - Unreleased
-
-### Added option for experimental map API
-
-* Added an option to have GeneratedMessage subclasses implement Map.
-
-## 0.3.6
-
-### Added writeToJsonMap and mergeFromJsonMap to reservedNames
-
-The 0.3.6 version of the dart-protobuf library added two new functions, so this release changes the protobuf compiler to avoid using them.
-
-## 0.3.5
-
-Protobuf changes for smaller dart2js code, Int64 fixes
-
-This change is paired with https://chromiumcodereview.appspot.com/814213003
-
-Reduces code size for one app by 0.9%
-
-1. Allow constants for the default value to avoid many trivial closures.
-2. Generate and use static M.create() and M.createRepeated() methods on message classes M to ensure there is a shared copy of these closures rather than one copy per use.
-3. Parse Int64 values rather than generate from 'int' to ensure no truncation errors in JavaScript.
-
-## 0.3.4
-
-Parameterize uri resolution and parsing of options, use package:path.
-
-This helps make the compiler more configurable
-to embed it in other systems (like pub transformers)
-
-## 0.3.3
-
-Update the version number
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 8dab68d..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# How to contribute
-
-### Sign our Contributor License Agreement (CLA)
-
-Even for small changes, we ask that you please sign the CLA electronically
-[here](https://developers.google.com/open-source/cla/individual).
-The CLA is necessary because you own the copyright to your changes, even
-after your contribution becomes part of our codebase, so we need your permission
-to use and distribute your code. You can find more details
-[here](https://code.google.com/p/dart/wiki/Contributing).
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index ee99930..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright 2013, the Dart project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of Google Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 6cc1bf2..0000000
--- a/Makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-PLUGIN_SRC = \
- prepend.dart \
- bin/protoc_plugin.dart \
- lib/*.dart \
- lib/src/descriptor.pb.dart \
- lib/src/plugin.pb.dart
-
-OUTPUT_DIR=out
-PLUGIN_NAME=protoc-gen-dart
-PLUGIN_PATH=bin/$(PLUGIN_NAME)
-
-BENCHMARK_PROTOS = $(wildcard benchmark/protos/*.proto)
-
-TEST_PROTO_LIST = \
- _leading_underscores \
- google/protobuf/any \
- google/protobuf/unittest_import \
- google/protobuf/unittest_optimize_for \
- google/protobuf/unittest \
- dart_name \
- enum_extension \
- ExtensionEnumNameConflict \
- ExtensionNameConflict \
- foo \
- import_clash \
- map_api \
- map_api2 \
- map_field \
- mixins \
- multiple_files_test \
- nested_extension \
- non_nested_extension \
- reserved_names \
- duplicate_names_import \
- package1 \
- package2 \
- package3 \
- service \
- service2 \
- service3 \
- toplevel_import \
- toplevel \
- using_any
-TEST_PROTO_DIR=$(OUTPUT_DIR)/protos
-TEST_PROTO_LIBS=$(foreach f, $(TEST_PROTO_LIST), \
- $(TEST_PROTO_DIR)/$(f).pb.dart \
- $(TEST_PROTO_DIR)/$(f).pbenum.dart \
- $(TEST_PROTO_DIR)/$(f).pbserver.dart \
- $(TEST_PROTO_DIR)/$(f).pbjson.dart)
-TEST_PROTO_SRC_DIR=test/protos
-TEST_PROTO_SRCS=$(foreach proto, $(TEST_PROTO_LIST), \
- $(TEST_PROTO_SRC_DIR)/$(proto).proto)
-
-PREGENERATED_SRCS=protos/descriptor.proto protos/plugin.proto protos/dart_options.proto
-
-$(TEST_PROTO_LIBS): $(PLUGIN_PATH) $(TEST_PROTO_SRCS)
- [ -d $(TEST_PROTO_DIR) ] || mkdir -p $(TEST_PROTO_DIR)
- protoc\
- --dart_out=$(TEST_PROTO_DIR)\
- -Iprotos\
- -I$(TEST_PROTO_SRC_DIR)\
- --plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH))\
- $(TEST_PROTO_SRCS)
-
-.PHONY: build-plugin build-benchmark-protos build-benchmarks \
- update-pregenerated protos run-tests clean
-
-build-plugin: $(PLUGIN_PATH)
-
-update-pregenerated: $(PLUGIN_PATH) $(PREGENERATED_SRCS)
- protoc --dart_out=lib/src -Iprotos --plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH)) $(PREGENERATED_SRCS)
- rm lib/src/descriptor.pb{json,server}.dart
- rm lib/src/dart_options.pb{enum,json,server}.dart
- rm lib/src/plugin.pb{enum,json,server}.dart
- dartfmt -w lib/src
-
-protos: $(PLUGIN_PATH) $(TEST_PROTO_LIBS)
- mkdir -p benchmark/lib/generated
- protoc \
- --dart_out=benchmark/lib/generated \
- -Ibenchmark/protos \
- --plugin=protoc-gen-dart=$(realpath $(PLUGIN_PATH)) \
- $(BENCHMARK_PROTOS)
-
-run-tests: protos
- pub run test
-
-clean:
- rm -rf benchmark/lib/generated
- rm -rf $(OUTPUT_DIR)
diff --git a/README.md b/README.md
index 28d1aa3..0eca704 100644
--- a/README.md
+++ b/README.md
@@ -1,127 +1,3 @@
-# Dart plugin for the protoc compiler
+# Dart plugin for the protoc compiler.
-[![Build Status](https://travis-ci.org/dart-lang/dart-protoc-plugin.svg?branch=master)](https://travis-ci.org/dart-lang/dart-protoc-plugin)
-[![pub package](https://img.shields.io/pub/v/protoc_plugin.svg)](https://pub.dartlang.org/packages/protoc_plugin)
-
-This repository provides a plugin for the [protoc
-compiler](https://developers.google.com/protocol-buffers/docs/cpptutorial#compiling-your-protocol-buffers).
-It generates Dart files for working with data in protocol buffers format.
-
-Requirements
-------------
-
-We only support the full [proto2](https://developers.google.com/protocol-buffers/docs/proto)
-schema. Proto3 should work due to backwards compatibility. See
-[this issue list](https://github.com/dart-lang/protobuf/issues?q=is%3Aissue+is%3Aopen+label%3Aproto3)
-for proto3 schema features which are currently missing.
-
-To compile a .proto file, you must use the 'protoc' command which is [installed
-separately](https://developers.google.com/protocol-buffers/docs/downloads).
-Protobuf 3.0.0 or above is required.
-
-The generated files are pure Dart code that run in either in the Dart VM or in a
-browser (using dart2js). They depend the [protobuf Dart
-package](https://pub.dartlang.org/packages/protobuf). A Dart project that
-includes generated files should add "protobuf" to its pubspec.yaml file.
-
-
-How to build and use
---------------------
-
-*Note:* currently the workflow is POSIX-oriented.
-
-To build standalone `protoc` plugin:
-- run `pub install` to install all dependencies
-- Now you can use the plugin either by adding the `bin` directory to your `PATH`,
- or passing it directly with `protoc`'s `--plugin` option.
-
-Please, remember that the plugin is pure Dart script and requires the presence
-of `dart` executable in your `PATH`.
-
-When both the `dart` executable and `bin/protoc-gen-dart` are in the
-`PATH` the protocol buffer compiler can be invoked to generate like this:
-
- $ protoc --dart_out=. test.proto
-
-### Optionally using `pub global`
-
- $ pub global activate protoc_plugin
-
-And then add `.pub-cache/bin` in your home dir to your `PATH` if you haven't already.
-
-This will activate the latest published version of the plugin. If you wish to use a
-local working copy, use
-
- $ pub global activate -s path <path/to/your/dart-protoc-plugin>
-
-
-### Options to control the generated Dart code
-
-The protocol buffer compiler accepts options for each plugin. For the
-Dart plugin, these options are passed together with the `--dart_out`
-option. The individial options are separated using comma, and the
-final output directive is separated from the options using colon. Pass
-options `<option 1>` and `<option 2>` like this:
-
- --dart_out="<option 1>,<option 2>:."
-
-Using protocol buffer libraries to build new libraries
-------------------------------------------------------
-
-The protocol buffer compiler produces several files for each `.proto` file
-it compiles. In some cases this is not exactly what is needed, e.g one
-would like to create new libraries which exposes the objects in these
-libraries or create new librares combining object definitions from
-several `.proto` libraries into one.
-
-The best way to aproach this is to create the new libraries needed and
-re-export the relevant protocol buffer classes.
-
-Say we have the file `m1.proto` with the following content
-
- message M1 {
- optional string a;
- }
-
-and `m2.proto` containing
-
- message M2 {
- optional string b;
- }
-
-Compiling these to Dart will produce two libraries in `m1.pb.dart` and
-`m2.pb.dart`. The following code shows a library M which combines
-these two protocol buffer libraries, exposes the classes `M1` and `M2` and
-adds som additional methods.
-
- library M;
-
- import "m1.pb.dart";
- import "m2.pb.dart";
-
- export "m1.pb.dart" show M1;
- export "m2.pb.dart" show M2;
-
- M1 createM1() => new M1();
- M2 createM2() => new M2();
-
-Hacking
--------
-
-Here are some ways to get protoc:
-
-* Linux: `apt-get install protobuf-compiler`
-* Mac [homebrew](http://brew.sh/): `brew install protobuf`
-
-If the version installed this way doesn't work, an alternative is to
-[compile protoc from source](https://developers.google.com/protocol-buffers/docs/downloads).
-
-Remember to run the tests. That is as easy as `make run-tests`.
-
-Useful references
------------------
-
-* [Main Dart site](https://www.dartlang.org/)
-* [Main protobuf site](https://github.com/google/protobuf)
-* [Protobuf runtime support project](https://github.com/dart-lang/dart-protobuf)
-* [Pub documentation](https://www.dartlang.org/tools/pub/get-started.html)
+This repository has moved to become a package in [http://github.com/dart-lang/protobuf].
diff --git a/analysis_options.yaml b/analysis_options.yaml
deleted file mode 100644
index 1844c97..0000000
--- a/analysis_options.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-#
-# Google internally enforced rules. See README.md for more information,
-# including a list of lints that are intentionally _not_ enforced.
-
-linter:
- rules:
- - avoid_empty_else
- - avoid_relative_lib_imports
- - avoid_return_types_on_setters
- - avoid_types_as_parameter_names
- - control_flow_in_finally
- - no_duplicate_case_values
- - prefer_contains
- - prefer_equal_for_default_values
- - prefer_is_not_empty
- - recursive_getters
- - throw_in_finally
- - unrelated_type_equality_checks
- - use_rethrow_when_possible
- - valid_regexps
diff --git a/benchmark/data/index.dart b/benchmark/data/index.dart
deleted file mode 100644
index 80296fa..0000000
--- a/benchmark/data/index.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.data;
-
-const String latestVMReportName = "latest_vm.pb.json";
-
-// Symbolic links to make these files available in a browser.
-const String pubspecYamlName = "pubspec.link.yaml";
-const String pubspecLockName = "pubspec.link.lock";
-
-const String hostfileName = "hostname.txt";
diff --git a/benchmark/data/skybrian-macbookpro/0.4.2/json_chrome.pb.json b/benchmark/data/skybrian-macbookpro/0.4.2/json_chrome.pb.json
deleted file mode 100644
index 41a1182..0000000
--- a/benchmark/data/skybrian-macbookpro/0.4.2/json_chrome.pb.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/readjson.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":58365,"2":60,"3":{"1":6000}},{"1":50005,"2":50,"3":{"1":5000}},{"1":56095,"2":60,"3":{"1":6000}},{"1":51660,"2":30,"3":{"1":3000}},{"1":53515,"2":60,"3":{"1":6000}},{"1":57395,"2":50,"3":{"1":5000}},{"1":57240,"2":50,"3":{"1":5000}},{"1":57740,"2":60,"3":{"1":6000}},{"1":62385,"2":40,"3":{"1":4000}},{"1":54150,"2":60,"3":{"1":6000}},{"1":54300,"2":60,"3":{"1":6000}},{"1":54345,"2":50,"3":{"1":5000}},{"1":57250,"2":40,"3":{"1":4000}},{"1":55250,"2":60,"3":{"1":6000}},{"1":54500,"2":60,"3":{"1":6000}},{"1":50090,"2":30,"3":{"1":3000}},{"1":55060,"2":60,"3":{"1":6000}},{"1":57545,"2":50,"3":{"1":5000}},{"1":52835,"2":50,"3":{"1":5000}},{"1":59170,"2":40,"3":{"1":4000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":52695,"2":30,"3":{"1":6000}},{"1":66835,"2":50,"3":{"1":10000}},{"1":50585,"2":40,"3":{"1":8000}},{"1":58195,"2":50,"3":{"1":10000}},{"1":58705,"2":50,"3":{"1":10000}},{"1":60530,"2":40,"3":{"1":8000}},{"1":52675,"2":40,"3":{"1":8000}},{"1":62600,"2":50,"3":{"1":10000}},{"1":51200,"2":40,"3":{"1":8000}},{"1":64970,"2":50,"3":{"1":10000}},{"1":58095,"2":50,"3":{"1":10000}},{"1":59305,"2":50,"3":{"1":10000}},{"1":58180,"2":50,"3":{"1":10000}},{"1":51265,"2":40,"3":{"1":8000}},{"1":58135,"2":50,"3":{"1":10000}},{"1":57790,"2":50,"3":{"1":10000}},{"1":58705,"2":50,"3":{"1":10000}},{"1":57685,"2":50,"3":{"1":10000}},{"1":53605,"2":40,"3":{"1":8000}},{"1":59265,"2":50,"3":{"1":10000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":51630,"2":20,"3":{"1":20000}},{"1":51325,"2":20,"3":{"1":20000}},{"1":51055,"2":20,"3":{"1":20000}},{"1":52865,"2":20,"3":{"1":20000}},{"1":50190,"2":20,"3":{"1":20000}},{"1":59285,"2":20,"3":{"1":20000}},{"1":73770,"2":30,"3":{"1":30000}},{"1":74040,"2":30,"3":{"1":30000}},{"1":52495,"2":20,"3":{"1":20000}},{"1":54390,"2":20,"3":{"1":20000}},{"1":74365,"2":30,"3":{"1":30000}},{"1":51815,"2":20,"3":{"1":20000}},{"1":74380,"2":30,"3":{"1":30000}},{"1":73280,"2":30,"3":{"1":30000}},{"1":79475,"2":30,"3":{"1":30000}},{"1":72430,"2":30,"3":{"1":30000}},{"1":74920,"2":30,"3":{"1":30000}},{"1":73115,"2":30,"3":{"1":30000}},{"1":56220,"2":20,"3":{"1":20000}},{"1":73850,"2":30,"3":{"1":30000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":50225,"2":10,"3":{"1":20000}},{"1":51260,"2":10,"3":{"1":20000}},{"1":51010,"2":10,"3":{"1":20000}},{"1":97920,"2":20,"3":{"1":40000}},{"1":60890,"2":10,"3":{"1":20000}},{"1":97425,"2":20,"3":{"1":40000}},{"1":103520,"2":20,"3":{"1":40000}},{"1":96680,"2":20,"3":{"1":40000}},{"1":98375,"2":20,"3":{"1":40000}},{"1":52910,"2":10,"3":{"1":20000}},{"1":54335,"2":10,"3":{"1":20000}},{"1":50940,"2":10,"3":{"1":20000}},{"1":99450,"2":20,"3":{"1":40000}},{"1":98825,"2":20,"3":{"1":40000}},{"1":51720,"2":10,"3":{"1":20000}},{"1":97545,"2":20,"3":{"1":40000}},{"1":99340,"2":20,"3":{"1":40000}},{"1":97970,"2":20,"3":{"1":40000}},{"1":50335,"2":10,"3":{"1":20000}},{"1":55570,"2":10,"3":{"1":20000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":55790,"2":50,"3":{"1":5000}},{"1":55965,"2":50,"3":{"1":5000}},{"1":60570,"2":50,"3":{"1":5000}},{"1":58615,"2":50,"3":{"1":5000}},{"1":53310,"2":50,"3":{"1":5000}},{"1":56820,"2":50,"3":{"1":5000}},{"1":51825,"2":50,"3":{"1":5000}},{"1":53645,"2":50,"3":{"1":5000}},{"1":55255,"2":50,"3":{"1":5000}},{"1":51780,"2":50,"3":{"1":5000}},{"1":56835,"2":50,"3":{"1":5000}},{"1":50570,"2":40,"3":{"1":4000}},{"1":53225,"2":40,"3":{"1":4000}},{"1":53710,"2":50,"3":{"1":5000}},{"1":53230,"2":50,"3":{"1":5000}},{"1":52940,"2":50,"3":{"1":5000}},{"1":51965,"2":50,"3":{"1":5000}},{"1":55040,"2":50,"3":{"1":5000}},{"1":53620,"2":50,"3":{"1":5000}},{"1":50020,"2":40,"3":{"1":4000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":56135,"2":50,"3":{"1":10000}},{"1":55890,"2":50,"3":{"1":10000}},{"1":54535,"2":50,"3":{"1":10000}},{"1":59600,"2":50,"3":{"1":10000}},{"1":54120,"2":50,"3":{"1":10000}},{"1":52665,"2":50,"3":{"1":10000}},{"1":56855,"2":50,"3":{"1":10000}},{"1":52970,"2":50,"3":{"1":10000}},{"1":55755,"2":50,"3":{"1":10000}},{"1":52265,"2":50,"3":{"1":10000}},{"1":55175,"2":50,"3":{"1":10000}},{"1":60135,"2":50,"3":{"1":10000}},{"1":59105,"2":50,"3":{"1":10000}},{"1":58565,"2":50,"3":{"1":10000}},{"1":52415,"2":50,"3":{"1":10000}},{"1":53955,"2":50,"3":{"1":10000}},{"1":53755,"2":50,"3":{"1":10000}},{"1":54620,"2":50,"3":{"1":10000}},{"1":54470,"2":50,"3":{"1":10000}},{"1":57955,"2":50,"3":{"1":10000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":59180,"2":50,"3":{"1":50000}},{"1":60985,"2":50,"3":{"1":50000}},{"1":59680,"2":50,"3":{"1":50000}},{"1":52850,"2":40,"3":{"1":40000}},{"1":59200,"2":50,"3":{"1":50000}},{"1":58825,"2":50,"3":{"1":50000}},{"1":57360,"2":50,"3":{"1":50000}},{"1":51955,"2":40,"3":{"1":40000}},{"1":50520,"2":40,"3":{"1":40000}},{"1":63035,"2":50,"3":{"1":50000}},{"1":60140,"2":50,"3":{"1":50000}},{"1":51750,"2":40,"3":{"1":40000}},{"1":51730,"2":40,"3":{"1":40000}},{"1":60060,"2":50,"3":{"1":50000}},{"1":62540,"2":50,"3":{"1":50000}},{"1":58575,"2":50,"3":{"1":50000}},{"1":58405,"2":50,"3":{"1":50000}},{"1":59670,"2":50,"3":{"1":50000}},{"1":62560,"2":50,"3":{"1":50000}},{"1":60795,"2":50,"3":{"1":50000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":51360,"2":20,"3":{"1":40000}},{"1":72745,"2":30,"3":{"1":60000}},{"1":71870,"2":30,"3":{"1":60000}},{"1":59195,"2":20,"3":{"1":40000}},{"1":53030,"2":20,"3":{"1":40000}},{"1":70075,"2":30,"3":{"1":60000}},{"1":68290,"2":30,"3":{"1":60000}},{"1":69160,"2":30,"3":{"1":60000}},{"1":74640,"2":30,"3":{"1":60000}},{"1":68305,"2":30,"3":{"1":60000}},{"1":53770,"2":20,"3":{"1":40000}},{"1":73015,"2":30,"3":{"1":60000}},{"1":70450,"2":30,"3":{"1":60000}},{"1":72675,"2":30,"3":{"1":60000}},{"1":75835,"2":30,"3":{"1":60000}},{"1":52775,"2":20,"3":{"1":40000}},{"1":68990,"2":30,"3":{"1":60000}},{"1":70715,"2":30,"3":{"1":60000}},{"1":59440,"2":20,"3":{"1":40000}},{"1":53435,"2":20,"3":{"1":40000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50185,"2":50,"3":{"2":5000}},{"1":59415,"2":60,"3":{"2":6000}},{"1":53105,"2":50,"3":{"2":5000}},{"1":52515,"2":50,"3":{"2":5000}},{"1":56305,"2":60,"3":{"2":6000}},{"1":55795,"2":60,"3":{"2":6000}},{"1":54955,"2":60,"3":{"2":6000}},{"1":54750,"2":60,"3":{"2":6000}},{"1":53455,"2":50,"3":{"2":5000}},{"1":51490,"2":50,"3":{"2":5000}},{"1":55155,"2":50,"3":{"2":5000}},{"1":59840,"2":60,"3":{"2":6000}},{"1":58330,"2":60,"3":{"2":6000}},{"1":57520,"2":50,"3":{"2":5000}},{"1":55860,"2":50,"3":{"2":5000}},{"1":58065,"2":60,"3":{"2":6000}},{"1":58785,"2":60,"3":{"2":6000}},{"1":57355,"2":60,"3":{"2":6000}},{"1":55550,"2":50,"3":{"2":5000}},{"1":53300,"2":50,"3":{"2":5000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":51750,"2":40,"3":{"2":8000}},{"1":51890,"2":40,"3":{"2":8000}},{"1":50015,"2":40,"3":{"2":8000}},{"1":61000,"2":50,"3":{"2":10000}},{"1":61995,"2":50,"3":{"2":10000}},{"1":55350,"2":40,"3":{"2":8000}},{"1":61505,"2":50,"3":{"2":10000}},{"1":61450,"2":50,"3":{"2":10000}},{"1":50820,"2":40,"3":{"2":8000}},{"1":62095,"2":50,"3":{"2":10000}},{"1":62080,"2":40,"3":{"2":8000}},{"1":58240,"2":40,"3":{"2":8000}},{"1":50410,"2":40,"3":{"2":8000}},{"1":50740,"2":40,"3":{"2":8000}},{"1":62545,"2":50,"3":{"2":10000}},{"1":50235,"2":40,"3":{"2":8000}},{"1":53595,"2":40,"3":{"2":8000}},{"1":50415,"2":40,"3":{"2":8000}},{"1":50335,"2":40,"3":{"2":8000}},{"1":55920,"2":40,"3":{"2":8000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":52025,"2":20,"3":{"2":20000}},{"1":56650,"2":20,"3":{"2":20000}},{"1":56540,"2":20,"3":{"2":20000}},{"1":54335,"2":20,"3":{"2":20000}},{"1":58375,"2":20,"3":{"2":20000}},{"1":58545,"2":20,"3":{"2":20000}},{"1":52820,"2":20,"3":{"2":20000}},{"1":64930,"2":20,"3":{"2":20000}},{"1":55390,"2":20,"3":{"2":20000}},{"1":60970,"2":20,"3":{"2":20000}},{"1":64490,"2":20,"3":{"2":20000}},{"1":54720,"2":20,"3":{"2":20000}},{"1":53965,"2":20,"3":{"2":20000}},{"1":54435,"2":20,"3":{"2":20000}},{"1":54105,"2":20,"3":{"2":20000}},{"1":60425,"2":20,"3":{"2":20000}},{"1":54885,"2":20,"3":{"2":20000}},{"1":53275,"2":20,"3":{"2":20000}},{"1":54205,"2":20,"3":{"2":20000}},{"1":57140,"2":20,"3":{"2":20000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":65585,"2":10,"3":{"2":20000}},{"1":62595,"2":10,"3":{"2":20000}},{"1":55220,"2":10,"3":{"2":20000}},{"1":59605,"2":10,"3":{"2":20000}},{"1":54065,"2":10,"3":{"2":20000}},{"1":53455,"2":10,"3":{"2":20000}},{"1":52375,"2":10,"3":{"2":20000}},{"1":54045,"2":10,"3":{"2":20000}},{"1":54530,"2":10,"3":{"2":20000}},{"1":54820,"2":10,"3":{"2":20000}},{"1":55525,"2":10,"3":{"2":20000}},{"1":57275,"2":10,"3":{"2":20000}},{"1":54430,"2":10,"3":{"2":20000}},{"1":54510,"2":10,"3":{"2":20000}},{"1":55820,"2":10,"3":{"2":20000}},{"1":55175,"2":10,"3":{"2":20000}},{"1":54960,"2":10,"3":{"2":20000}},{"1":55370,"2":10,"3":{"2":20000}},{"1":60490,"2":10,"3":{"2":20000}},{"1":53515,"2":10,"3":{"2":20000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":59130,"2":50,"3":{"2":5000}},{"1":57815,"2":50,"3":{"2":5000}},{"1":54800,"2":50,"3":{"2":5000}},{"1":53345,"2":50,"3":{"2":5000}},{"1":51490,"2":40,"3":{"2":4000}},{"1":53125,"2":50,"3":{"2":5000}},{"1":52945,"2":50,"3":{"2":5000}},{"1":59915,"2":50,"3":{"2":5000}},{"1":57470,"2":50,"3":{"2":5000}},{"1":61260,"2":50,"3":{"2":5000}},{"1":51200,"2":30,"3":{"2":3000}},{"1":55985,"2":50,"3":{"2":5000}},{"1":53105,"2":40,"3":{"2":4000}},{"1":57030,"2":50,"3":{"2":5000}},{"1":50395,"2":40,"3":{"2":4000}},{"1":53705,"2":40,"3":{"2":4000}},{"1":53150,"2":30,"3":{"2":3000}},{"1":54960,"2":50,"3":{"2":5000}},{"1":56515,"2":50,"3":{"2":5000}},{"1":56440,"2":50,"3":{"2":5000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":58335,"2":50,"3":{"2":10000}},{"1":65290,"2":40,"3":{"2":8000}},{"1":55185,"2":50,"3":{"2":10000}},{"1":54380,"2":50,"3":{"2":10000}},{"1":52445,"2":40,"3":{"2":8000}},{"1":59275,"2":50,"3":{"2":10000}},{"1":54385,"2":50,"3":{"2":10000}},{"1":66770,"2":50,"3":{"2":10000}},{"1":56225,"2":50,"3":{"2":10000}},{"1":60310,"2":50,"3":{"2":10000}},{"1":57930,"2":50,"3":{"2":10000}},{"1":52025,"2":40,"3":{"2":8000}},{"1":55860,"2":50,"3":{"2":10000}},{"1":55530,"2":30,"3":{"2":6000}},{"1":59175,"2":50,"3":{"2":10000}},{"1":56055,"2":50,"3":{"2":10000}},{"1":62460,"2":50,"3":{"2":10000}},{"1":55855,"2":50,"3":{"2":10000}},{"1":51810,"2":30,"3":{"2":6000}},{"1":51920,"2":40,"3":{"2":8000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":51730,"2":40,"3":{"2":40000}},{"1":54190,"2":40,"3":{"2":40000}},{"1":56030,"2":30,"3":{"2":30000}},{"1":61515,"2":50,"3":{"2":50000}},{"1":55800,"2":40,"3":{"2":40000}},{"1":61790,"2":50,"3":{"2":50000}},{"1":54965,"2":40,"3":{"2":40000}},{"1":61855,"2":50,"3":{"2":50000}},{"1":51295,"2":40,"3":{"2":40000}},{"1":62280,"2":50,"3":{"2":50000}},{"1":50825,"2":40,"3":{"2":40000}},{"1":56735,"2":30,"3":{"2":30000}},{"1":53235,"2":40,"3":{"2":40000}},{"1":53685,"2":40,"3":{"2":40000}},{"1":51130,"2":40,"3":{"2":40000}},{"1":50870,"2":40,"3":{"2":40000}},{"1":62245,"2":40,"3":{"2":40000}},{"1":58370,"2":40,"3":{"2":40000}},{"1":50560,"2":40,"3":{"2":40000}},{"1":54695,"2":40,"3":{"2":40000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":51140,"2":20,"3":{"2":40000}},{"1":52035,"2":20,"3":{"2":40000}},{"1":56100,"2":20,"3":{"2":40000}},{"1":73345,"2":30,"3":{"2":60000}},{"1":55710,"2":20,"3":{"2":40000}},{"1":73850,"2":30,"3":{"2":60000}},{"1":53700,"2":20,"3":{"2":40000}},{"1":50350,"2":20,"3":{"2":40000}},{"1":56525,"2":20,"3":{"2":40000}},{"1":50010,"2":20,"3":{"2":40000}},{"1":74185,"2":30,"3":{"2":60000}},{"1":54815,"2":20,"3":{"2":40000}},{"1":51520,"2":20,"3":{"2":40000}},{"1":56480,"2":20,"3":{"2":40000}},{"1":51200,"2":20,"3":{"2":40000}},{"1":54500,"2":20,"3":{"2":40000}},{"1":50250,"2":20,"3":{"2":40000}},{"1":51355,"2":20,"3":{"2":40000}},{"1":58060,"2":20,"3":{"2":40000}},{"1":53140,"2":20,"3":{"2":40000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":57420,"2":50,"3":{"4":5000}},{"1":54050,"2":50,"3":{"4":5000}},{"1":54215,"2":50,"3":{"4":5000}},{"1":50680,"2":50,"3":{"4":5000}},{"1":55255,"2":40,"3":{"4":4000}},{"1":57695,"2":60,"3":{"4":6000}},{"1":54735,"2":60,"3":{"4":6000}},{"1":55755,"2":40,"3":{"4":4000}},{"1":55095,"2":60,"3":{"4":6000}},{"1":58010,"2":60,"3":{"4":6000}},{"1":59875,"2":60,"3":{"4":6000}},{"1":56915,"2":60,"3":{"4":6000}},{"1":57230,"2":60,"3":{"4":6000}},{"1":57020,"2":60,"3":{"4":6000}},{"1":61475,"2":60,"3":{"4":6000}},{"1":56430,"2":60,"3":{"4":6000}},{"1":60600,"2":60,"3":{"4":6000}},{"1":56580,"2":60,"3":{"4":6000}},{"1":57870,"2":60,"3":{"4":6000}},{"1":51210,"2":50,"3":{"4":5000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":56360,"2":40,"3":{"4":8000}},{"1":50290,"2":40,"3":{"4":8000}},{"1":59815,"2":50,"3":{"4":10000}},{"1":59965,"2":50,"3":{"4":10000}},{"1":60095,"2":50,"3":{"4":10000}},{"1":59820,"2":50,"3":{"4":10000}},{"1":59485,"2":50,"3":{"4":10000}},{"1":61760,"2":50,"3":{"4":10000}},{"1":60000,"2":50,"3":{"4":10000}},{"1":60770,"2":50,"3":{"4":10000}},{"1":50410,"2":40,"3":{"4":8000}},{"1":60040,"2":50,"3":{"4":10000}},{"1":60975,"2":50,"3":{"4":10000}},{"1":61090,"2":50,"3":{"4":10000}},{"1":54680,"2":30,"3":{"4":6000}},{"1":62315,"2":50,"3":{"4":10000}},{"1":61555,"2":50,"3":{"4":10000}},{"1":60985,"2":50,"3":{"4":10000}},{"1":61215,"2":50,"3":{"4":10000}},{"1":61165,"2":50,"3":{"4":10000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52190,"2":20,"3":{"4":20000}},{"1":56885,"2":20,"3":{"4":20000}},{"1":51760,"2":20,"3":{"4":20000}},{"1":52410,"2":20,"3":{"4":20000}},{"1":54045,"2":20,"3":{"4":20000}},{"1":52655,"2":20,"3":{"4":20000}},{"1":51025,"2":20,"3":{"4":20000}},{"1":52985,"2":20,"3":{"4":20000}},{"1":51350,"2":20,"3":{"4":20000}},{"1":55970,"2":20,"3":{"4":20000}},{"1":52110,"2":20,"3":{"4":20000}},{"1":51960,"2":20,"3":{"4":20000}},{"1":51285,"2":20,"3":{"4":20000}},{"1":52995,"2":20,"3":{"4":20000}},{"1":53210,"2":20,"3":{"4":20000}},{"1":52160,"2":20,"3":{"4":20000}},{"1":52130,"2":20,"3":{"4":20000}},{"1":51390,"2":20,"3":{"4":20000}},{"1":51700,"2":20,"3":{"4":20000}},{"1":50945,"2":20,"3":{"4":20000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52275,"2":10,"3":{"4":20000}},{"1":52805,"2":10,"3":{"4":20000}},{"1":51910,"2":10,"3":{"4":20000}},{"1":52200,"2":10,"3":{"4":20000}},{"1":53530,"2":10,"3":{"4":20000}},{"1":52360,"2":10,"3":{"4":20000}},{"1":56225,"2":10,"3":{"4":20000}},{"1":54380,"2":10,"3":{"4":20000}},{"1":51160,"2":10,"3":{"4":20000}},{"1":50690,"2":10,"3":{"4":20000}},{"1":51665,"2":10,"3":{"4":20000}},{"1":55175,"2":10,"3":{"4":20000}},{"1":57465,"2":10,"3":{"4":20000}},{"1":52215,"2":10,"3":{"4":20000}},{"1":51120,"2":10,"3":{"4":20000}},{"1":55755,"2":10,"3":{"4":20000}},{"1":51810,"2":10,"3":{"4":20000}},{"1":51230,"2":10,"3":{"4":20000}},{"1":51230,"2":10,"3":{"4":20000}},{"1":51035,"2":10,"3":{"4":20000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":59640,"2":20,"3":{"4":20000}},{"1":82300,"2":20,"3":{"4":20000}},{"1":58700,"2":20,"3":{"4":20000}},{"1":60310,"2":20,"3":{"4":20000}},{"1":58115,"2":20,"3":{"4":20000}},{"1":62375,"2":20,"3":{"4":20000}},{"1":56265,"2":20,"3":{"4":20000}},{"1":56460,"2":20,"3":{"4":20000}},{"1":65005,"2":20,"3":{"4":20000}},{"1":59165,"2":20,"3":{"4":20000}},{"1":58155,"2":20,"3":{"4":20000}},{"1":61865,"2":20,"3":{"4":20000}},{"1":62015,"2":20,"3":{"4":20000}},{"1":59315,"2":20,"3":{"4":20000}},{"1":55140,"2":20,"3":{"4":20000}},{"1":70220,"2":20,"3":{"4":20000}},{"1":59705,"2":20,"3":{"4":20000}},{"1":92900,"2":20,"3":{"4":20000}},{"1":56035,"2":20,"3":{"4":20000}},{"1":96490,"2":20,"3":{"4":20000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":63425,"2":50,"3":{"4":5000}},{"1":56145,"2":50,"3":{"4":5000}},{"1":53405,"2":50,"3":{"4":5000}},{"1":53705,"2":50,"3":{"4":5000}},{"1":53830,"2":50,"3":{"4":5000}},{"1":59340,"2":50,"3":{"4":5000}},{"1":53160,"2":50,"3":{"4":5000}},{"1":53650,"2":50,"3":{"4":5000}},{"1":63510,"2":50,"3":{"4":5000}},{"1":52910,"2":50,"3":{"4":5000}},{"1":51700,"2":30,"3":{"4":3000}},{"1":54275,"2":50,"3":{"4":5000}},{"1":61920,"2":30,"3":{"4":3000}},{"1":50490,"2":40,"3":{"4":4000}},{"1":55245,"2":50,"3":{"4":5000}},{"1":57735,"2":50,"3":{"4":5000}},{"1":50230,"2":40,"3":{"4":4000}},{"1":51895,"2":40,"3":{"4":4000}},{"1":53295,"2":50,"3":{"4":5000}},{"1":59940,"2":50,"3":{"4":5000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":59300,"2":50,"3":{"4":10000}},{"1":59010,"2":50,"3":{"4":10000}},{"1":59140,"2":50,"3":{"4":10000}},{"1":54970,"2":50,"3":{"4":10000}},{"1":54380,"2":50,"3":{"4":10000}},{"1":59875,"2":50,"3":{"4":10000}},{"1":55200,"2":50,"3":{"4":10000}},{"1":54835,"2":50,"3":{"4":10000}},{"1":53210,"2":50,"3":{"4":10000}},{"1":52485,"2":30,"3":{"4":6000}},{"1":55660,"2":40,"3":{"4":8000}},{"1":57630,"2":50,"3":{"4":10000}},{"1":54765,"2":50,"3":{"4":10000}},{"1":60155,"2":50,"3":{"4":10000}},{"1":56365,"2":50,"3":{"4":10000}},{"1":51480,"2":40,"3":{"4":8000}},{"1":54640,"2":50,"3":{"4":10000}},{"1":56325,"2":50,"3":{"4":10000}},{"1":61490,"2":50,"3":{"4":10000}},{"1":54725,"2":50,"3":{"4":10000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51590,"2":40,"3":{"4":40000}},{"1":60905,"2":50,"3":{"4":50000}},{"1":61950,"2":50,"3":{"4":50000}},{"1":57845,"2":40,"3":{"4":40000}},{"1":61410,"2":50,"3":{"4":50000}},{"1":50380,"2":40,"3":{"4":40000}},{"1":61880,"2":50,"3":{"4":50000}},{"1":61075,"2":50,"3":{"4":50000}},{"1":60235,"2":50,"3":{"4":50000}},{"1":61460,"2":50,"3":{"4":50000}},{"1":51150,"2":40,"3":{"4":40000}},{"1":52035,"2":40,"3":{"4":40000}},{"1":61510,"2":50,"3":{"4":50000}},{"1":62145,"2":50,"3":{"4":50000}},{"1":50610,"2":40,"3":{"4":40000}},{"1":60060,"2":50,"3":{"4":50000}},{"1":61625,"2":50,"3":{"4":50000}},{"1":50885,"2":40,"3":{"4":40000}},{"1":50175,"2":40,"3":{"4":40000}},{"1":50000,"2":40,"3":{"4":40000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51820,"2":20,"3":{"4":40000}},{"1":72885,"2":30,"3":{"4":60000}},{"1":52130,"2":20,"3":{"4":40000}},{"1":73550,"2":30,"3":{"4":60000}},{"1":79320,"2":30,"3":{"4":60000}},{"1":60520,"2":20,"3":{"4":40000}},{"1":81800,"2":20,"3":{"4":40000}},{"1":73090,"2":30,"3":{"4":60000}},{"1":73365,"2":30,"3":{"4":60000}},{"1":55290,"2":20,"3":{"4":40000}},{"1":50665,"2":20,"3":{"4":40000}},{"1":73620,"2":30,"3":{"4":60000}},{"1":73230,"2":30,"3":{"4":60000}},{"1":74285,"2":30,"3":{"4":60000}},{"1":57125,"2":20,"3":{"4":40000}},{"1":54270,"2":20,"3":{"4":40000}},{"1":73475,"2":30,"3":{"4":60000}},{"1":53430,"2":20,"3":{"4":40000}},{"1":59525,"2":20,"3":{"4":40000}},{"1":50590,"2":20,"3":{"4":40000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":52790,"2":30,"3":{"4":30000}},{"1":59960,"2":40,"3":{"4":40000}},{"1":65105,"2":40,"3":{"4":40000}},{"1":61080,"2":40,"3":{"4":40000}},{"1":59165,"2":40,"3":{"4":40000}},{"1":70790,"2":30,"3":{"4":30000}},{"1":63285,"2":40,"3":{"4":40000}},{"1":59050,"2":40,"3":{"4":40000}},{"1":57800,"2":40,"3":{"4":40000}},{"1":62360,"2":40,"3":{"4":40000}},{"1":51720,"2":30,"3":{"4":30000}},{"1":50255,"2":30,"3":{"4":30000}},{"1":58880,"2":40,"3":{"4":40000}},{"1":55630,"2":30,"3":{"4":30000}},{"1":63790,"2":40,"3":{"4":40000}},{"1":62700,"2":40,"3":{"4":40000}},{"1":63480,"2":40,"3":{"4":40000}},{"1":53210,"2":30,"3":{"4":30000}},{"1":53440,"2":30,"3":{"4":30000}},{"1":62565,"2":40,"3":{"4":40000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.4.2/json_vm.pb.json b/benchmark/data/skybrian-macbookpro/0.4.2/json_vm.pb.json
deleted file mode 100644
index afc63e1..0000000
--- a/benchmark/data/skybrian-macbookpro/0.4.2/json_vm.pb.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "readjson_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.12.0 (Mon Aug 31 04:17:53 2015) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":52792,"2":170,"3":{"1":17000}},{"1":50531,"2":250,"3":{"1":25000}},{"1":50487,"2":270,"3":{"1":27000}},{"1":50526,"2":280,"3":{"1":28000}},{"1":50916,"2":290,"3":{"1":29000}},{"1":51512,"2":300,"3":{"1":30000}},{"1":50968,"2":260,"3":{"1":26000}},{"1":50506,"2":270,"3":{"1":27000}},{"1":50869,"2":290,"3":{"1":29000}},{"1":50677,"2":290,"3":{"1":29000}},{"1":51736,"2":290,"3":{"1":29000}},{"1":50841,"2":290,"3":{"1":29000}},{"1":50498,"2":240,"3":{"1":24000}},{"1":50427,"2":280,"3":{"1":28000}},{"1":50444,"2":280,"3":{"1":28000}},{"1":50631,"2":280,"3":{"1":28000}},{"1":50841,"2":280,"3":{"1":28000}},{"1":50951,"2":280,"3":{"1":28000}},{"1":51225,"2":280,"3":{"1":28000}},{"1":50338,"2":220,"3":{"1":22000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":52030,"2":250,"3":{"1":50000}},{"1":51982,"2":250,"3":{"1":50000}},{"1":50410,"2":240,"3":{"1":48000}},{"1":51965,"2":250,"3":{"1":50000}},{"1":50386,"2":240,"3":{"1":48000}},{"1":50335,"2":240,"3":{"1":48000}},{"1":50947,"2":250,"3":{"1":50000}},{"1":50376,"2":240,"3":{"1":48000}},{"1":52138,"2":250,"3":{"1":50000}},{"1":52063,"2":250,"3":{"1":50000}},{"1":51496,"2":240,"3":{"1":48000}},{"1":50768,"2":240,"3":{"1":48000}},{"1":50012,"2":210,"3":{"1":42000}},{"1":51095,"2":240,"3":{"1":48000}},{"1":50728,"2":240,"3":{"1":48000}},{"1":51056,"2":240,"3":{"1":48000}},{"1":50787,"2":200,"3":{"1":40000}},{"1":51970,"2":220,"3":{"1":44000}},{"1":50119,"2":210,"3":{"1":42000}},{"1":50126,"2":240,"3":{"1":48000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":54331,"2":100,"3":{"1":100000}},{"1":55249,"2":100,"3":{"1":100000}},{"1":50434,"2":90,"3":{"1":90000}},{"1":50452,"2":90,"3":{"1":90000}},{"1":54057,"2":100,"3":{"1":100000}},{"1":54132,"2":100,"3":{"1":100000}},{"1":55114,"2":100,"3":{"1":100000}},{"1":53461,"2":80,"3":{"1":80000}},{"1":55260,"2":90,"3":{"1":90000}},{"1":55414,"2":100,"3":{"1":100000}},{"1":51439,"2":90,"3":{"1":90000}},{"1":51413,"2":90,"3":{"1":90000}},{"1":52472,"2":90,"3":{"1":90000}},{"1":50359,"2":80,"3":{"1":80000}},{"1":50654,"2":80,"3":{"1":80000}},{"1":52168,"2":90,"3":{"1":90000}},{"1":53932,"2":90,"3":{"1":90000}},{"1":50863,"2":90,"3":{"1":90000}},{"1":52259,"2":90,"3":{"1":90000}},{"1":52312,"2":90,"3":{"1":90000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":56093,"2":50,"3":{"1":100000}},{"1":55191,"2":50,"3":{"1":100000}},{"1":55949,"2":50,"3":{"1":100000}},{"1":50848,"2":40,"3":{"1":80000}},{"1":54937,"2":50,"3":{"1":100000}},{"1":56136,"2":50,"3":{"1":100000}},{"1":61847,"2":50,"3":{"1":100000}},{"1":55885,"2":50,"3":{"1":100000}},{"1":55234,"2":50,"3":{"1":100000}},{"1":54780,"2":50,"3":{"1":100000}},{"1":51168,"2":40,"3":{"1":80000}},{"1":57005,"2":50,"3":{"1":100000}},{"1":57109,"2":50,"3":{"1":100000}},{"1":57083,"2":50,"3":{"1":100000}},{"1":57885,"2":50,"3":{"1":100000}},{"1":56917,"2":50,"3":{"1":100000}},{"1":57040,"2":50,"3":{"1":100000}},{"1":50908,"2":40,"3":{"1":80000}},{"1":56833,"2":50,"3":{"1":100000}},{"1":51625,"2":40,"3":{"1":80000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50389,"2":250,"3":{"1":25000}},{"1":50143,"2":250,"3":{"1":25000}},{"1":50923,"2":260,"3":{"1":26000}},{"1":50639,"2":260,"3":{"1":26000}},{"1":50998,"2":260,"3":{"1":26000}},{"1":51777,"2":230,"3":{"1":23000}},{"1":50828,"2":230,"3":{"1":23000}},{"1":51718,"2":260,"3":{"1":26000}},{"1":50152,"2":250,"3":{"1":25000}},{"1":50218,"2":230,"3":{"1":23000}},{"1":51480,"2":250,"3":{"1":25000}},{"1":50652,"2":250,"3":{"1":25000}},{"1":50147,"2":220,"3":{"1":22000}},{"1":50707,"2":250,"3":{"1":25000}},{"1":50375,"2":230,"3":{"1":23000}},{"1":50821,"2":230,"3":{"1":23000}},{"1":50873,"2":250,"3":{"1":25000}},{"1":50338,"2":250,"3":{"1":25000}},{"1":50275,"2":250,"3":{"1":25000}},{"1":50952,"2":250,"3":{"1":25000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50503,"2":220,"3":{"1":44000}},{"1":51797,"2":250,"3":{"1":50000}},{"1":52199,"2":250,"3":{"1":50000}},{"1":50501,"2":220,"3":{"1":44000}},{"1":51555,"2":250,"3":{"1":50000}},{"1":50137,"2":240,"3":{"1":48000}},{"1":50114,"2":240,"3":{"1":48000}},{"1":50294,"2":240,"3":{"1":48000}},{"1":50043,"2":240,"3":{"1":48000}},{"1":51078,"2":220,"3":{"1":44000}},{"1":50857,"2":240,"3":{"1":48000}},{"1":50331,"2":240,"3":{"1":48000}},{"1":50102,"2":210,"3":{"1":42000}},{"1":51731,"2":250,"3":{"1":50000}},{"1":51086,"2":240,"3":{"1":48000}},{"1":50324,"2":240,"3":{"1":48000}},{"1":51575,"2":220,"3":{"1":44000}},{"1":51789,"2":250,"3":{"1":50000}},{"1":52227,"2":230,"3":{"1":46000}},{"1":51995,"2":230,"3":{"1":46000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50139,"2":180,"3":{"1":180000}},{"1":50669,"2":180,"3":{"1":180000}},{"1":50934,"2":180,"3":{"1":180000}},{"1":51307,"2":180,"3":{"1":180000}},{"1":50608,"2":160,"3":{"1":160000}},{"1":51083,"2":180,"3":{"1":180000}},{"1":50098,"2":180,"3":{"1":180000}},{"1":51223,"2":180,"3":{"1":180000}},{"1":51286,"2":180,"3":{"1":180000}},{"1":51010,"2":180,"3":{"1":180000}},{"1":51089,"2":180,"3":{"1":180000}},{"1":51876,"2":180,"3":{"1":180000}},{"1":50966,"2":180,"3":{"1":180000}},{"1":51232,"2":180,"3":{"1":180000}},{"1":51554,"2":180,"3":{"1":180000}},{"1":51385,"2":170,"3":{"1":170000}},{"1":50667,"2":180,"3":{"1":180000}},{"1":51677,"2":180,"3":{"1":180000}},{"1":50191,"2":160,"3":{"1":160000}},{"1":50631,"2":180,"3":{"1":180000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":50443,"2":80,"3":{"1":160000}},{"1":51568,"2":90,"3":{"1":180000}},{"1":51007,"2":90,"3":{"1":180000}},{"1":51734,"2":90,"3":{"1":180000}},{"1":51062,"2":90,"3":{"1":180000}},{"1":50124,"2":80,"3":{"1":160000}},{"1":50760,"2":90,"3":{"1":180000}},{"1":51151,"2":90,"3":{"1":180000}},{"1":55225,"2":90,"3":{"1":180000}},{"1":50809,"2":90,"3":{"1":180000}},{"1":55275,"2":100,"3":{"1":200000}},{"1":50254,"2":90,"3":{"1":180000}},{"1":56216,"2":100,"3":{"1":200000}},{"1":50776,"2":90,"3":{"1":180000}},{"1":51530,"2":90,"3":{"1":180000}},{"1":51019,"2":90,"3":{"1":180000}},{"1":50930,"2":90,"3":{"1":180000}},{"1":51209,"2":90,"3":{"1":180000}},{"1":50727,"2":90,"3":{"1":180000}},{"1":50484,"2":90,"3":{"1":180000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":51010,"2":240,"3":{"2":24000}},{"1":50538,"2":270,"3":{"2":27000}},{"1":51380,"2":260,"3":{"2":26000}},{"1":51666,"2":270,"3":{"2":27000}},{"1":50569,"2":260,"3":{"2":26000}},{"1":50886,"2":270,"3":{"2":27000}},{"1":50904,"2":250,"3":{"2":25000}},{"1":51299,"2":270,"3":{"2":27000}},{"1":51182,"2":280,"3":{"2":28000}},{"1":51786,"2":280,"3":{"2":28000}},{"1":51015,"2":260,"3":{"2":26000}},{"1":51491,"2":280,"3":{"2":28000}},{"1":50175,"2":270,"3":{"2":27000}},{"1":51366,"2":280,"3":{"2":28000}},{"1":51642,"2":280,"3":{"2":28000}},{"1":51403,"2":250,"3":{"2":25000}},{"1":51128,"2":270,"3":{"2":27000}},{"1":50273,"2":270,"3":{"2":27000}},{"1":51339,"2":270,"3":{"2":27000}},{"1":51637,"2":250,"3":{"2":25000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":50842,"2":230,"3":{"2":46000}},{"1":50027,"2":230,"3":{"2":46000}},{"1":50443,"2":230,"3":{"2":46000}},{"1":50325,"2":230,"3":{"2":46000}},{"1":53218,"2":220,"3":{"2":44000}},{"1":50850,"2":230,"3":{"2":46000}},{"1":51121,"2":230,"3":{"2":46000}},{"1":52104,"2":210,"3":{"2":42000}},{"1":50715,"2":220,"3":{"2":44000}},{"1":51788,"2":230,"3":{"2":46000}},{"1":51713,"2":230,"3":{"2":46000}},{"1":51892,"2":240,"3":{"2":48000}},{"1":51915,"2":240,"3":{"2":48000}},{"1":51114,"2":230,"3":{"2":46000}},{"1":51820,"2":240,"3":{"2":48000}},{"1":51071,"2":230,"3":{"2":46000}},{"1":50117,"2":200,"3":{"2":40000}},{"1":50499,"2":230,"3":{"2":46000}},{"1":51218,"2":230,"3":{"2":46000}},{"1":50806,"2":230,"3":{"2":46000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":54941,"2":90,"3":{"2":90000}},{"1":53325,"2":90,"3":{"2":90000}},{"1":54802,"2":90,"3":{"2":90000}},{"1":54955,"2":90,"3":{"2":90000}},{"1":54850,"2":90,"3":{"2":90000}},{"1":52335,"2":80,"3":{"2":80000}},{"1":53924,"2":90,"3":{"2":90000}},{"1":53974,"2":90,"3":{"2":90000}},{"1":54312,"2":90,"3":{"2":90000}},{"1":55859,"2":90,"3":{"2":90000}},{"1":53254,"2":90,"3":{"2":90000}},{"1":52080,"2":90,"3":{"2":90000}},{"1":50157,"2":80,"3":{"2":80000}},{"1":52925,"2":90,"3":{"2":90000}},{"1":52232,"2":80,"3":{"2":80000}},{"1":55192,"2":90,"3":{"2":90000}},{"1":53072,"2":80,"3":{"2":80000}},{"1":53953,"2":90,"3":{"2":90000}},{"1":54129,"2":80,"3":{"2":80000}},{"1":55775,"2":90,"3":{"2":90000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":63039,"2":50,"3":{"2":100000}},{"1":61132,"2":50,"3":{"2":100000}},{"1":54597,"2":40,"3":{"2":80000}},{"1":59548,"2":50,"3":{"2":100000}},{"1":60319,"2":50,"3":{"2":100000}},{"1":55381,"2":40,"3":{"2":80000}},{"1":61396,"2":50,"3":{"2":100000}},{"1":61113,"2":50,"3":{"2":100000}},{"1":61024,"2":50,"3":{"2":100000}},{"1":54389,"2":40,"3":{"2":80000}},{"1":59328,"2":50,"3":{"2":100000}},{"1":59432,"2":50,"3":{"2":100000}},{"1":61283,"2":50,"3":{"2":100000}},{"1":59078,"2":50,"3":{"2":100000}},{"1":61691,"2":50,"3":{"2":100000}},{"1":59932,"2":50,"3":{"2":100000}},{"1":61093,"2":50,"3":{"2":100000}},{"1":59638,"2":50,"3":{"2":100000}},{"1":53964,"2":40,"3":{"2":80000}},{"1":60487,"2":50,"3":{"2":100000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":51384,"2":240,"3":{"2":24000}},{"1":51856,"2":250,"3":{"2":25000}},{"1":50003,"2":240,"3":{"2":24000}},{"1":50330,"2":250,"3":{"2":25000}},{"1":51583,"2":250,"3":{"2":25000}},{"1":51172,"2":250,"3":{"2":25000}},{"1":51090,"2":250,"3":{"2":25000}},{"1":51539,"2":210,"3":{"2":21000}},{"1":51119,"2":220,"3":{"2":22000}},{"1":50476,"2":250,"3":{"2":25000}},{"1":51072,"2":220,"3":{"2":22000}},{"1":50960,"2":240,"3":{"2":24000}},{"1":52055,"2":220,"3":{"2":22000}},{"1":51333,"2":240,"3":{"2":24000}},{"1":50399,"2":210,"3":{"2":21000}},{"1":50896,"2":240,"3":{"2":24000}},{"1":50234,"2":210,"3":{"2":21000}},{"1":51776,"2":230,"3":{"2":23000}},{"1":51768,"2":250,"3":{"2":25000}},{"1":51069,"2":240,"3":{"2":24000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":51728,"2":240,"3":{"2":48000}},{"1":50448,"2":230,"3":{"2":46000}},{"1":51146,"2":240,"3":{"2":48000}},{"1":50366,"2":240,"3":{"2":48000}},{"1":51987,"2":240,"3":{"2":48000}},{"1":51922,"2":240,"3":{"2":48000}},{"1":51838,"2":240,"3":{"2":48000}},{"1":52132,"2":240,"3":{"2":48000}},{"1":51434,"2":240,"3":{"2":48000}},{"1":50539,"2":220,"3":{"2":44000}},{"1":51198,"2":230,"3":{"2":46000}},{"1":51219,"2":230,"3":{"2":46000}},{"1":51807,"2":240,"3":{"2":48000}},{"1":50927,"2":230,"3":{"2":46000}},{"1":50817,"2":230,"3":{"2":46000}},{"1":50821,"2":230,"3":{"2":46000}},{"1":51854,"2":240,"3":{"2":48000}},{"1":51207,"2":230,"3":{"2":46000}},{"1":51159,"2":230,"3":{"2":46000}},{"1":50585,"2":230,"3":{"2":46000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":52007,"2":170,"3":{"2":170000}},{"1":51368,"2":170,"3":{"2":170000}},{"1":51523,"2":170,"3":{"2":170000}},{"1":53654,"2":160,"3":{"2":160000}},{"1":50966,"2":170,"3":{"2":170000}},{"1":50506,"2":170,"3":{"2":170000}},{"1":51704,"2":170,"3":{"2":170000}},{"1":51345,"2":170,"3":{"2":170000}},{"1":50152,"2":150,"3":{"2":150000}},{"1":54050,"2":160,"3":{"2":160000}},{"1":51722,"2":160,"3":{"2":160000}},{"1":50599,"2":170,"3":{"2":170000}},{"1":50827,"2":170,"3":{"2":170000}},{"1":51339,"2":170,"3":{"2":170000}},{"1":53620,"2":160,"3":{"2":160000}},{"1":52652,"2":170,"3":{"2":170000}},{"1":52331,"2":170,"3":{"2":170000}},{"1":51581,"2":170,"3":{"2":170000}},{"1":52239,"2":170,"3":{"2":170000}},{"1":51526,"2":170,"3":{"2":170000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":54513,"2":90,"3":{"2":180000}},{"1":54481,"2":90,"3":{"2":180000}},{"1":53717,"2":80,"3":{"2":160000}},{"1":53955,"2":90,"3":{"2":180000}},{"1":54318,"2":90,"3":{"2":180000}},{"1":54963,"2":90,"3":{"2":180000}},{"1":53649,"2":90,"3":{"2":180000}},{"1":53075,"2":90,"3":{"2":180000}},{"1":52564,"2":80,"3":{"2":160000}},{"1":54141,"2":80,"3":{"2":160000}},{"1":53745,"2":80,"3":{"2":160000}},{"1":54711,"2":90,"3":{"2":180000}},{"1":54941,"2":90,"3":{"2":180000}},{"1":56444,"2":90,"3":{"2":180000}},{"1":55285,"2":90,"3":{"2":180000}},{"1":54717,"2":90,"3":{"2":180000}},{"1":55754,"2":90,"3":{"2":180000}},{"1":55642,"2":90,"3":{"2":180000}},{"1":54080,"2":90,"3":{"2":180000}},{"1":54080,"2":80,"3":{"2":160000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":51769,"2":250,"3":{"4":25000}},{"1":51330,"2":270,"3":{"4":27000}},{"1":50248,"2":240,"3":{"4":24000}},{"1":50849,"2":240,"3":{"4":24000}},{"1":51268,"2":270,"3":{"4":27000}},{"1":51482,"2":270,"3":{"4":27000}},{"1":50580,"2":270,"3":{"4":27000}},{"1":50495,"2":270,"3":{"4":27000}},{"1":51637,"2":270,"3":{"4":27000}},{"1":50588,"2":260,"3":{"4":26000}},{"1":50562,"2":270,"3":{"4":27000}},{"1":51099,"2":280,"3":{"4":28000}},{"1":50634,"2":280,"3":{"4":28000}},{"1":51273,"2":280,"3":{"4":28000}},{"1":51196,"2":250,"3":{"4":25000}},{"1":50835,"2":280,"3":{"4":28000}},{"1":50642,"2":280,"3":{"4":28000}},{"1":51036,"2":280,"3":{"4":28000}},{"1":50208,"2":270,"3":{"4":27000}},{"1":51210,"2":280,"3":{"4":28000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50236,"2":210,"3":{"4":42000}},{"1":51140,"2":220,"3":{"4":44000}},{"1":52102,"2":230,"3":{"4":46000}},{"1":50058,"2":200,"3":{"4":40000}},{"1":51346,"2":230,"3":{"4":46000}},{"1":50046,"2":180,"3":{"4":36000}},{"1":50663,"2":200,"3":{"4":40000}},{"1":52059,"2":230,"3":{"4":46000}},{"1":50892,"2":200,"3":{"4":40000}},{"1":51498,"2":220,"3":{"4":44000}},{"1":51861,"2":210,"3":{"4":42000}},{"1":52071,"2":240,"3":{"4":48000}},{"1":50582,"2":210,"3":{"4":42000}},{"1":51643,"2":240,"3":{"4":48000}},{"1":50050,"2":230,"3":{"4":46000}},{"1":51042,"2":230,"3":{"4":46000}},{"1":51264,"2":230,"3":{"4":46000}},{"1":51448,"2":190,"3":{"4":38000}},{"1":51341,"2":230,"3":{"4":46000}},{"1":50395,"2":230,"3":{"4":46000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":54855,"2":90,"3":{"4":90000}},{"1":50893,"2":80,"3":{"4":80000}},{"1":56142,"2":90,"3":{"4":90000}},{"1":55393,"2":90,"3":{"4":90000}},{"1":50231,"2":80,"3":{"4":80000}},{"1":54996,"2":90,"3":{"4":90000}},{"1":50781,"2":80,"3":{"4":80000}},{"1":50290,"2":80,"3":{"4":80000}},{"1":50870,"2":80,"3":{"4":80000}},{"1":55764,"2":90,"3":{"4":90000}},{"1":55378,"2":90,"3":{"4":90000}},{"1":55594,"2":90,"3":{"4":90000}},{"1":50037,"2":80,"3":{"4":80000}},{"1":54744,"2":90,"3":{"4":90000}},{"1":50378,"2":80,"3":{"4":80000}},{"1":55229,"2":90,"3":{"4":90000}},{"1":52020,"2":80,"3":{"4":80000}},{"1":55520,"2":90,"3":{"4":90000}},{"1":55906,"2":80,"3":{"4":80000}},{"1":53632,"2":80,"3":{"4":80000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":60828,"2":50,"3":{"4":100000}},{"1":55116,"2":40,"3":{"4":80000}},{"1":50179,"2":40,"3":{"4":80000}},{"1":55123,"2":40,"3":{"4":80000}},{"1":50017,"2":40,"3":{"4":80000}},{"1":66776,"2":50,"3":{"4":100000}},{"1":50746,"2":40,"3":{"4":80000}},{"1":61029,"2":50,"3":{"4":100000}},{"1":50395,"2":40,"3":{"4":80000}},{"1":53494,"2":40,"3":{"4":80000}},{"1":50581,"2":40,"3":{"4":80000}},{"1":50065,"2":40,"3":{"4":80000}},{"1":59979,"2":50,"3":{"4":100000}},{"1":56341,"2":40,"3":{"4":80000}},{"1":61344,"2":50,"3":{"4":100000}},{"1":54830,"2":40,"3":{"4":80000}},{"1":60853,"2":50,"3":{"4":100000}},{"1":61794,"2":50,"3":{"4":100000}},{"1":52256,"2":40,"3":{"4":80000}},{"1":61511,"2":50,"3":{"4":100000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":51578,"2":50,"3":{"4":50000}},{"1":51510,"2":50,"3":{"4":50000}},{"1":51029,"2":50,"3":{"4":50000}},{"1":53618,"2":50,"3":{"4":50000}},{"1":61193,"2":60,"3":{"4":60000}},{"1":60344,"2":60,"3":{"4":60000}},{"1":55758,"2":50,"3":{"4":50000}},{"1":59475,"2":60,"3":{"4":60000}},{"1":50226,"2":50,"3":{"4":50000}},{"1":59571,"2":60,"3":{"4":60000}},{"1":51778,"2":50,"3":{"4":50000}},{"1":51717,"2":50,"3":{"4":50000}},{"1":51282,"2":50,"3":{"4":50000}},{"1":50065,"2":50,"3":{"4":50000}},{"1":51017,"2":50,"3":{"4":50000}},{"1":59630,"2":50,"3":{"4":50000}},{"1":50610,"2":50,"3":{"4":50000}},{"1":53641,"2":50,"3":{"4":50000}},{"1":51414,"2":50,"3":{"4":50000}},{"1":55988,"2":50,"3":{"4":50000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":51490,"2":240,"3":{"4":24000}},{"1":51602,"2":240,"3":{"4":24000}},{"1":51953,"2":240,"3":{"4":24000}},{"1":50944,"2":240,"3":{"4":24000}},{"1":50027,"2":210,"3":{"4":21000}},{"1":50675,"2":240,"3":{"4":24000}},{"1":50085,"2":240,"3":{"4":24000}},{"1":51549,"2":240,"3":{"4":24000}},{"1":51786,"2":240,"3":{"4":24000}},{"1":50840,"2":240,"3":{"4":24000}},{"1":50049,"2":240,"3":{"4":24000}},{"1":51259,"2":250,"3":{"4":25000}},{"1":53281,"2":240,"3":{"4":24000}},{"1":51927,"2":250,"3":{"4":25000}},{"1":51808,"2":250,"3":{"4":25000}},{"1":51176,"2":250,"3":{"4":25000}},{"1":50325,"2":240,"3":{"4":24000}},{"1":51365,"2":220,"3":{"4":22000}},{"1":50667,"2":220,"3":{"4":22000}},{"1":51816,"2":250,"3":{"4":25000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50648,"2":230,"3":{"4":46000}},{"1":51531,"2":230,"3":{"4":46000}},{"1":51750,"2":240,"3":{"4":48000}},{"1":51052,"2":230,"3":{"4":46000}},{"1":51657,"2":210,"3":{"4":42000}},{"1":50154,"2":230,"3":{"4":46000}},{"1":50831,"2":230,"3":{"4":46000}},{"1":50652,"2":230,"3":{"4":46000}},{"1":51509,"2":220,"3":{"4":44000}},{"1":51927,"2":240,"3":{"4":48000}},{"1":51214,"2":230,"3":{"4":46000}},{"1":50504,"2":230,"3":{"4":46000}},{"1":51117,"2":210,"3":{"4":42000}},{"1":51122,"2":230,"3":{"4":46000}},{"1":51953,"2":240,"3":{"4":48000}},{"1":51330,"2":240,"3":{"4":48000}},{"1":51034,"2":230,"3":{"4":46000}},{"1":50985,"2":230,"3":{"4":46000}},{"1":50735,"2":230,"3":{"4":46000}},{"1":50396,"2":210,"3":{"4":42000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51201,"2":150,"3":{"4":150000}},{"1":51256,"2":150,"3":{"4":150000}},{"1":51077,"2":150,"3":{"4":150000}},{"1":52218,"2":150,"3":{"4":150000}},{"1":51999,"2":150,"3":{"4":150000}},{"1":52379,"2":150,"3":{"4":150000}},{"1":53043,"2":150,"3":{"4":150000}},{"1":51357,"2":150,"3":{"4":150000}},{"1":52330,"2":150,"3":{"4":150000}},{"1":52066,"2":150,"3":{"4":150000}},{"1":51841,"2":140,"3":{"4":140000}},{"1":51911,"2":150,"3":{"4":150000}},{"1":50689,"2":150,"3":{"4":150000}},{"1":50057,"2":130,"3":{"4":130000}},{"1":50227,"2":130,"3":{"4":130000}},{"1":50963,"2":150,"3":{"4":150000}},{"1":51860,"2":150,"3":{"4":150000}},{"1":51786,"2":150,"3":{"4":150000}},{"1":51226,"2":150,"3":{"4":150000}},{"1":50750,"2":130,"3":{"4":130000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":55734,"2":80,"3":{"4":160000}},{"1":55739,"2":80,"3":{"4":160000}},{"1":55012,"2":80,"3":{"4":160000}},{"1":55597,"2":80,"3":{"4":160000}},{"1":54974,"2":80,"3":{"4":160000}},{"1":55072,"2":80,"3":{"4":160000}},{"1":53665,"2":70,"3":{"4":140000}},{"1":54865,"2":80,"3":{"4":160000}},{"1":54777,"2":80,"3":{"4":160000}},{"1":54022,"2":80,"3":{"4":160000}},{"1":53951,"2":70,"3":{"4":140000}},{"1":54625,"2":80,"3":{"4":160000}},{"1":53976,"2":80,"3":{"4":160000}},{"1":57674,"2":80,"3":{"4":160000}},{"1":54483,"2":80,"3":{"4":160000}},{"1":53120,"2":80,"3":{"4":160000}},{"1":59440,"2":80,"3":{"4":160000}},{"1":53898,"2":80,"3":{"4":160000}},{"1":55373,"2":80,"3":{"4":160000}},{"1":55152,"2":80,"3":{"4":160000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":51318,"2":70,"3":{"4":70000}},{"1":51820,"2":70,"3":{"4":70000}},{"1":56710,"2":80,"3":{"4":80000}},{"1":51761,"2":70,"3":{"4":70000}},{"1":51876,"2":70,"3":{"4":70000}},{"1":55504,"2":70,"3":{"4":70000}},{"1":51020,"2":70,"3":{"4":70000}},{"1":51250,"2":70,"3":{"4":70000}},{"1":53879,"2":70,"3":{"4":70000}},{"1":52178,"2":70,"3":{"4":70000}},{"1":52546,"2":70,"3":{"4":70000}},{"1":57246,"2":70,"3":{"4":70000}},{"1":52425,"2":70,"3":{"4":70000}},{"1":51520,"2":70,"3":{"4":70000}},{"1":54980,"2":70,"3":{"4":70000}},{"1":51130,"2":70,"3":{"4":70000}},{"1":51808,"2":70,"3":{"4":70000}},{"1":57633,"2":80,"3":{"4":80000}},{"1":51711,"2":70,"3":{"4":70000}},{"1":56301,"2":70,"3":{"4":70000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.4.2/props_chrome.pb.json b/benchmark/data/skybrian-macbookpro/0.4.2/props_chrome.pb.json
deleted file mode 100644
index 2a8e026..0000000
--- a/benchmark/data/skybrian-macbookpro/0.4.2/props_chrome.pb.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/props.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50000,"2":97740,"3":{"4":9774000}},{"1":50000,"2":134610,"3":{"4":13461000}},{"1":50000,"2":132130,"3":{"4":13213000}},{"1":50000,"2":148300,"3":{"4":14830000}},{"1":50000,"2":149600,"3":{"4":14960000}},{"1":50000,"2":147250,"3":{"4":14725000}},{"1":50000,"2":150550,"3":{"4":15055000}},{"1":50000,"2":148720,"3":{"4":14872000}},{"1":50000,"2":142070,"3":{"4":14207000}},{"1":50000,"2":149420,"3":{"4":14942000}},{"1":50005,"2":144970,"3":{"4":14497000}},{"1":50000,"2":149030,"3":{"4":14903000}},{"1":50000,"2":149260,"3":{"4":14926000}},{"1":50000,"2":148420,"3":{"4":14842000}},{"1":50000,"2":137510,"3":{"4":13751000}},{"1":50000,"2":147950,"3":{"4":14795000}},{"1":50000,"2":146830,"3":{"4":14683000}},{"1":50000,"2":133950,"3":{"4":13395000}},{"1":50000,"2":146380,"3":{"4":14638000}},{"1":50000,"2":149990,"3":{"4":14999000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50000,"2":151560,"3":{"4":15156000}},{"1":50000,"2":147850,"3":{"4":14785000}},{"1":50000,"2":153790,"3":{"4":15379000}},{"1":50000,"2":148250,"3":{"4":14825000}},{"1":50005,"2":145700,"3":{"4":14570000}},{"1":50000,"2":151050,"3":{"4":15105000}},{"1":50000,"2":148530,"3":{"4":14853000}},{"1":50000,"2":149720,"3":{"4":14972000}},{"1":50000,"2":147480,"3":{"4":14748000}},{"1":50000,"2":147020,"3":{"4":14702000}},{"1":50000,"2":151610,"3":{"4":15161000}},{"1":50000,"2":150920,"3":{"4":15092000}},{"1":50000,"2":149510,"3":{"4":14951000}},{"1":50000,"2":149980,"3":{"4":14998000}},{"1":50000,"2":148540,"3":{"4":14854000}},{"1":50000,"2":148790,"3":{"4":14879000}},{"1":50000,"2":148000,"3":{"4":14800000}},{"1":50000,"2":148090,"3":{"4":14809000}},{"1":50000,"2":148180,"3":{"4":14818000}},{"1":50000,"2":141420,"3":{"4":14142000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50065,"2":7730,"3":{"5":773000}},{"1":50050,"2":7920,"3":{"5":792000}},{"1":50050,"2":8980,"3":{"5":898000}},{"1":50000,"2":8660,"3":{"5":866000}},{"1":50000,"2":8700,"3":{"5":870000}},{"1":50005,"2":8620,"3":{"5":862000}},{"1":50030,"2":8600,"3":{"5":860000}},{"1":50010,"2":8790,"3":{"5":879000}},{"1":50045,"2":8520,"3":{"5":852000}},{"1":50030,"2":8800,"3":{"5":880000}},{"1":50025,"2":8650,"3":{"5":865000}},{"1":50040,"2":8490,"3":{"5":849000}},{"1":50015,"2":8860,"3":{"5":886000}},{"1":50030,"2":8650,"3":{"5":865000}},{"1":50020,"2":8590,"3":{"5":859000}},{"1":50000,"2":8670,"3":{"5":867000}},{"1":50035,"2":7750,"3":{"5":775000}},{"1":50005,"2":8590,"3":{"5":859000}},{"1":50025,"2":8540,"3":{"5":854000}},{"1":50020,"2":8550,"3":{"5":855000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50080,"2":7790,"3":{"5":779000}},{"1":50050,"2":8590,"3":{"5":859000}},{"1":50025,"2":8600,"3":{"5":860000}},{"1":50040,"2":8670,"3":{"5":867000}},{"1":50000,"2":7940,"3":{"5":794000}},{"1":50015,"2":8600,"3":{"5":860000}},{"1":50015,"2":8670,"3":{"5":867000}},{"1":50000,"2":8540,"3":{"5":854000}},{"1":50000,"2":8520,"3":{"5":852000}},{"1":50025,"2":8610,"3":{"5":861000}},{"1":50000,"2":8640,"3":{"5":864000}},{"1":50010,"2":8690,"3":{"5":869000}},{"1":50035,"2":8590,"3":{"5":859000}},{"1":50040,"2":8630,"3":{"5":863000}},{"1":50025,"2":8680,"3":{"5":868000}},{"1":50055,"2":8620,"3":{"5":862000}},{"1":50020,"2":8700,"3":{"5":870000}},{"1":50025,"2":8750,"3":{"5":875000}},{"1":50010,"2":8570,"3":{"5":857000}},{"1":50000,"2":8730,"3":{"5":873000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50020,"2":9700,"3":{"4":970000}},{"1":50025,"2":9520,"3":{"4":952000}},{"1":50005,"2":9220,"3":{"4":922000}},{"1":50015,"2":10580,"3":{"4":1058000}},{"1":50010,"2":10370,"3":{"4":1037000}},{"1":50015,"2":10160,"3":{"4":1016000}},{"1":50015,"2":10730,"3":{"4":1073000}},{"1":50010,"2":10450,"3":{"4":1045000}},{"1":50030,"2":9470,"3":{"4":947000}},{"1":50010,"2":9560,"3":{"4":956000}},{"1":50010,"2":10450,"3":{"4":1045000}},{"1":50025,"2":10500,"3":{"4":1050000}},{"1":50025,"2":10660,"3":{"4":1066000}},{"1":50020,"2":10600,"3":{"4":1060000}},{"1":50020,"2":10620,"3":{"4":1062000}},{"1":50015,"2":10880,"3":{"4":1088000}},{"1":50015,"2":10800,"3":{"4":1080000}},{"1":50010,"2":10550,"3":{"4":1055000}},{"1":50015,"2":10780,"3":{"4":1078000}},{"1":50025,"2":10680,"3":{"4":1068000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50020,"2":8610,"3":{"4":861000}},{"1":50055,"2":8030,"3":{"4":803000}},{"1":50050,"2":8330,"3":{"4":833000}},{"1":50005,"2":8980,"3":{"4":898000}},{"1":50050,"2":8680,"3":{"4":868000}},{"1":50080,"2":9040,"3":{"4":904000}},{"1":50040,"2":9300,"3":{"4":930000}},{"1":50000,"2":8070,"3":{"4":807000}},{"1":50010,"2":9340,"3":{"4":934000}},{"1":50010,"2":8800,"3":{"4":880000}},{"1":50015,"2":8930,"3":{"4":893000}},{"1":50010,"2":9070,"3":{"4":907000}},{"1":50015,"2":8670,"3":{"4":867000}},{"1":50025,"2":9020,"3":{"4":902000}},{"1":50020,"2":9080,"3":{"4":908000}},{"1":50015,"2":8970,"3":{"4":897000}},{"1":50025,"2":8700,"3":{"4":870000}},{"1":50035,"2":9130,"3":{"4":913000}},{"1":50035,"2":8510,"3":{"4":851000}},{"1":50040,"2":8760,"3":{"4":876000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.4.2/props_vm.pb.json b/benchmark/data/skybrian-macbookpro/0.4.2/props_vm.pb.json
deleted file mode 100644
index 0bd3ffb..0000000
--- a/benchmark/data/skybrian-macbookpro/0.4.2/props_vm.pb.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "props_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.12.0 (Mon Aug 31 04:17:53 2015) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50000,"2":371300,"3":{"4":37130000}},{"1":50001,"2":403670,"3":{"4":40367000}},{"1":50000,"2":490170,"3":{"4":49017000}},{"1":50002,"2":486470,"3":{"4":48647000}},{"1":50000,"2":464930,"3":{"4":46493000}},{"1":50000,"2":489650,"3":{"4":48965000}},{"1":50000,"2":488010,"3":{"4":48801000}},{"1":50000,"2":408830,"3":{"4":40883000}},{"1":50000,"2":482770,"3":{"4":48277000}},{"1":50000,"2":484200,"3":{"4":48420000}},{"1":50000,"2":433480,"3":{"4":43348000}},{"1":50000,"2":435490,"3":{"4":43549000}},{"1":50000,"2":484370,"3":{"4":48437000}},{"1":50000,"2":474640,"3":{"4":47464000}},{"1":50000,"2":477680,"3":{"4":47768000}},{"1":50000,"2":484800,"3":{"4":48480000}},{"1":50000,"2":477760,"3":{"4":47776000}},{"1":50000,"2":480860,"3":{"4":48086000}},{"1":50000,"2":486050,"3":{"4":48605000}},{"1":50000,"2":434680,"3":{"4":43468000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50000,"2":477160,"3":{"4":47716000}},{"1":50000,"2":441530,"3":{"4":44153000}},{"1":50000,"2":437330,"3":{"4":43733000}},{"1":50000,"2":490950,"3":{"4":49095000}},{"1":50000,"2":487810,"3":{"4":48781000}},{"1":50000,"2":482510,"3":{"4":48251000}},{"1":50000,"2":460280,"3":{"4":46028000}},{"1":50000,"2":481130,"3":{"4":48113000}},{"1":50000,"2":490690,"3":{"4":49069000}},{"1":50000,"2":493300,"3":{"4":49330000}},{"1":50000,"2":475340,"3":{"4":47534000}},{"1":50000,"2":427860,"3":{"4":42786000}},{"1":50000,"2":477700,"3":{"4":47770000}},{"1":50000,"2":486390,"3":{"4":48639000}},{"1":50000,"2":488120,"3":{"4":48812000}},{"1":50000,"2":485940,"3":{"4":48594000}},{"1":50000,"2":485400,"3":{"4":48540000}},{"1":50000,"2":474220,"3":{"4":47422000}},{"1":50000,"2":479850,"3":{"4":47985000}},{"1":50000,"2":480500,"3":{"4":48050000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50011,"2":7100,"3":{"5":710000}},{"1":50017,"2":6480,"3":{"5":648000}},{"1":50063,"2":7200,"3":{"5":720000}},{"1":50068,"2":7260,"3":{"5":726000}},{"1":50055,"2":6590,"3":{"5":659000}},{"1":50053,"2":7130,"3":{"5":713000}},{"1":50047,"2":7180,"3":{"5":718000}},{"1":50027,"2":7120,"3":{"5":712000}},{"1":50012,"2":7130,"3":{"5":713000}},{"1":50024,"2":7110,"3":{"5":711000}},{"1":50023,"2":6900,"3":{"5":690000}},{"1":50003,"2":6860,"3":{"5":686000}},{"1":50019,"2":6020,"3":{"5":602000}},{"1":50058,"2":6730,"3":{"5":673000}},{"1":50027,"2":6420,"3":{"5":642000}},{"1":50054,"2":6880,"3":{"5":688000}},{"1":50000,"2":6830,"3":{"5":683000}},{"1":50051,"2":6640,"3":{"5":664000}},{"1":50054,"2":6650,"3":{"5":665000}},{"1":50086,"2":6640,"3":{"5":664000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50040,"2":7140,"3":{"5":714000}},{"1":50013,"2":6300,"3":{"5":630000}},{"1":50046,"2":6950,"3":{"5":695000}},{"1":50002,"2":7050,"3":{"5":705000}},{"1":50010,"2":7010,"3":{"5":701000}},{"1":50210,"2":7050,"3":{"5":705000}},{"1":50098,"2":7150,"3":{"5":715000}},{"1":50029,"2":7140,"3":{"5":714000}},{"1":50005,"2":7050,"3":{"5":705000}},{"1":50005,"2":7120,"3":{"5":712000}},{"1":50070,"2":6830,"3":{"5":683000}},{"1":50078,"2":6800,"3":{"5":680000}},{"1":50008,"2":6700,"3":{"5":670000}},{"1":50059,"2":6780,"3":{"5":678000}},{"1":50020,"2":6860,"3":{"5":686000}},{"1":50053,"2":6650,"3":{"5":665000}},{"1":50053,"2":6910,"3":{"5":691000}},{"1":50049,"2":6820,"3":{"5":682000}},{"1":50026,"2":6850,"3":{"5":685000}},{"1":50063,"2":6790,"3":{"5":679000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50009,"2":30000,"3":{"4":3000000}},{"1":50007,"2":29680,"3":{"4":2968000}},{"1":50003,"2":27430,"3":{"4":2743000}},{"1":50000,"2":31200,"3":{"4":3120000}},{"1":50000,"2":30530,"3":{"4":3053000}},{"1":50011,"2":31220,"3":{"4":3122000}},{"1":50004,"2":27650,"3":{"4":2765000}},{"1":50006,"2":30840,"3":{"4":3084000}},{"1":50006,"2":27600,"3":{"4":2760000}},{"1":50015,"2":30900,"3":{"4":3090000}},{"1":50004,"2":30850,"3":{"4":3085000}},{"1":50009,"2":31060,"3":{"4":3106000}},{"1":50000,"2":30660,"3":{"4":3066000}},{"1":50018,"2":31000,"3":{"4":3100000}},{"1":50015,"2":30470,"3":{"4":3047000}},{"1":50001,"2":30830,"3":{"4":3083000}},{"1":50011,"2":27900,"3":{"4":2790000}},{"1":50001,"2":31470,"3":{"4":3147000}},{"1":50013,"2":30610,"3":{"4":3061000}},{"1":50000,"2":25980,"3":{"4":2598000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50035,"2":11690,"3":{"4":1169000}},{"1":50042,"2":11780,"3":{"4":1178000}},{"1":50018,"2":11690,"3":{"4":1169000}},{"1":50022,"2":11690,"3":{"4":1169000}},{"1":50015,"2":10850,"3":{"4":1085000}},{"1":50003,"2":12040,"3":{"4":1204000}},{"1":50038,"2":11670,"3":{"4":1167000}},{"1":50007,"2":11650,"3":{"4":1165000}},{"1":50012,"2":11550,"3":{"4":1155000}},{"1":50007,"2":11730,"3":{"4":1173000}},{"1":50000,"2":11830,"3":{"4":1183000}},{"1":50034,"2":11700,"3":{"4":1170000}},{"1":50061,"2":10540,"3":{"4":1054000}},{"1":50023,"2":11860,"3":{"4":1186000}},{"1":50003,"2":11380,"3":{"4":1138000}},{"1":50035,"2":11260,"3":{"4":1126000}},{"1":50025,"2":11450,"3":{"4":1145000}},{"1":50007,"2":11920,"3":{"4":1192000}},{"1":50019,"2":11570,"3":{"4":1157000}},{"1":50003,"2":10330,"3":{"4":1033000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.5.0/json_chrome.pb.json b/benchmark/data/skybrian-macbookpro/0.5.0/json_chrome.pb.json
deleted file mode 100644
index 41844ff..0000000
--- a/benchmark/data/skybrian-macbookpro/0.5.0/json_chrome.pb.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/readjson.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.5.0",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.27.2"},
- {"1":"args","2":"hosted","3":"0.13.4"},
- {"1":"async","2":"hosted","3":"1.9.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"boolean_selector","2":"hosted","3":"1.0.1"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.5.1"},
- {"1":"convert","2":"hosted","3":"1.0.1"},
- {"1":"crypto","2":"hosted","3":"0.9.2+1"},
- {"1":"csslib","2":"hosted","3":"0.12.2"},
- {"1":"fixnum","2":"hosted","3":"0.10.2"},
- {"1":"glob","2":"hosted","3":"1.1.2"},
- {"1":"html","2":"hosted","3":"0.12.2+1"},
- {"1":"http_multi_server","2":"hosted","3":"2.0.1"},
- {"1":"http_parser","2":"hosted","3":"2.2.1"},
- {"1":"logging","2":"hosted","3":"0.11.2"},
- {"1":"matcher","2":"hosted","3":"0.12.0+2"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.9"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.2.2"},
- {"1":"protobuf","2":"hosted","3":"0.5.0+1"},
- {"1":"pub_semver","2":"hosted","3":"1.2.4"},
- {"1":"shelf","2":"hosted","3":"0.6.5"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+3"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.2.0"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1+1"},
- {"1":"source_span","2":"hosted","3":"1.2.2"},
- {"1":"stack_trace","2":"hosted","3":"1.6.4"},
- {"1":"stream_channel","2":"hosted","3":"1.3.1"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4+1"},
- {"1":"test","2":"hosted","3":"0.12.13"},
- {"1":"typed_data","2":"hosted","3":"1.1.2"},
- {"1":"utf","2":"hosted","3":"0.9.0+3"},
- {"1":"watcher","2":"hosted","3":"0.9.7"},
- {"1":"web_socket_channel","2":"hosted","3":"1.0.2"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":52670,"2":110,"3":{"1":11000}},{"1":51740,"2":110,"3":{"1":11000}},{"1":52390,"2":110,"3":{"1":11000}},{"1":53165,"2":100,"3":{"1":10000}},{"1":53610,"2":80,"3":{"1":8000}},{"1":51920,"2":120,"3":{"1":12000}},{"1":50305,"2":110,"3":{"1":11000}},{"1":51490,"2":110,"3":{"1":11000}},{"1":50095,"2":110,"3":{"1":11000}},{"1":51420,"2":120,"3":{"1":12000}},{"1":51335,"2":120,"3":{"1":12000}},{"1":56165,"2":110,"3":{"1":11000}},{"1":52490,"2":110,"3":{"1":11000}},{"1":51070,"2":110,"3":{"1":11000}},{"1":52770,"2":110,"3":{"1":11000}},{"1":53280,"2":120,"3":{"1":12000}},{"1":50955,"2":120,"3":{"1":12000}},{"1":52715,"2":120,"3":{"1":12000}},{"1":52680,"2":120,"3":{"1":12000}},{"1":51270,"2":120,"3":{"1":12000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":53345,"2":90,"3":{"1":18000}},{"1":57245,"2":100,"3":{"1":20000}},{"1":54215,"2":90,"3":{"1":18000}},{"1":58300,"2":100,"3":{"1":20000}},{"1":52885,"2":100,"3":{"1":20000}},{"1":52920,"2":100,"3":{"1":20000}},{"1":54845,"2":90,"3":{"1":18000}},{"1":54425,"2":100,"3":{"1":20000}},{"1":53215,"2":100,"3":{"1":20000}},{"1":53140,"2":90,"3":{"1":18000}},{"1":55360,"2":100,"3":{"1":20000}},{"1":53040,"2":90,"3":{"1":18000}},{"1":50560,"2":80,"3":{"1":16000}},{"1":52440,"2":100,"3":{"1":20000}},{"1":52680,"2":90,"3":{"1":18000}},{"1":54625,"2":100,"3":{"1":20000}},{"1":50710,"2":80,"3":{"1":16000}},{"1":53695,"2":90,"3":{"1":18000}},{"1":50970,"2":90,"3":{"1":18000}},{"1":54035,"2":100,"3":{"1":20000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":54240,"2":40,"3":{"1":40000}},{"1":50240,"2":40,"3":{"1":40000}},{"1":61675,"2":50,"3":{"1":50000}},{"1":55995,"2":40,"3":{"1":40000}},{"1":61545,"2":50,"3":{"1":50000}},{"1":51450,"2":40,"3":{"1":40000}},{"1":53615,"2":40,"3":{"1":40000}},{"1":50925,"2":40,"3":{"1":40000}},{"1":50195,"2":40,"3":{"1":40000}},{"1":52195,"2":40,"3":{"1":40000}},{"1":66675,"2":50,"3":{"1":50000}},{"1":61105,"2":50,"3":{"1":50000}},{"1":53395,"2":40,"3":{"1":40000}},{"1":60495,"2":50,"3":{"1":50000}},{"1":60225,"2":50,"3":{"1":50000}},{"1":61050,"2":50,"3":{"1":50000}},{"1":62725,"2":50,"3":{"1":50000}},{"1":54035,"2":40,"3":{"1":40000}},{"1":55225,"2":40,"3":{"1":40000}},{"1":60840,"2":40,"3":{"1":40000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":57580,"2":20,"3":{"1":40000}},{"1":77375,"2":30,"3":{"1":60000}},{"1":75070,"2":30,"3":{"1":60000}},{"1":75060,"2":30,"3":{"1":60000}},{"1":53130,"2":20,"3":{"1":40000}},{"1":72830,"2":30,"3":{"1":60000}},{"1":52905,"2":20,"3":{"1":40000}},{"1":71795,"2":30,"3":{"1":60000}},{"1":53580,"2":20,"3":{"1":40000}},{"1":53365,"2":20,"3":{"1":40000}},{"1":71825,"2":30,"3":{"1":60000}},{"1":50700,"2":20,"3":{"1":40000}},{"1":60315,"2":20,"3":{"1":40000}},{"1":73600,"2":30,"3":{"1":60000}},{"1":57705,"2":20,"3":{"1":40000}},{"1":54380,"2":20,"3":{"1":40000}},{"1":77940,"2":30,"3":{"1":60000}},{"1":51170,"2":20,"3":{"1":40000}},{"1":54435,"2":20,"3":{"1":40000}},{"1":73200,"2":30,"3":{"1":60000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":53505,"2":90,"3":{"1":9000}},{"1":51645,"2":100,"3":{"1":10000}},{"1":50245,"2":100,"3":{"1":10000}},{"1":51065,"2":90,"3":{"1":9000}},{"1":50010,"2":100,"3":{"1":10000}},{"1":50795,"2":100,"3":{"1":10000}},{"1":51375,"2":90,"3":{"1":9000}},{"1":51605,"2":90,"3":{"1":9000}},{"1":51550,"2":90,"3":{"1":9000}},{"1":51100,"2":90,"3":{"1":9000}},{"1":54310,"2":110,"3":{"1":11000}},{"1":51490,"2":100,"3":{"1":10000}},{"1":51485,"2":90,"3":{"1":9000}},{"1":54135,"2":90,"3":{"1":9000}},{"1":50385,"2":100,"3":{"1":10000}},{"1":51040,"2":100,"3":{"1":10000}},{"1":51610,"2":100,"3":{"1":10000}},{"1":50780,"2":90,"3":{"1":9000}},{"1":55255,"2":100,"3":{"1":10000}},{"1":51000,"2":90,"3":{"1":9000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":53830,"2":90,"3":{"1":18000}},{"1":51440,"2":100,"3":{"1":20000}},{"1":52225,"2":100,"3":{"1":20000}},{"1":54010,"2":100,"3":{"1":20000}},{"1":52685,"2":100,"3":{"1":20000}},{"1":53270,"2":80,"3":{"1":16000}},{"1":54675,"2":100,"3":{"1":20000}},{"1":57010,"2":90,"3":{"1":18000}},{"1":51340,"2":90,"3":{"1":18000}},{"1":52095,"2":90,"3":{"1":18000}},{"1":54870,"2":90,"3":{"1":18000}},{"1":52765,"2":90,"3":{"1":18000}},{"1":51770,"2":100,"3":{"1":20000}},{"1":53305,"2":100,"3":{"1":20000}},{"1":54690,"2":90,"3":{"1":18000}},{"1":52440,"2":100,"3":{"1":20000}},{"1":52815,"2":90,"3":{"1":18000}},{"1":52825,"2":100,"3":{"1":20000}},{"1":52470,"2":90,"3":{"1":18000}},{"1":57330,"2":100,"3":{"1":20000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":52770,"2":80,"3":{"1":80000}},{"1":51995,"2":80,"3":{"1":80000}},{"1":56540,"2":80,"3":{"1":80000}},{"1":51415,"2":80,"3":{"1":80000}},{"1":54595,"2":80,"3":{"1":80000}},{"1":51380,"2":80,"3":{"1":80000}},{"1":51399,"2":80,"3":{"1":80000}},{"1":50960,"2":70,"3":{"1":70000}},{"1":58470,"2":80,"3":{"1":80000}},{"1":50795,"2":70,"3":{"1":70000}},{"1":51640,"2":80,"3":{"1":80000}},{"1":58705,"2":80,"3":{"1":80000}},{"1":51825,"2":80,"3":{"1":80000}},{"1":51420,"2":70,"3":{"1":70000}},{"1":51940,"2":80,"3":{"1":80000}},{"1":52275,"2":80,"3":{"1":80000}},{"1":56240,"2":70,"3":{"1":70000}},{"1":55615,"2":80,"3":{"1":80000}},{"1":53480,"2":60,"3":{"1":60000}},{"1":51660,"2":80,"3":{"1":80000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":60370,"2":40,"3":{"1":80000}},{"1":50655,"2":40,"3":{"1":80000}},{"1":52540,"2":40,"3":{"1":80000}},{"1":66690,"2":40,"3":{"1":80000}},{"1":57330,"2":40,"3":{"1":80000}},{"1":53700,"2":40,"3":{"1":80000}},{"1":50750,"2":40,"3":{"1":80000}},{"1":56770,"2":40,"3":{"1":80000}},{"1":51590,"2":40,"3":{"1":80000}},{"1":53755,"2":40,"3":{"1":80000}},{"1":55760,"2":40,"3":{"1":80000}},{"1":52675,"2":40,"3":{"1":80000}},{"1":51620,"2":40,"3":{"1":80000}},{"1":57230,"2":40,"3":{"1":80000}},{"1":56000,"2":40,"3":{"1":80000}},{"1":50570,"2":40,"3":{"1":80000}},{"1":52470,"2":40,"3":{"1":80000}},{"1":56735,"2":40,"3":{"1":80000}},{"1":51405,"2":40,"3":{"1":80000}},{"1":56660,"2":40,"3":{"1":80000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":52375,"2":120,"3":{"2":12000}},{"1":51845,"2":120,"3":{"2":12000}},{"1":52390,"2":120,"3":{"2":12000}},{"1":53510,"2":110,"3":{"2":11000}},{"1":53965,"2":110,"3":{"2":11000}},{"1":53410,"2":110,"3":{"2":11000}},{"1":51715,"2":120,"3":{"2":12000}},{"1":53370,"2":110,"3":{"2":11000}},{"1":52055,"2":120,"3":{"2":12000}},{"1":50250,"2":90,"3":{"2":9000}},{"1":51605,"2":120,"3":{"2":12000}},{"1":53080,"2":120,"3":{"2":12000}},{"1":52450,"2":110,"3":{"2":11000}},{"1":54085,"2":110,"3":{"2":11000}},{"1":52975,"2":120,"3":{"2":12000}},{"1":54650,"2":110,"3":{"2":11000}},{"1":52050,"2":120,"3":{"2":12000}},{"1":52565,"2":100,"3":{"2":10000}},{"1":53660,"2":110,"3":{"2":11000}},{"1":51320,"2":110,"3":{"2":11000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":56220,"2":70,"3":{"2":14000}},{"1":54275,"2":90,"3":{"2":18000}},{"1":53310,"2":100,"3":{"2":20000}},{"1":50175,"2":90,"3":{"2":18000}},{"1":54210,"2":100,"3":{"2":20000}},{"1":54250,"2":100,"3":{"2":20000}},{"1":58280,"2":100,"3":{"2":20000}},{"1":55255,"2":100,"3":{"2":20000}},{"1":54555,"2":100,"3":{"2":20000}},{"1":53635,"2":100,"3":{"2":20000}},{"1":50875,"2":90,"3":{"2":18000}},{"1":51175,"2":90,"3":{"2":18000}},{"1":50640,"2":90,"3":{"2":18000}},{"1":50235,"2":90,"3":{"2":18000}},{"1":52675,"2":80,"3":{"2":16000}},{"1":54675,"2":90,"3":{"2":18000}},{"1":51745,"2":90,"3":{"2":18000}},{"1":52020,"2":90,"3":{"2":18000}},{"1":55185,"2":100,"3":{"2":20000}},{"1":50435,"2":80,"3":{"2":16000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":50625,"2":40,"3":{"2":40000}},{"1":53325,"2":40,"3":{"2":40000}},{"1":50630,"2":40,"3":{"2":40000}},{"1":51015,"2":40,"3":{"2":40000}},{"1":51655,"2":40,"3":{"2":40000}},{"1":60090,"2":40,"3":{"2":40000}},{"1":61435,"2":40,"3":{"2":40000}},{"1":56165,"2":40,"3":{"2":40000}},{"1":57730,"2":40,"3":{"2":40000}},{"1":50780,"2":40,"3":{"2":40000}},{"1":53450,"2":40,"3":{"2":40000}},{"1":56165,"2":40,"3":{"2":40000}},{"1":52465,"2":40,"3":{"2":40000}},{"1":51670,"2":40,"3":{"2":40000}},{"1":61785,"2":40,"3":{"2":40000}},{"1":52540,"2":40,"3":{"2":40000}},{"1":51140,"2":40,"3":{"2":40000}},{"1":50610,"2":40,"3":{"2":40000}},{"1":50915,"2":40,"3":{"2":40000}},{"1":62870,"2":50,"3":{"2":50000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":80500,"2":30,"3":{"2":60000}},{"1":61280,"2":20,"3":{"2":40000}},{"1":75235,"2":30,"3":{"2":60000}},{"1":55220,"2":20,"3":{"2":40000}},{"1":50190,"2":20,"3":{"2":40000}},{"1":57420,"2":20,"3":{"2":40000}},{"1":75260,"2":30,"3":{"2":60000}},{"1":52860,"2":20,"3":{"2":40000}},{"1":51345,"2":20,"3":{"2":40000}},{"1":51085,"2":20,"3":{"2":40000}},{"1":56295,"2":20,"3":{"2":40000}},{"1":50580,"2":20,"3":{"2":40000}},{"1":56745,"2":20,"3":{"2":40000}},{"1":51820,"2":20,"3":{"2":40000}},{"1":59685,"2":20,"3":{"2":40000}},{"1":50355,"2":20,"3":{"2":40000}},{"1":55245,"2":20,"3":{"2":40000}},{"1":50010,"2":20,"3":{"2":40000}},{"1":58580,"2":20,"3":{"2":40000}},{"1":81590,"2":30,"3":{"2":60000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":52465,"2":90,"3":{"2":9000}},{"1":50600,"2":90,"3":{"2":9000}},{"1":50705,"2":100,"3":{"2":10000}},{"1":52100,"2":100,"3":{"2":10000}},{"1":50920,"2":100,"3":{"2":10000}},{"1":56880,"2":90,"3":{"2":9000}},{"1":50755,"2":100,"3":{"2":10000}},{"1":50525,"2":100,"3":{"2":10000}},{"1":53335,"2":90,"3":{"2":9000}},{"1":53555,"2":90,"3":{"2":9000}},{"1":53510,"2":100,"3":{"2":10000}},{"1":50510,"2":100,"3":{"2":10000}},{"1":51690,"2":100,"3":{"2":10000}},{"1":51750,"2":100,"3":{"2":10000}},{"1":52185,"2":90,"3":{"2":9000}},{"1":50695,"2":100,"3":{"2":10000}},{"1":51595,"2":100,"3":{"2":10000}},{"1":50995,"2":100,"3":{"2":10000}},{"1":51390,"2":90,"3":{"2":9000}},{"1":53930,"2":90,"3":{"2":9000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":53875,"2":80,"3":{"2":16000}},{"1":53560,"2":90,"3":{"2":18000}},{"1":50705,"2":90,"3":{"2":18000}},{"1":55040,"2":90,"3":{"2":18000}},{"1":50375,"2":80,"3":{"2":16000}},{"1":53560,"2":100,"3":{"2":20000}},{"1":52990,"2":100,"3":{"2":20000}},{"1":51945,"2":100,"3":{"2":20000}},{"1":53275,"2":100,"3":{"2":20000}},{"1":50180,"2":90,"3":{"2":18000}},{"1":52955,"2":100,"3":{"2":20000}},{"1":54905,"2":100,"3":{"2":20000}},{"1":56055,"2":80,"3":{"2":16000}},{"1":52805,"2":100,"3":{"2":20000}},{"1":52815,"2":100,"3":{"2":20000}},{"1":53000,"2":100,"3":{"2":20000}},{"1":52650,"2":90,"3":{"2":18000}},{"1":55040,"2":100,"3":{"2":20000}},{"1":55155,"2":100,"3":{"2":20000}},{"1":51550,"2":80,"3":{"2":16000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":53505,"2":70,"3":{"2":70000}},{"1":57470,"2":70,"3":{"2":70000}},{"1":54895,"2":80,"3":{"2":80000}},{"1":53735,"2":70,"3":{"2":70000}},{"1":51455,"2":70,"3":{"2":70000}},{"1":60195,"2":80,"3":{"2":80000}},{"1":50050,"2":70,"3":{"2":70000}},{"1":55490,"2":80,"3":{"2":80000}},{"1":51835,"2":70,"3":{"2":70000}},{"1":59105,"2":80,"3":{"2":80000}},{"1":52455,"2":60,"3":{"2":60000}},{"1":53855,"2":70,"3":{"2":70000}},{"1":59185,"2":70,"3":{"2":70000}},{"1":50490,"2":70,"3":{"2":70000}},{"1":55615,"2":80,"3":{"2":80000}},{"1":52625,"2":70,"3":{"2":70000}},{"1":55505,"2":80,"3":{"2":80000}},{"1":51455,"2":70,"3":{"2":70000}},{"1":54980,"2":80,"3":{"2":80000}},{"1":59070,"2":70,"3":{"2":70000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":62030,"2":40,"3":{"2":80000}},{"1":53305,"2":30,"3":{"2":60000}},{"1":59355,"2":40,"3":{"2":80000}},{"1":55360,"2":40,"3":{"2":80000}},{"1":58885,"2":40,"3":{"2":80000}},{"1":54700,"2":30,"3":{"2":60000}},{"1":55485,"2":40,"3":{"2":80000}},{"1":55260,"2":40,"3":{"2":80000}},{"1":55060,"2":40,"3":{"2":80000}},{"1":57435,"2":40,"3":{"2":80000}},{"1":54320,"2":40,"3":{"2":80000}},{"1":54525,"2":40,"3":{"2":80000}},{"1":58735,"2":40,"3":{"2":80000}},{"1":60160,"2":40,"3":{"2":80000}},{"1":54560,"2":40,"3":{"2":80000}},{"1":58970,"2":40,"3":{"2":80000}},{"1":55195,"2":40,"3":{"2":80000}},{"1":55380,"2":40,"3":{"2":80000}},{"1":64105,"2":40,"3":{"2":80000}},{"1":59180,"2":40,"3":{"2":80000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":52065,"2":110,"3":{"4":11000}},{"1":50435,"2":110,"3":{"4":11000}},{"1":51535,"2":120,"3":{"4":12000}},{"1":52465,"2":120,"3":{"4":12000}},{"1":52515,"2":110,"3":{"4":11000}},{"1":53450,"2":120,"3":{"4":12000}},{"1":51505,"2":120,"3":{"4":12000}},{"1":54430,"2":100,"3":{"4":10000}},{"1":53445,"2":110,"3":{"4":11000}},{"1":53280,"2":120,"3":{"4":12000}},{"1":52690,"2":120,"3":{"4":12000}},{"1":50905,"2":100,"3":{"4":10000}},{"1":53240,"2":110,"3":{"4":11000}},{"1":51860,"2":120,"3":{"4":12000}},{"1":51910,"2":110,"3":{"4":11000}},{"1":53510,"2":120,"3":{"4":12000}},{"1":56595,"2":120,"3":{"4":12000}},{"1":52235,"2":120,"3":{"4":12000}},{"1":52790,"2":120,"3":{"4":12000}},{"1":51835,"2":120,"3":{"4":12000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":57035,"2":100,"3":{"4":20000}},{"1":53155,"2":100,"3":{"4":20000}},{"1":53770,"2":100,"3":{"4":20000}},{"1":53015,"2":90,"3":{"4":18000}},{"1":56310,"2":100,"3":{"4":20000}},{"1":53815,"2":100,"3":{"4":20000}},{"1":53555,"2":100,"3":{"4":20000}},{"1":53125,"2":100,"3":{"4":20000}},{"1":51265,"2":90,"3":{"4":18000}},{"1":52750,"2":100,"3":{"4":20000}},{"1":52110,"2":90,"3":{"4":18000}},{"1":50795,"2":90,"3":{"4":18000}},{"1":54930,"2":100,"3":{"4":20000}},{"1":53365,"2":90,"3":{"4":18000}},{"1":52630,"2":90,"3":{"4":18000}},{"1":54010,"2":100,"3":{"4":20000}},{"1":51140,"2":90,"3":{"4":18000}},{"1":54200,"2":90,"3":{"4":18000}},{"1":54710,"2":100,"3":{"4":20000}},{"1":53235,"2":100,"3":{"4":20000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":50455,"2":40,"3":{"4":40000}},{"1":62350,"2":50,"3":{"4":50000}},{"1":56415,"2":40,"3":{"4":40000}},{"1":56395,"2":40,"3":{"4":40000}},{"1":61770,"2":50,"3":{"4":50000}},{"1":50625,"2":40,"3":{"4":40000}},{"1":56575,"2":40,"3":{"4":40000}},{"1":61415,"2":50,"3":{"4":50000}},{"1":55670,"2":40,"3":{"4":40000}},{"1":50435,"2":40,"3":{"4":40000}},{"1":61225,"2":40,"3":{"4":40000}},{"1":53655,"2":30,"3":{"4":30000}},{"1":51515,"2":40,"3":{"4":40000}},{"1":55585,"2":40,"3":{"4":40000}},{"1":55240,"2":40,"3":{"4":40000}},{"1":50765,"2":40,"3":{"4":40000}},{"1":53405,"2":30,"3":{"4":30000}},{"1":50495,"2":40,"3":{"4":40000}},{"1":63210,"2":50,"3":{"4":50000}},{"1":52720,"2":40,"3":{"4":40000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":57475,"2":20,"3":{"4":40000}},{"1":54900,"2":20,"3":{"4":40000}},{"1":54830,"2":20,"3":{"4":40000}},{"1":74540,"2":30,"3":{"4":60000}},{"1":62440,"2":20,"3":{"4":40000}},{"1":54405,"2":20,"3":{"4":40000}},{"1":59730,"2":20,"3":{"4":40000}},{"1":74530,"2":30,"3":{"4":60000}},{"1":74380,"2":30,"3":{"4":60000}},{"1":50700,"2":20,"3":{"4":40000}},{"1":50080,"2":20,"3":{"4":40000}},{"1":52060,"2":20,"3":{"4":40000}},{"1":59810,"2":20,"3":{"4":40000}},{"1":74160,"2":30,"3":{"4":60000}},{"1":52505,"2":20,"3":{"4":40000}},{"1":50515,"2":20,"3":{"4":40000}},{"1":74380,"2":30,"3":{"4":60000}},{"1":50935,"2":20,"3":{"4":40000}},{"1":74645,"2":30,"3":{"4":60000}},{"1":73875,"2":30,"3":{"4":60000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":54005,"2":30,"3":{"4":30000}},{"1":70725,"2":40,"3":{"4":40000}},{"1":51860,"2":30,"3":{"4":30000}},{"1":52115,"2":30,"3":{"4":30000}},{"1":60440,"2":40,"3":{"4":40000}},{"1":53850,"2":30,"3":{"4":30000}},{"1":51330,"2":30,"3":{"4":30000}},{"1":67405,"2":40,"3":{"4":40000}},{"1":52780,"2":30,"3":{"4":30000}},{"1":55065,"2":30,"3":{"4":30000}},{"1":66265,"2":40,"3":{"4":40000}},{"1":66095,"2":40,"3":{"4":40000}},{"1":60265,"2":40,"3":{"4":40000}},{"1":65585,"2":40,"3":{"4":40000}},{"1":58665,"2":30,"3":{"4":30000}},{"1":50685,"2":30,"3":{"4":30000}},{"1":59575,"2":40,"3":{"4":40000}},{"1":60660,"2":40,"3":{"4":40000}},{"1":61320,"2":40,"3":{"4":40000}},{"1":50620,"2":30,"3":{"4":30000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":55075,"2":100,"3":{"4":10000}},{"1":54145,"2":90,"3":{"4":9000}},{"1":51055,"2":90,"3":{"4":9000}},{"1":51810,"2":100,"3":{"4":10000}},{"1":52080,"2":100,"3":{"4":10000}},{"1":50335,"2":80,"3":{"4":8000}},{"1":51290,"2":100,"3":{"4":10000}},{"1":52200,"2":100,"3":{"4":10000}},{"1":50840,"2":100,"3":{"4":10000}},{"1":51370,"2":90,"3":{"4":9000}},{"1":51025,"2":100,"3":{"4":10000}},{"1":52720,"2":90,"3":{"4":9000}},{"1":51950,"2":80,"3":{"4":8000}},{"1":50920,"2":90,"3":{"4":9000}},{"1":54140,"2":100,"3":{"4":10000}},{"1":50840,"2":100,"3":{"4":10000}},{"1":53185,"2":100,"3":{"4":10000}},{"1":52375,"2":100,"3":{"4":10000}},{"1":53610,"2":100,"3":{"4":10000}},{"1":50465,"2":100,"3":{"4":10000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50380,"2":70,"3":{"4":14000}},{"1":52350,"2":100,"3":{"4":20000}},{"1":52920,"2":100,"3":{"4":20000}},{"1":54270,"2":100,"3":{"4":20000}},{"1":53470,"2":100,"3":{"4":20000}},{"1":53800,"2":90,"3":{"4":18000}},{"1":52850,"2":100,"3":{"4":20000}},{"1":55970,"2":80,"3":{"4":16000}},{"1":52465,"2":100,"3":{"4":20000}},{"1":53725,"2":100,"3":{"4":20000}},{"1":53350,"2":100,"3":{"4":20000}},{"1":54010,"2":100,"3":{"4":20000}},{"1":53140,"2":90,"3":{"4":18000}},{"1":53200,"2":100,"3":{"4":20000}},{"1":53055,"2":90,"3":{"4":18000}},{"1":54320,"2":100,"3":{"4":20000}},{"1":53435,"2":100,"3":{"4":20000}},{"1":50145,"2":80,"3":{"4":16000}},{"1":52465,"2":90,"3":{"4":18000}},{"1":52545,"2":100,"3":{"4":20000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53940,"2":80,"3":{"4":80000}},{"1":53825,"2":70,"3":{"4":70000}},{"1":55140,"2":80,"3":{"4":80000}},{"1":54450,"2":70,"3":{"4":70000}},{"1":55820,"2":80,"3":{"4":80000}},{"1":54745,"2":80,"3":{"4":80000}},{"1":56125,"2":80,"3":{"4":80000}},{"1":54435,"2":80,"3":{"4":80000}},{"1":56770,"2":70,"3":{"4":70000}},{"1":56040,"2":70,"3":{"4":70000}},{"1":51420,"2":70,"3":{"4":70000}},{"1":55105,"2":80,"3":{"4":80000}},{"1":55185,"2":80,"3":{"4":80000}},{"1":54200,"2":70,"3":{"4":70000}},{"1":53825,"2":70,"3":{"4":70000}},{"1":55080,"2":80,"3":{"4":80000}},{"1":56335,"2":70,"3":{"4":70000}},{"1":54335,"2":60,"3":{"4":60000}},{"1":55675,"2":80,"3":{"4":80000}},{"1":54330,"2":80,"3":{"4":80000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":59160,"2":40,"3":{"4":80000}},{"1":55005,"2":40,"3":{"4":80000}},{"1":54670,"2":40,"3":{"4":80000}},{"1":52545,"2":30,"3":{"4":60000}},{"1":54305,"2":40,"3":{"4":80000}},{"1":54815,"2":40,"3":{"4":80000}},{"1":54415,"2":40,"3":{"4":80000}},{"1":57035,"2":40,"3":{"4":80000}},{"1":63300,"2":40,"3":{"4":80000}},{"1":55280,"2":40,"3":{"4":80000}},{"1":56530,"2":40,"3":{"4":80000}},{"1":54165,"2":40,"3":{"4":80000}},{"1":52300,"2":30,"3":{"4":60000}},{"1":60870,"2":40,"3":{"4":80000}},{"1":55810,"2":40,"3":{"4":80000}},{"1":53830,"2":40,"3":{"4":80000}},{"1":61065,"2":40,"3":{"4":80000}},{"1":53685,"2":40,"3":{"4":80000}},{"1":54025,"2":40,"3":{"4":80000}},{"1":54560,"2":40,"3":{"4":80000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":56430,"2":50,"3":{"4":50000}},{"1":54755,"2":40,"3":{"4":40000}},{"1":56245,"2":50,"3":{"4":50000}},{"1":50305,"2":40,"3":{"4":40000}},{"1":50765,"2":50,"3":{"4":50000}},{"1":60480,"2":40,"3":{"4":40000}},{"1":52375,"2":50,"3":{"4":50000}},{"1":56355,"2":40,"3":{"4":40000}},{"1":55220,"2":50,"3":{"4":50000}},{"1":50830,"2":40,"3":{"4":40000}},{"1":55715,"2":60,"3":{"4":60000}},{"1":54525,"2":40,"3":{"4":40000}},{"1":59580,"2":60,"3":{"4":60000}},{"1":61450,"2":50,"3":{"4":50000}},{"1":52635,"2":50,"3":{"4":50000}},{"1":65175,"2":40,"3":{"4":40000}},{"1":57050,"2":60,"3":{"4":60000}},{"1":60555,"2":50,"3":{"4":50000}},{"1":53650,"2":50,"3":{"4":50000}},{"1":61180,"2":50,"3":{"4":50000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.5.0/json_vm.pb.json b/benchmark/data/skybrian-macbookpro/0.5.0/json_vm.pb.json
deleted file mode 100644
index 8861da3..0000000
--- a/benchmark/data/skybrian-macbookpro/0.5.0/json_vm.pb.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "readjson_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.14.2 (Tue Feb 9 15:10:44 2016) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.5.0",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.27.2"},
- {"1":"args","2":"hosted","3":"0.13.4"},
- {"1":"async","2":"hosted","3":"1.9.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"boolean_selector","2":"hosted","3":"1.0.1"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.5.1"},
- {"1":"convert","2":"hosted","3":"1.0.1"},
- {"1":"crypto","2":"hosted","3":"0.9.2+1"},
- {"1":"csslib","2":"hosted","3":"0.12.2"},
- {"1":"fixnum","2":"hosted","3":"0.10.2"},
- {"1":"glob","2":"hosted","3":"1.1.2"},
- {"1":"html","2":"hosted","3":"0.12.2+1"},
- {"1":"http_multi_server","2":"hosted","3":"2.0.1"},
- {"1":"http_parser","2":"hosted","3":"2.2.1"},
- {"1":"logging","2":"hosted","3":"0.11.2"},
- {"1":"matcher","2":"hosted","3":"0.12.0+2"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.9"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.2.2"},
- {"1":"protobuf","2":"hosted","3":"0.5.0+1"},
- {"1":"pub_semver","2":"hosted","3":"1.2.4"},
- {"1":"shelf","2":"hosted","3":"0.6.5"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+3"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.2.0"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1+1"},
- {"1":"source_span","2":"hosted","3":"1.2.2"},
- {"1":"stack_trace","2":"hosted","3":"1.6.4"},
- {"1":"stream_channel","2":"hosted","3":"1.3.1"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4+1"},
- {"1":"test","2":"hosted","3":"0.12.13"},
- {"1":"typed_data","2":"hosted","3":"1.1.2"},
- {"1":"utf","2":"hosted","3":"0.9.0+3"},
- {"1":"watcher","2":"hosted","3":"0.9.7"},
- {"1":"web_socket_channel","2":"hosted","3":"1.0.2"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":50970,"2":410,"3":{"1":41000}},{"1":50654,"2":480,"3":{"1":48000}},{"1":50579,"2":620,"3":{"1":62000}},{"1":50396,"2":610,"3":{"1":61000}},{"1":50002,"2":570,"3":{"1":57000}},{"1":50367,"2":570,"3":{"1":57000}},{"1":50081,"2":640,"3":{"1":64000}},{"1":50528,"2":630,"3":{"1":63000}},{"1":50613,"2":640,"3":{"1":64000}},{"1":50051,"2":530,"3":{"1":53000}},{"1":50690,"2":530,"3":{"1":53000}},{"1":50286,"2":600,"3":{"1":60000}},{"1":50384,"2":600,"3":{"1":60000}},{"1":51261,"2":510,"3":{"1":51000}},{"1":50094,"2":590,"3":{"1":59000}},{"1":50199,"2":540,"3":{"1":54000}},{"1":50319,"2":600,"3":{"1":60000}},{"1":50078,"2":480,"3":{"1":48000}},{"1":50315,"2":580,"3":{"1":58000}},{"1":50393,"2":590,"3":{"1":59000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":50733,"2":450,"3":{"1":90000}},{"1":50142,"2":500,"3":{"1":100000}},{"1":50836,"2":510,"3":{"1":102000}},{"1":50656,"2":510,"3":{"1":102000}},{"1":50451,"2":480,"3":{"1":96000}},{"1":50326,"2":470,"3":{"1":94000}},{"1":50972,"2":500,"3":{"1":100000}},{"1":50817,"2":510,"3":{"1":102000}},{"1":50523,"2":490,"3":{"1":98000}},{"1":50973,"2":500,"3":{"1":100000}},{"1":50055,"2":450,"3":{"1":90000}},{"1":51014,"2":480,"3":{"1":96000}},{"1":50692,"2":470,"3":{"1":94000}},{"1":51031,"2":440,"3":{"1":88000}},{"1":50754,"2":500,"3":{"1":100000}},{"1":50478,"2":490,"3":{"1":98000}},{"1":50938,"2":500,"3":{"1":100000}},{"1":50765,"2":500,"3":{"1":100000}},{"1":50091,"2":490,"3":{"1":98000}},{"1":51716,"2":480,"3":{"1":96000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":51071,"2":150,"3":{"1":150000}},{"1":50453,"2":150,"3":{"1":150000}},{"1":50487,"2":150,"3":{"1":150000}},{"1":51074,"2":160,"3":{"1":160000}},{"1":51668,"2":160,"3":{"1":160000}},{"1":52959,"2":160,"3":{"1":160000}},{"1":52812,"2":160,"3":{"1":160000}},{"1":53104,"2":160,"3":{"1":160000}},{"1":53137,"2":150,"3":{"1":150000}},{"1":51332,"2":160,"3":{"1":160000}},{"1":51178,"2":150,"3":{"1":150000}},{"1":52180,"2":150,"3":{"1":150000}},{"1":52845,"2":160,"3":{"1":160000}},{"1":53160,"2":160,"3":{"1":160000}},{"1":51982,"2":160,"3":{"1":160000}},{"1":51856,"2":160,"3":{"1":160000}},{"1":53063,"2":150,"3":{"1":150000}},{"1":51828,"2":160,"3":{"1":160000}},{"1":52836,"2":160,"3":{"1":160000}},{"1":51700,"2":160,"3":{"1":160000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":50769,"2":70,"3":{"1":140000}},{"1":52258,"2":80,"3":{"1":160000}},{"1":55646,"2":80,"3":{"1":160000}},{"1":51431,"2":80,"3":{"1":160000}},{"1":51958,"2":80,"3":{"1":160000}},{"1":51320,"2":80,"3":{"1":160000}},{"1":50059,"2":70,"3":{"1":140000}},{"1":52246,"2":80,"3":{"1":160000}},{"1":55435,"2":80,"3":{"1":160000}},{"1":52202,"2":70,"3":{"1":140000}},{"1":50901,"2":70,"3":{"1":140000}},{"1":52015,"2":80,"3":{"1":160000}},{"1":50107,"2":70,"3":{"1":140000}},{"1":52628,"2":80,"3":{"1":160000}},{"1":56468,"2":80,"3":{"1":160000}},{"1":53249,"2":80,"3":{"1":160000}},{"1":50994,"2":70,"3":{"1":140000}},{"1":51761,"2":80,"3":{"1":160000}},{"1":52504,"2":80,"3":{"1":160000}},{"1":56761,"2":80,"3":{"1":160000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50278,"2":500,"3":{"1":50000}},{"1":50429,"2":510,"3":{"1":51000}},{"1":50826,"2":470,"3":{"1":47000}},{"1":50719,"2":480,"3":{"1":48000}},{"1":50234,"2":480,"3":{"1":48000}},{"1":50092,"2":500,"3":{"1":50000}},{"1":50950,"2":500,"3":{"1":50000}},{"1":50221,"2":510,"3":{"1":51000}},{"1":50060,"2":440,"3":{"1":44000}},{"1":50970,"2":480,"3":{"1":48000}},{"1":50668,"2":450,"3":{"1":45000}},{"1":50138,"2":490,"3":{"1":49000}},{"1":50153,"2":460,"3":{"1":46000}},{"1":50779,"2":480,"3":{"1":48000}},{"1":50960,"2":510,"3":{"1":51000}},{"1":50864,"2":490,"3":{"1":49000}},{"1":50439,"2":510,"3":{"1":51000}},{"1":50495,"2":450,"3":{"1":45000}},{"1":50414,"2":490,"3":{"1":49000}},{"1":50597,"2":500,"3":{"1":50000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50429,"2":470,"3":{"1":94000}},{"1":51032,"2":470,"3":{"1":94000}},{"1":50861,"2":430,"3":{"1":86000}},{"1":50592,"2":470,"3":{"1":94000}},{"1":50853,"2":430,"3":{"1":86000}},{"1":50007,"2":370,"3":{"1":74000}},{"1":50314,"2":420,"3":{"1":84000}},{"1":50372,"2":470,"3":{"1":94000}},{"1":50231,"2":430,"3":{"1":86000}},{"1":50003,"2":460,"3":{"1":92000}},{"1":50960,"2":380,"3":{"1":76000}},{"1":50699,"2":450,"3":{"1":90000}},{"1":50243,"2":460,"3":{"1":92000}},{"1":50778,"2":420,"3":{"1":84000}},{"1":50787,"2":470,"3":{"1":94000}},{"1":50889,"2":470,"3":{"1":94000}},{"1":50647,"2":450,"3":{"1":90000}},{"1":50102,"2":460,"3":{"1":92000}},{"1":50093,"2":380,"3":{"1":76000}},{"1":51049,"2":390,"3":{"1":78000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50861,"2":250,"3":{"1":250000}},{"1":50027,"2":260,"3":{"1":260000}},{"1":51591,"2":260,"3":{"1":260000}},{"1":50513,"2":250,"3":{"1":250000}},{"1":51333,"2":270,"3":{"1":270000}},{"1":51044,"2":250,"3":{"1":250000}},{"1":51152,"2":250,"3":{"1":250000}},{"1":53097,"2":230,"3":{"1":230000}},{"1":50266,"2":250,"3":{"1":250000}},{"1":52762,"2":230,"3":{"1":230000}},{"1":51455,"2":240,"3":{"1":240000}},{"1":50834,"2":230,"3":{"1":230000}},{"1":51740,"2":270,"3":{"1":270000}},{"1":50701,"2":240,"3":{"1":240000}},{"1":51501,"2":250,"3":{"1":250000}},{"1":50923,"2":240,"3":{"1":240000}},{"1":50743,"2":240,"3":{"1":240000}},{"1":51257,"2":270,"3":{"1":270000}},{"1":50229,"2":260,"3":{"1":260000}},{"1":50511,"2":240,"3":{"1":240000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":53944,"2":140,"3":{"1":280000}},{"1":50961,"2":120,"3":{"1":240000}},{"1":51186,"2":120,"3":{"1":240000}},{"1":51132,"2":120,"3":{"1":240000}},{"1":50976,"2":130,"3":{"1":260000}},{"1":50543,"2":120,"3":{"1":240000}},{"1":53542,"2":140,"3":{"1":280000}},{"1":53704,"2":120,"3":{"1":240000}},{"1":50180,"2":130,"3":{"1":260000}},{"1":51639,"2":130,"3":{"1":260000}},{"1":50039,"2":130,"3":{"1":260000}},{"1":52357,"2":120,"3":{"1":240000}},{"1":50793,"2":130,"3":{"1":260000}},{"1":50183,"2":130,"3":{"1":260000}},{"1":53909,"2":130,"3":{"1":260000}},{"1":53026,"2":120,"3":{"1":240000}},{"1":50407,"2":130,"3":{"1":260000}},{"1":51379,"2":120,"3":{"1":240000}},{"1":53035,"2":110,"3":{"1":220000}},{"1":53388,"2":130,"3":{"1":260000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50727,"2":580,"3":{"2":58000}},{"1":50798,"2":580,"3":{"2":58000}},{"1":50179,"2":600,"3":{"2":60000}},{"1":50555,"2":580,"3":{"2":58000}},{"1":50322,"2":570,"3":{"2":57000}},{"1":50693,"2":600,"3":{"2":60000}},{"1":51827,"2":550,"3":{"2":55000}},{"1":50628,"2":600,"3":{"2":60000}},{"1":50547,"2":600,"3":{"2":60000}},{"1":50348,"2":600,"3":{"2":60000}},{"1":50606,"2":550,"3":{"2":55000}},{"1":50556,"2":620,"3":{"2":62000}},{"1":50245,"2":560,"3":{"2":56000}},{"1":50243,"2":440,"3":{"2":44000}},{"1":50514,"2":620,"3":{"2":62000}},{"1":50627,"2":620,"3":{"2":62000}},{"1":50399,"2":590,"3":{"2":59000}},{"1":50367,"2":620,"3":{"2":62000}},{"1":51089,"2":500,"3":{"2":50000}},{"1":50662,"2":610,"3":{"2":61000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":50661,"2":480,"3":{"2":96000}},{"1":50459,"2":420,"3":{"2":84000}},{"1":50894,"2":480,"3":{"2":96000}},{"1":50618,"2":470,"3":{"2":94000}},{"1":50991,"2":470,"3":{"2":94000}},{"1":50400,"2":470,"3":{"2":94000}},{"1":50545,"2":430,"3":{"2":86000}},{"1":50020,"2":410,"3":{"2":82000}},{"1":51046,"2":480,"3":{"2":96000}},{"1":50161,"2":460,"3":{"2":92000}},{"1":50103,"2":440,"3":{"2":88000}},{"1":50597,"2":460,"3":{"2":92000}},{"1":50590,"2":460,"3":{"2":92000}},{"1":50657,"2":450,"3":{"2":90000}},{"1":50332,"2":450,"3":{"2":90000}},{"1":50376,"2":440,"3":{"2":88000}},{"1":50412,"2":470,"3":{"2":94000}},{"1":50775,"2":470,"3":{"2":94000}},{"1":50586,"2":490,"3":{"2":98000}},{"1":50447,"2":480,"3":{"2":96000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":52390,"2":150,"3":{"2":150000}},{"1":52669,"2":150,"3":{"2":150000}},{"1":52529,"2":130,"3":{"2":130000}},{"1":52950,"2":140,"3":{"2":140000}},{"1":51251,"2":130,"3":{"2":130000}},{"1":50485,"2":130,"3":{"2":130000}},{"1":53195,"2":140,"3":{"2":140000}},{"1":51410,"2":140,"3":{"2":140000}},{"1":53497,"2":150,"3":{"2":150000}},{"1":51736,"2":150,"3":{"2":150000}},{"1":52504,"2":150,"3":{"2":150000}},{"1":51225,"2":150,"3":{"2":150000}},{"1":52521,"2":150,"3":{"2":150000}},{"1":52605,"2":140,"3":{"2":140000}},{"1":53575,"2":140,"3":{"2":140000}},{"1":51048,"2":150,"3":{"2":150000}},{"1":51989,"2":140,"3":{"2":140000}},{"1":50589,"2":120,"3":{"2":120000}},{"1":51932,"2":130,"3":{"2":130000}},{"1":51308,"2":150,"3":{"2":150000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":52125,"2":70,"3":{"2":140000}},{"1":55195,"2":80,"3":{"2":160000}},{"1":50245,"2":70,"3":{"2":140000}},{"1":53895,"2":70,"3":{"2":140000}},{"1":53432,"2":70,"3":{"2":140000}},{"1":54138,"2":60,"3":{"2":120000}},{"1":55584,"2":70,"3":{"2":140000}},{"1":55872,"2":80,"3":{"2":160000}},{"1":56588,"2":80,"3":{"2":160000}},{"1":55619,"2":80,"3":{"2":160000}},{"1":53594,"2":70,"3":{"2":140000}},{"1":55093,"2":80,"3":{"2":160000}},{"1":55150,"2":80,"3":{"2":160000}},{"1":54692,"2":80,"3":{"2":160000}},{"1":54462,"2":80,"3":{"2":160000}},{"1":54317,"2":80,"3":{"2":160000}},{"1":54250,"2":70,"3":{"2":140000}},{"1":56554,"2":80,"3":{"2":160000}},{"1":54161,"2":80,"3":{"2":160000}},{"1":54002,"2":80,"3":{"2":160000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":50843,"2":470,"3":{"2":47000}},{"1":50633,"2":520,"3":{"2":52000}},{"1":50728,"2":520,"3":{"2":52000}},{"1":50366,"2":490,"3":{"2":49000}},{"1":50642,"2":530,"3":{"2":53000}},{"1":50703,"2":470,"3":{"2":47000}},{"1":50385,"2":520,"3":{"2":52000}},{"1":50484,"2":510,"3":{"2":51000}},{"1":50397,"2":470,"3":{"2":47000}},{"1":51171,"2":490,"3":{"2":49000}},{"1":50572,"2":410,"3":{"2":41000}},{"1":50661,"2":520,"3":{"2":52000}},{"1":50583,"2":480,"3":{"2":48000}},{"1":50676,"2":520,"3":{"2":52000}},{"1":50405,"2":490,"3":{"2":49000}},{"1":50618,"2":500,"3":{"2":50000}},{"1":50045,"2":500,"3":{"2":50000}},{"1":50180,"2":520,"3":{"2":52000}},{"1":50697,"2":510,"3":{"2":51000}},{"1":50254,"2":510,"3":{"2":51000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":51076,"2":480,"3":{"2":96000}},{"1":50956,"2":420,"3":{"2":84000}},{"1":50622,"2":480,"3":{"2":96000}},{"1":50032,"2":470,"3":{"2":94000}},{"1":50945,"2":480,"3":{"2":96000}},{"1":50361,"2":470,"3":{"2":94000}},{"1":50428,"2":480,"3":{"2":96000}},{"1":50764,"2":470,"3":{"2":94000}},{"1":51018,"2":480,"3":{"2":96000}},{"1":50534,"2":480,"3":{"2":96000}},{"1":50577,"2":460,"3":{"2":92000}},{"1":50406,"2":460,"3":{"2":92000}},{"1":50767,"2":450,"3":{"2":90000}},{"1":50463,"2":460,"3":{"2":92000}},{"1":50838,"2":450,"3":{"2":90000}},{"1":50248,"2":460,"3":{"2":92000}},{"1":50877,"2":450,"3":{"2":90000}},{"1":50530,"2":440,"3":{"2":88000}},{"1":50343,"2":460,"3":{"2":92000}},{"1":50553,"2":470,"3":{"2":94000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":50280,"2":240,"3":{"2":240000}},{"1":51616,"2":260,"3":{"2":260000}},{"1":53096,"2":240,"3":{"2":240000}},{"1":50668,"2":230,"3":{"2":230000}},{"1":50170,"2":230,"3":{"2":230000}},{"1":51440,"2":230,"3":{"2":230000}},{"1":50928,"2":240,"3":{"2":240000}},{"1":51767,"2":260,"3":{"2":260000}},{"1":50918,"2":250,"3":{"2":250000}},{"1":51544,"2":200,"3":{"2":200000}},{"1":52048,"2":260,"3":{"2":260000}},{"1":50911,"2":250,"3":{"2":250000}},{"1":50633,"2":230,"3":{"2":230000}},{"1":51154,"2":200,"3":{"2":200000}},{"1":50066,"2":220,"3":{"2":220000}},{"1":53407,"2":240,"3":{"2":240000}},{"1":52081,"2":230,"3":{"2":230000}},{"1":50292,"2":250,"3":{"2":250000}},{"1":50841,"2":250,"3":{"2":250000}},{"1":50220,"2":220,"3":{"2":220000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":53371,"2":120,"3":{"2":240000}},{"1":52754,"2":120,"3":{"2":240000}},{"1":51702,"2":130,"3":{"2":260000}},{"1":53078,"2":130,"3":{"2":260000}},{"1":50589,"2":120,"3":{"2":240000}},{"1":52796,"2":130,"3":{"2":260000}},{"1":52967,"2":130,"3":{"2":260000}},{"1":50310,"2":110,"3":{"2":220000}},{"1":53762,"2":120,"3":{"2":240000}},{"1":53226,"2":110,"3":{"2":220000}},{"1":53751,"2":130,"3":{"2":260000}},{"1":53902,"2":130,"3":{"2":260000}},{"1":54936,"2":130,"3":{"2":260000}},{"1":53354,"2":130,"3":{"2":260000}},{"1":53100,"2":120,"3":{"2":240000}},{"1":53357,"2":130,"3":{"2":260000}},{"1":50074,"2":120,"3":{"2":240000}},{"1":53464,"2":130,"3":{"2":260000}},{"1":53589,"2":130,"3":{"2":260000}},{"1":52912,"2":130,"3":{"2":260000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50336,"2":520,"3":{"4":52000}},{"1":52173,"2":580,"3":{"4":58000}},{"1":50236,"2":570,"3":{"4":57000}},{"1":50361,"2":580,"3":{"4":58000}},{"1":50347,"2":570,"3":{"4":57000}},{"1":50224,"2":510,"3":{"4":51000}},{"1":50024,"2":570,"3":{"4":57000}},{"1":51373,"2":570,"3":{"4":57000}},{"1":51123,"2":490,"3":{"4":49000}},{"1":50525,"2":580,"3":{"4":58000}},{"1":50584,"2":510,"3":{"4":51000}},{"1":50585,"2":570,"3":{"4":57000}},{"1":50895,"2":560,"3":{"4":56000}},{"1":50572,"2":580,"3":{"4":58000}},{"1":50457,"2":570,"3":{"4":57000}},{"1":50111,"2":540,"3":{"4":54000}},{"1":50920,"2":570,"3":{"4":57000}},{"1":50521,"2":580,"3":{"4":58000}},{"1":51778,"2":580,"3":{"4":58000}},{"1":50222,"2":570,"3":{"4":57000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50219,"2":440,"3":{"4":88000}},{"1":50051,"2":440,"3":{"4":88000}},{"1":50480,"2":440,"3":{"4":88000}},{"1":50397,"2":440,"3":{"4":88000}},{"1":50414,"2":400,"3":{"4":80000}},{"1":50789,"2":450,"3":{"4":90000}},{"1":50769,"2":440,"3":{"4":88000}},{"1":50099,"2":360,"3":{"4":72000}},{"1":50776,"2":400,"3":{"4":80000}},{"1":50394,"2":440,"3":{"4":88000}},{"1":51078,"2":400,"3":{"4":80000}},{"1":50436,"2":450,"3":{"4":90000}},{"1":50523,"2":450,"3":{"4":90000}},{"1":50093,"2":370,"3":{"4":74000}},{"1":50681,"2":450,"3":{"4":90000}},{"1":50744,"2":450,"3":{"4":90000}},{"1":51148,"2":410,"3":{"4":82000}},{"1":50449,"2":440,"3":{"4":88000}},{"1":50451,"2":410,"3":{"4":82000}},{"1":50302,"2":450,"3":{"4":90000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":50810,"2":120,"3":{"4":120000}},{"1":50594,"2":130,"3":{"4":130000}},{"1":51966,"2":120,"3":{"4":120000}},{"1":53182,"2":140,"3":{"4":140000}},{"1":51491,"2":120,"3":{"4":120000}},{"1":51280,"2":120,"3":{"4":120000}},{"1":52620,"2":140,"3":{"4":140000}},{"1":50451,"2":120,"3":{"4":120000}},{"1":50618,"2":120,"3":{"4":120000}},{"1":52614,"2":140,"3":{"4":140000}},{"1":53257,"2":140,"3":{"4":140000}},{"1":53143,"2":140,"3":{"4":140000}},{"1":53249,"2":140,"3":{"4":140000}},{"1":55340,"2":130,"3":{"4":130000}},{"1":52471,"2":140,"3":{"4":140000}},{"1":52971,"2":110,"3":{"4":110000}},{"1":50571,"2":120,"3":{"4":120000}},{"1":52680,"2":140,"3":{"4":140000}},{"1":52573,"2":140,"3":{"4":140000}},{"1":52743,"2":140,"3":{"4":140000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51403,"2":60,"3":{"4":120000}},{"1":51947,"2":70,"3":{"4":140000}},{"1":54171,"2":70,"3":{"4":140000}},{"1":54028,"2":70,"3":{"4":140000}},{"1":57772,"2":70,"3":{"4":140000}},{"1":57339,"2":70,"3":{"4":140000}},{"1":57087,"2":60,"3":{"4":120000}},{"1":57696,"2":70,"3":{"4":140000}},{"1":53214,"2":70,"3":{"4":140000}},{"1":53048,"2":70,"3":{"4":140000}},{"1":55500,"2":60,"3":{"4":120000}},{"1":52854,"2":70,"3":{"4":140000}},{"1":52579,"2":70,"3":{"4":140000}},{"1":54990,"2":70,"3":{"4":140000}},{"1":53492,"2":70,"3":{"4":140000}},{"1":53477,"2":70,"3":{"4":140000}},{"1":57527,"2":70,"3":{"4":140000}},{"1":52976,"2":70,"3":{"4":140000}},{"1":50255,"2":60,"3":{"4":120000}},{"1":52933,"2":70,"3":{"4":140000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":52426,"2":70,"3":{"4":70000}},{"1":57430,"2":70,"3":{"4":70000}},{"1":54899,"2":70,"3":{"4":70000}},{"1":52358,"2":70,"3":{"4":70000}},{"1":57265,"2":70,"3":{"4":70000}},{"1":51634,"2":60,"3":{"4":60000}},{"1":50320,"2":60,"3":{"4":60000}},{"1":57579,"2":70,"3":{"4":70000}},{"1":51246,"2":70,"3":{"4":70000}},{"1":52454,"2":70,"3":{"4":70000}},{"1":53064,"2":70,"3":{"4":70000}},{"1":52425,"2":70,"3":{"4":70000}},{"1":52274,"2":70,"3":{"4":70000}},{"1":52496,"2":70,"3":{"4":70000}},{"1":53243,"2":70,"3":{"4":70000}},{"1":52478,"2":70,"3":{"4":70000}},{"1":52664,"2":70,"3":{"4":70000}},{"1":52592,"2":70,"3":{"4":70000}},{"1":53880,"2":70,"3":{"4":70000}},{"1":57319,"2":70,"3":{"4":70000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50146,"2":450,"3":{"4":45000}},{"1":50566,"2":440,"3":{"4":44000}},{"1":50279,"2":460,"3":{"4":46000}},{"1":50747,"2":480,"3":{"4":48000}},{"1":50394,"2":470,"3":{"4":47000}},{"1":50130,"2":460,"3":{"4":46000}},{"1":50791,"2":470,"3":{"4":47000}},{"1":50145,"2":480,"3":{"4":48000}},{"1":50668,"2":440,"3":{"4":44000}},{"1":50587,"2":470,"3":{"4":47000}},{"1":50611,"2":400,"3":{"4":40000}},{"1":50661,"2":480,"3":{"4":48000}},{"1":50396,"2":480,"3":{"4":48000}},{"1":50601,"2":480,"3":{"4":48000}},{"1":50790,"2":480,"3":{"4":48000}},{"1":50789,"2":480,"3":{"4":48000}},{"1":50320,"2":480,"3":{"4":48000}},{"1":50826,"2":460,"3":{"4":46000}},{"1":50147,"2":450,"3":{"4":45000}},{"1":50876,"2":480,"3":{"4":48000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":51449,"2":400,"3":{"4":80000}},{"1":50944,"2":420,"3":{"4":84000}},{"1":50898,"2":430,"3":{"4":86000}},{"1":51143,"2":420,"3":{"4":84000}},{"1":50723,"2":430,"3":{"4":86000}},{"1":50237,"2":370,"3":{"4":74000}},{"1":50271,"2":420,"3":{"4":84000}},{"1":50577,"2":400,"3":{"4":80000}},{"1":51117,"2":420,"3":{"4":84000}},{"1":51760,"2":400,"3":{"4":80000}},{"1":50011,"2":370,"3":{"4":74000}},{"1":50406,"2":410,"3":{"4":82000}},{"1":50534,"2":390,"3":{"4":78000}},{"1":50008,"2":420,"3":{"4":84000}},{"1":51015,"2":390,"3":{"4":78000}},{"1":50462,"2":420,"3":{"4":84000}},{"1":50359,"2":390,"3":{"4":78000}},{"1":50996,"2":430,"3":{"4":86000}},{"1":50616,"2":390,"3":{"4":78000}},{"1":50763,"2":370,"3":{"4":74000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52089,"2":200,"3":{"4":200000}},{"1":50626,"2":170,"3":{"4":170000}},{"1":51922,"2":200,"3":{"4":200000}},{"1":51235,"2":180,"3":{"4":180000}},{"1":50085,"2":190,"3":{"4":190000}},{"1":51319,"2":200,"3":{"4":200000}},{"1":51985,"2":190,"3":{"4":190000}},{"1":50240,"2":170,"3":{"4":170000}},{"1":51021,"2":170,"3":{"4":170000}},{"1":52576,"2":180,"3":{"4":180000}},{"1":52095,"2":200,"3":{"4":200000}},{"1":51400,"2":200,"3":{"4":200000}},{"1":50331,"2":170,"3":{"4":170000}},{"1":51891,"2":200,"3":{"4":200000}},{"1":51964,"2":200,"3":{"4":200000}},{"1":51564,"2":200,"3":{"4":200000}},{"1":51056,"2":200,"3":{"4":200000}},{"1":51501,"2":180,"3":{"4":180000}},{"1":51986,"2":180,"3":{"4":180000}},{"1":51227,"2":200,"3":{"4":200000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52054,"2":90,"3":{"4":180000}},{"1":52635,"2":100,"3":{"4":200000}},{"1":54533,"2":100,"3":{"4":200000}},{"1":53945,"2":100,"3":{"4":200000}},{"1":54527,"2":100,"3":{"4":200000}},{"1":53735,"2":100,"3":{"4":200000}},{"1":51813,"2":100,"3":{"4":200000}},{"1":52755,"2":100,"3":{"4":200000}},{"1":55904,"2":90,"3":{"4":180000}},{"1":52457,"2":90,"3":{"4":180000}},{"1":52519,"2":100,"3":{"4":200000}},{"1":50295,"2":90,"3":{"4":180000}},{"1":51913,"2":100,"3":{"4":200000}},{"1":52601,"2":100,"3":{"4":200000}},{"1":51008,"2":100,"3":{"4":200000}},{"1":52633,"2":100,"3":{"4":200000}},{"1":50949,"2":100,"3":{"4":200000}},{"1":50935,"2":100,"3":{"4":200000}},{"1":54930,"2":90,"3":{"4":180000}},{"1":52333,"2":90,"3":{"4":180000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":53848,"2":70,"3":{"4":70000}},{"1":51716,"2":80,"3":{"4":80000}},{"1":52968,"2":80,"3":{"4":80000}},{"1":51435,"2":80,"3":{"4":80000}},{"1":52109,"2":80,"3":{"4":80000}},{"1":50864,"2":80,"3":{"4":80000}},{"1":53577,"2":80,"3":{"4":80000}},{"1":50078,"2":70,"3":{"4":70000}},{"1":52303,"2":80,"3":{"4":80000}},{"1":54891,"2":80,"3":{"4":80000}},{"1":50578,"2":80,"3":{"4":80000}},{"1":50500,"2":80,"3":{"4":80000}},{"1":50447,"2":80,"3":{"4":80000}},{"1":55207,"2":80,"3":{"4":80000}},{"1":53393,"2":80,"3":{"4":80000}},{"1":50615,"2":80,"3":{"4":80000}},{"1":54893,"2":80,"3":{"4":80000}},{"1":51214,"2":80,"3":{"4":80000}},{"1":51184,"2":70,"3":{"4":70000}},{"1":54770,"2":80,"3":{"4":80000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.5.0/props_chrome.pb.json b/benchmark/data/skybrian-macbookpro/0.5.0/props_chrome.pb.json
deleted file mode 100644
index bb926a8..0000000
--- a/benchmark/data/skybrian-macbookpro/0.5.0/props_chrome.pb.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/props.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.5.0",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.27.2"},
- {"1":"args","2":"hosted","3":"0.13.4"},
- {"1":"async","2":"hosted","3":"1.9.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"boolean_selector","2":"hosted","3":"1.0.1"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.5.1"},
- {"1":"convert","2":"hosted","3":"1.0.1"},
- {"1":"crypto","2":"hosted","3":"0.9.2+1"},
- {"1":"csslib","2":"hosted","3":"0.12.2"},
- {"1":"fixnum","2":"hosted","3":"0.10.2"},
- {"1":"glob","2":"hosted","3":"1.1.2"},
- {"1":"html","2":"hosted","3":"0.12.2+1"},
- {"1":"http_multi_server","2":"hosted","3":"2.0.1"},
- {"1":"http_parser","2":"hosted","3":"2.2.1"},
- {"1":"logging","2":"hosted","3":"0.11.2"},
- {"1":"matcher","2":"hosted","3":"0.12.0+2"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.9"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.2.2"},
- {"1":"protobuf","2":"hosted","3":"0.5.0+1"},
- {"1":"pub_semver","2":"hosted","3":"1.2.4"},
- {"1":"shelf","2":"hosted","3":"0.6.5"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+3"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.2.0"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1+1"},
- {"1":"source_span","2":"hosted","3":"1.2.2"},
- {"1":"stack_trace","2":"hosted","3":"1.6.4"},
- {"1":"stream_channel","2":"hosted","3":"1.3.1"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4+1"},
- {"1":"test","2":"hosted","3":"0.12.13"},
- {"1":"typed_data","2":"hosted","3":"1.1.2"},
- {"1":"utf","2":"hosted","3":"0.9.0+3"},
- {"1":"watcher","2":"hosted","3":"0.9.7"},
- {"1":"web_socket_channel","2":"hosted","3":"1.0.2"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50345,"2":14100,"3":{"4":1410000}},{"1":50270,"2":14400,"3":{"4":1440000}},{"1":50325,"2":14600,"3":{"4":1460000}},{"1":50245,"2":13400,"3":{"4":1340000}},{"1":50150,"2":13300,"3":{"4":1330000}},{"1":50120,"2":12700,"3":{"4":1270000}},{"1":50080,"2":14200,"3":{"4":1420000}},{"1":50050,"2":14600,"3":{"4":1460000}},{"1":50235,"2":14700,"3":{"4":1470000}},{"1":50190,"2":13700,"3":{"4":1370000}},{"1":50300,"2":14900,"3":{"4":1490000}},{"1":50030,"2":14200,"3":{"4":1420000}},{"1":50315,"2":13400,"3":{"4":1340000}},{"1":50130,"2":13300,"3":{"4":1330000}},{"1":50320,"2":14500,"3":{"4":1450000}},{"1":50220,"2":14100,"3":{"4":1410000}},{"1":50170,"2":14500,"3":{"4":1450000}},{"1":50235,"2":12900,"3":{"4":1290000}},{"1":50165,"2":14600,"3":{"4":1460000}},{"1":50050,"2":14500,"3":{"4":1450000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50060,"2":18100,"3":{"4":1810000}},{"1":50330,"2":17700,"3":{"4":1770000}},{"1":50425,"2":17000,"3":{"4":1700000}},{"1":50170,"2":18000,"3":{"4":1800000}},{"1":50145,"2":18600,"3":{"4":1860000}},{"1":50120,"2":17700,"3":{"4":1770000}},{"1":50230,"2":16300,"3":{"4":1630000}},{"1":50185,"2":18600,"3":{"4":1860000}},{"1":50015,"2":18600,"3":{"4":1860000}},{"1":50215,"2":18600,"3":{"4":1860000}},{"1":50010,"2":15400,"3":{"4":1540000}},{"1":50210,"2":16700,"3":{"4":1670000}},{"1":50190,"2":15500,"3":{"4":1550000}},{"1":50050,"2":17900,"3":{"4":1790000}},{"1":50165,"2":16600,"3":{"4":1660000}},{"1":50025,"2":18200,"3":{"4":1820000}},{"1":50230,"2":17100,"3":{"4":1710000}},{"1":50165,"2":18600,"3":{"4":1860000}},{"1":50065,"2":16800,"3":{"4":1680000}},{"1":50125,"2":18200,"3":{"4":1820000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50055,"2":14400,"3":{"5":1440000}},{"1":50255,"2":15100,"3":{"5":1510000}},{"1":50220,"2":14600,"3":{"5":1460000}},{"1":50130,"2":16100,"3":{"5":1610000}},{"1":50135,"2":15400,"3":{"5":1540000}},{"1":50270,"2":15100,"3":{"5":1510000}},{"1":50300,"2":14000,"3":{"5":1400000}},{"1":50290,"2":16100,"3":{"5":1610000}},{"1":50155,"2":15600,"3":{"5":1560000}},{"1":50120,"2":15700,"3":{"5":1570000}},{"1":50255,"2":14500,"3":{"5":1450000}},{"1":50090,"2":16300,"3":{"5":1630000}},{"1":50240,"2":16300,"3":{"5":1630000}},{"1":50285,"2":15600,"3":{"5":1560000}},{"1":50165,"2":16400,"3":{"5":1640000}},{"1":50225,"2":16200,"3":{"5":1620000}},{"1":50350,"2":14700,"3":{"5":1470000}},{"1":50135,"2":14800,"3":{"5":1480000}},{"1":50260,"2":14600,"3":{"5":1460000}},{"1":50135,"2":15900,"3":{"5":1590000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50160,"2":14000,"3":{"5":1400000}},{"1":50130,"2":13900,"3":{"5":1390000}},{"1":50010,"2":16300,"3":{"5":1630000}},{"1":50260,"2":16500,"3":{"5":1650000}},{"1":50250,"2":15900,"3":{"5":1590000}},{"1":50040,"2":14400,"3":{"5":1440000}},{"1":50025,"2":14700,"3":{"5":1470000}},{"1":50250,"2":15800,"3":{"5":1580000}},{"1":50170,"2":14800,"3":{"5":1480000}},{"1":50035,"2":16000,"3":{"5":1600000}},{"1":50045,"2":16100,"3":{"5":1610000}},{"1":50005,"2":14100,"3":{"5":1410000}},{"1":50215,"2":16300,"3":{"5":1630000}},{"1":50075,"2":16200,"3":{"5":1620000}},{"1":50085,"2":14300,"3":{"5":1430000}},{"1":50000,"2":16000,"3":{"5":1600000}},{"1":50305,"2":14600,"3":{"5":1460000}},{"1":50375,"2":13600,"3":{"5":1360000}},{"1":50270,"2":16000,"3":{"5":1600000}},{"1":50300,"2":16200,"3":{"5":1620000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50020,"2":19800,"3":{"4":1980000}},{"1":50065,"2":21500,"3":{"4":2150000}},{"1":50000,"2":21600,"3":{"4":2160000}},{"1":50130,"2":21700,"3":{"4":2170000}},{"1":50015,"2":21400,"3":{"4":2140000}},{"1":50155,"2":19300,"3":{"4":1930000}},{"1":50070,"2":20000,"3":{"4":2000000}},{"1":50150,"2":21400,"3":{"4":2140000}},{"1":50160,"2":21700,"3":{"4":2170000}},{"1":50030,"2":17800,"3":{"4":1780000}},{"1":50190,"2":21100,"3":{"4":2110000}},{"1":50230,"2":18400,"3":{"4":1840000}},{"1":50025,"2":21700,"3":{"4":2170000}},{"1":50005,"2":21700,"3":{"4":2170000}},{"1":50170,"2":21000,"3":{"4":2100000}},{"1":50200,"2":19800,"3":{"4":1980000}},{"1":50150,"2":18400,"3":{"4":1840000}},{"1":50100,"2":18900,"3":{"4":1890000}},{"1":50155,"2":21800,"3":{"4":2180000}},{"1":50170,"2":21500,"3":{"4":2150000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50065,"2":17400,"3":{"4":1740000}},{"1":50050,"2":18700,"3":{"4":1870000}},{"1":50335,"2":17500,"3":{"4":1750000}},{"1":50240,"2":20900,"3":{"4":2090000}},{"1":50085,"2":20300,"3":{"4":2030000}},{"1":50005,"2":18100,"3":{"4":1810000}},{"1":50125,"2":21100,"3":{"4":2110000}},{"1":50110,"2":20700,"3":{"4":2070000}},{"1":50210,"2":20800,"3":{"4":2080000}},{"1":50075,"2":21100,"3":{"4":2110000}},{"1":50080,"2":20700,"3":{"4":2070000}},{"1":50035,"2":20600,"3":{"4":2060000}},{"1":50110,"2":18500,"3":{"4":1850000}},{"1":50130,"2":20700,"3":{"4":2070000}},{"1":50190,"2":17100,"3":{"4":1710000}},{"1":50240,"2":20900,"3":{"4":2090000}},{"1":50200,"2":19800,"3":{"4":1980000}},{"1":50130,"2":20900,"3":{"4":2090000}},{"1":50205,"2":20800,"3":{"4":2080000}},{"1":50140,"2":18300,"3":{"4":1830000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/0.5.0/props_vm.pb.json b/benchmark/data/skybrian-macbookpro/0.5.0/props_vm.pb.json
deleted file mode 100644
index a7026b6..0000000
--- a/benchmark/data/skybrian-macbookpro/0.5.0/props_vm.pb.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "props_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.14.2 (Tue Feb 9 15:10:44 2016) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.5.0",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.27.2"},
- {"1":"args","2":"hosted","3":"0.13.4"},
- {"1":"async","2":"hosted","3":"1.9.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"boolean_selector","2":"hosted","3":"1.0.1"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.5.1"},
- {"1":"convert","2":"hosted","3":"1.0.1"},
- {"1":"crypto","2":"hosted","3":"0.9.2+1"},
- {"1":"csslib","2":"hosted","3":"0.12.2"},
- {"1":"fixnum","2":"hosted","3":"0.10.2"},
- {"1":"glob","2":"hosted","3":"1.1.2"},
- {"1":"html","2":"hosted","3":"0.12.2+1"},
- {"1":"http_multi_server","2":"hosted","3":"2.0.1"},
- {"1":"http_parser","2":"hosted","3":"2.2.1"},
- {"1":"logging","2":"hosted","3":"0.11.2"},
- {"1":"matcher","2":"hosted","3":"0.12.0+2"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.9"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.2.2"},
- {"1":"protobuf","2":"hosted","3":"0.5.0+1"},
- {"1":"pub_semver","2":"hosted","3":"1.2.4"},
- {"1":"shelf","2":"hosted","3":"0.6.5"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+3"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.2.0"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1+1"},
- {"1":"source_span","2":"hosted","3":"1.2.2"},
- {"1":"stack_trace","2":"hosted","3":"1.6.4"},
- {"1":"stream_channel","2":"hosted","3":"1.3.1"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4+1"},
- {"1":"test","2":"hosted","3":"0.12.13"},
- {"1":"typed_data","2":"hosted","3":"1.1.2"},
- {"1":"utf","2":"hosted","3":"0.9.0+3"},
- {"1":"watcher","2":"hosted","3":"0.9.7"},
- {"1":"web_socket_channel","2":"hosted","3":"1.0.2"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50021,"2":154700,"3":{"4":15470000}},{"1":50031,"2":155900,"3":{"4":15590000}},{"1":50039,"2":125000,"3":{"4":12500000}},{"1":50000,"2":151500,"3":{"4":15150000}},{"1":50024,"2":159500,"3":{"4":15950000}},{"1":50000,"2":160200,"3":{"4":16020000}},{"1":50026,"2":152400,"3":{"4":15240000}},{"1":50017,"2":159800,"3":{"4":15980000}},{"1":50014,"2":162100,"3":{"4":16210000}},{"1":50007,"2":159000,"3":{"4":15900000}},{"1":50010,"2":169700,"3":{"4":16970000}},{"1":50003,"2":169400,"3":{"4":16940000}},{"1":50014,"2":172600,"3":{"4":17260000}},{"1":50005,"2":151200,"3":{"4":15120000}},{"1":50014,"2":171300,"3":{"4":17130000}},{"1":50020,"2":170600,"3":{"4":17060000}},{"1":50026,"2":172400,"3":{"4":17240000}},{"1":50021,"2":169300,"3":{"4":16930000}},{"1":50001,"2":170300,"3":{"4":17030000}},{"1":50013,"2":144400,"3":{"4":14440000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50014,"2":157700,"3":{"4":15770000}},{"1":50006,"2":160600,"3":{"4":16060000}},{"1":50015,"2":154800,"3":{"4":15480000}},{"1":50012,"2":159400,"3":{"4":15940000}},{"1":50001,"2":154500,"3":{"4":15450000}},{"1":50023,"2":159100,"3":{"4":15910000}},{"1":50054,"2":156500,"3":{"4":15650000}},{"1":50005,"2":148200,"3":{"4":14820000}},{"1":50019,"2":162700,"3":{"4":16270000}},{"1":50016,"2":157300,"3":{"4":15730000}},{"1":50011,"2":143400,"3":{"4":14340000}},{"1":50003,"2":150000,"3":{"4":15000000}},{"1":50021,"2":164900,"3":{"4":16490000}},{"1":50009,"2":159900,"3":{"4":15990000}},{"1":50000,"2":165700,"3":{"4":16570000}},{"1":50030,"2":163700,"3":{"4":16370000}},{"1":50011,"2":137200,"3":{"4":13720000}},{"1":50030,"2":154100,"3":{"4":15410000}},{"1":50029,"2":166300,"3":{"4":16630000}},{"1":50021,"2":157500,"3":{"4":15750000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50085,"2":44400,"3":{"5":4440000}},{"1":50085,"2":46200,"3":{"5":4620000}},{"1":50064,"2":45800,"3":{"5":4580000}},{"1":50070,"2":45600,"3":{"5":4560000}},{"1":50084,"2":43600,"3":{"5":4360000}},{"1":50037,"2":46200,"3":{"5":4620000}},{"1":50049,"2":47400,"3":{"5":4740000}},{"1":50091,"2":46900,"3":{"5":4690000}},{"1":50091,"2":47400,"3":{"5":4740000}},{"1":50020,"2":47300,"3":{"5":4730000}},{"1":50047,"2":46100,"3":{"5":4610000}},{"1":50051,"2":47300,"3":{"5":4730000}},{"1":50087,"2":46400,"3":{"5":4640000}},{"1":50101,"2":47200,"3":{"5":4720000}},{"1":50066,"2":46200,"3":{"5":4620000}},{"1":50094,"2":44000,"3":{"5":4400000}},{"1":50047,"2":45700,"3":{"5":4570000}},{"1":50105,"2":45200,"3":{"5":4520000}},{"1":50101,"2":46500,"3":{"5":4650000}},{"1":50054,"2":44200,"3":{"5":4420000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50020,"2":47100,"3":{"5":4710000}},{"1":50011,"2":45900,"3":{"5":4590000}},{"1":50054,"2":45900,"3":{"5":4590000}},{"1":50019,"2":46300,"3":{"5":4630000}},{"1":50086,"2":46000,"3":{"5":4600000}},{"1":50122,"2":45900,"3":{"5":4590000}},{"1":50055,"2":46700,"3":{"5":4670000}},{"1":50004,"2":46300,"3":{"5":4630000}},{"1":50029,"2":40500,"3":{"5":4050000}},{"1":50027,"2":45900,"3":{"5":4590000}},{"1":50060,"2":46600,"3":{"5":4660000}},{"1":50066,"2":46400,"3":{"5":4640000}},{"1":50057,"2":48500,"3":{"5":4850000}},{"1":50066,"2":47400,"3":{"5":4740000}},{"1":50109,"2":47600,"3":{"5":4760000}},{"1":50069,"2":48600,"3":{"5":4860000}},{"1":50123,"2":48200,"3":{"5":4820000}},{"1":50086,"2":44900,"3":{"5":4490000}},{"1":50023,"2":45400,"3":{"5":4540000}},{"1":50089,"2":46200,"3":{"5":4620000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50034,"2":141600,"3":{"4":14160000}},{"1":50028,"2":160300,"3":{"4":16030000}},{"1":50027,"2":142200,"3":{"4":14220000}},{"1":50003,"2":154000,"3":{"4":15400000}},{"1":50002,"2":136000,"3":{"4":13600000}},{"1":50018,"2":162500,"3":{"4":16250000}},{"1":50021,"2":163600,"3":{"4":16360000}},{"1":50023,"2":161600,"3":{"4":16160000}},{"1":50011,"2":143500,"3":{"4":14350000}},{"1":50030,"2":143700,"3":{"4":14370000}},{"1":50021,"2":159900,"3":{"4":15990000}},{"1":50021,"2":158400,"3":{"4":15840000}},{"1":50001,"2":160200,"3":{"4":16020000}},{"1":50002,"2":158300,"3":{"4":15830000}},{"1":50017,"2":159100,"3":{"4":15910000}},{"1":50020,"2":158900,"3":{"4":15890000}},{"1":50002,"2":140800,"3":{"4":14080000}},{"1":50025,"2":159200,"3":{"4":15920000}},{"1":50002,"2":160400,"3":{"4":16040000}},{"1":50011,"2":159600,"3":{"4":15960000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50019,"2":148000,"3":{"4":14800000}},{"1":50009,"2":151300,"3":{"4":15130000}},{"1":50010,"2":152500,"3":{"4":15250000}},{"1":50714,"2":141700,"3":{"4":14170000}},{"1":50002,"2":151300,"3":{"4":15130000}},{"1":50007,"2":151600,"3":{"4":15160000}},{"1":50013,"2":139100,"3":{"4":13910000}},{"1":50007,"2":149500,"3":{"4":14950000}},{"1":50003,"2":128400,"3":{"4":12840000}},{"1":50024,"2":152800,"3":{"4":15280000}},{"1":50015,"2":145700,"3":{"4":14570000}},{"1":50003,"2":151100,"3":{"4":15110000}},{"1":50030,"2":137800,"3":{"4":13780000}},{"1":50016,"2":143900,"3":{"4":14390000}},{"1":50001,"2":134100,"3":{"4":13410000}},{"1":50004,"2":149800,"3":{"4":14980000}},{"1":50027,"2":153000,"3":{"4":15300000}},{"1":50029,"2":137500,"3":{"4":13750000}},{"1":50014,"2":152600,"3":{"4":15260000}},{"1":50031,"2":135800,"3":{"4":13580000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/head/json_chrome.pb.json b/benchmark/data/skybrian-macbookpro/head/json_chrome.pb.json
deleted file mode 100644
index c337892..0000000
--- a/benchmark/data/skybrian-macbookpro/head/json_chrome.pb.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/readjson.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":52100,"2":190,"3":{"1":19000}},{"1":51595,"2":210,"3":{"1":21000}},{"1":52780,"2":200,"3":{"1":20000}},{"1":50965,"2":160,"3":{"1":16000}},{"1":50765,"2":170,"3":{"1":17000}},{"1":52760,"2":200,"3":{"1":20000}},{"1":52440,"2":200,"3":{"1":20000}},{"1":52470,"2":200,"3":{"1":20000}},{"1":51975,"2":180,"3":{"1":18000}},{"1":52340,"2":200,"3":{"1":20000}},{"1":50895,"2":170,"3":{"1":17000}},{"1":50390,"2":190,"3":{"1":19000}},{"1":52215,"2":180,"3":{"1":18000}},{"1":51705,"2":200,"3":{"1":20000}},{"1":52240,"2":180,"3":{"1":18000}},{"1":50925,"2":190,"3":{"1":19000}},{"1":50575,"2":190,"3":{"1":19000}},{"1":50875,"2":190,"3":{"1":19000}},{"1":50440,"2":190,"3":{"1":19000}},{"1":50075,"2":190,"3":{"1":19000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":51390,"2":140,"3":{"1":28000}},{"1":50055,"2":140,"3":{"1":28000}},{"1":50940,"2":160,"3":{"1":32000}},{"1":51935,"2":130,"3":{"1":26000}},{"1":52225,"2":150,"3":{"1":30000}},{"1":52290,"2":150,"3":{"1":30000}},{"1":52350,"2":150,"3":{"1":30000}},{"1":51040,"2":150,"3":{"1":30000}},{"1":52535,"2":130,"3":{"1":26000}},{"1":52710,"2":150,"3":{"1":30000}},{"1":52325,"2":150,"3":{"1":30000}},{"1":50065,"2":130,"3":{"1":26000}},{"1":51220,"2":140,"3":{"1":28000}},{"1":50550,"2":140,"3":{"1":28000}},{"1":50960,"2":130,"3":{"1":26000}},{"1":51340,"2":130,"3":{"1":26000}},{"1":52205,"2":150,"3":{"1":30000}},{"1":51865,"2":130,"3":{"1":26000}},{"1":52330,"2":150,"3":{"1":30000}},{"1":51400,"2":130,"3":{"1":26000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":53175,"2":60,"3":{"1":60000}},{"1":52005,"2":60,"3":{"1":60000}},{"1":50025,"2":50,"3":{"1":50000}},{"1":54705,"2":50,"3":{"1":50000}},{"1":57560,"2":60,"3":{"1":60000}},{"1":55450,"2":50,"3":{"1":50000}},{"1":57225,"2":60,"3":{"1":60000}},{"1":57595,"2":60,"3":{"1":60000}},{"1":57235,"2":60,"3":{"1":60000}},{"1":57225,"2":60,"3":{"1":60000}},{"1":57575,"2":60,"3":{"1":60000}},{"1":63100,"2":60,"3":{"1":60000}},{"1":57630,"2":60,"3":{"1":60000}},{"1":58115,"2":60,"3":{"1":60000}},{"1":57855,"2":60,"3":{"1":60000}},{"1":57420,"2":60,"3":{"1":60000}},{"1":59145,"2":60,"3":{"1":60000}},{"1":58390,"2":60,"3":{"1":60000}},{"1":53980,"2":50,"3":{"1":50000}},{"1":62655,"2":60,"3":{"1":60000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":59405,"2":30,"3":{"1":60000}},{"1":51085,"2":30,"3":{"1":60000}},{"1":51460,"2":30,"3":{"1":60000}},{"1":61665,"2":30,"3":{"1":60000}},{"1":57455,"2":30,"3":{"1":60000}},{"1":57380,"2":30,"3":{"1":60000}},{"1":63505,"2":30,"3":{"1":60000}},{"1":57720,"2":30,"3":{"1":60000}},{"1":57465,"2":30,"3":{"1":60000}},{"1":58250,"2":30,"3":{"1":60000}},{"1":71535,"2":30,"3":{"1":60000}},{"1":63395,"2":30,"3":{"1":60000}},{"1":58185,"2":30,"3":{"1":60000}},{"1":64280,"2":30,"3":{"1":60000}},{"1":63015,"2":30,"3":{"1":60000}},{"1":59095,"2":30,"3":{"1":60000}},{"1":57075,"2":30,"3":{"1":60000}},{"1":57855,"2":30,"3":{"1":60000}},{"1":57305,"2":30,"3":{"1":60000}},{"1":57875,"2":30,"3":{"1":60000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50625,"2":150,"3":{"1":15000}},{"1":50680,"2":160,"3":{"1":16000}},{"1":50325,"2":170,"3":{"1":17000}},{"1":50325,"2":150,"3":{"1":15000}},{"1":50555,"2":140,"3":{"1":14000}},{"1":50260,"2":160,"3":{"1":16000}},{"1":50650,"2":160,"3":{"1":16000}},{"1":51245,"2":150,"3":{"1":15000}},{"1":52595,"2":170,"3":{"1":17000}},{"1":51020,"2":160,"3":{"1":16000}},{"1":51020,"2":150,"3":{"1":15000}},{"1":51995,"2":170,"3":{"1":17000}},{"1":52195,"2":170,"3":{"1":17000}},{"1":53065,"2":150,"3":{"1":15000}},{"1":52375,"2":150,"3":{"1":15000}},{"1":50175,"2":160,"3":{"1":16000}},{"1":53095,"2":170,"3":{"1":17000}},{"1":51625,"2":160,"3":{"1":16000}},{"1":52180,"2":170,"3":{"1":17000}},{"1":50950,"2":150,"3":{"1":15000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":52695,"2":160,"3":{"1":32000}},{"1":50705,"2":160,"3":{"1":32000}},{"1":51040,"2":160,"3":{"1":32000}},{"1":50475,"2":130,"3":{"1":26000}},{"1":50435,"2":150,"3":{"1":30000}},{"1":51675,"2":150,"3":{"1":30000}},{"1":52905,"2":160,"3":{"1":32000}},{"1":51940,"2":150,"3":{"1":30000}},{"1":50305,"2":150,"3":{"1":30000}},{"1":53065,"2":160,"3":{"1":32000}},{"1":51325,"2":160,"3":{"1":32000}},{"1":52615,"2":160,"3":{"1":32000}},{"1":52500,"2":160,"3":{"1":32000}},{"1":52720,"2":160,"3":{"1":32000}},{"1":52265,"2":160,"3":{"1":32000}},{"1":52485,"2":160,"3":{"1":32000}},{"1":52520,"2":160,"3":{"1":32000}},{"1":52400,"2":160,"3":{"1":32000}},{"1":51705,"2":160,"3":{"1":32000}},{"1":51405,"2":140,"3":{"1":28000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50040,"2":110,"3":{"1":110000}},{"1":52090,"2":120,"3":{"1":120000}},{"1":50845,"2":110,"3":{"1":110000}},{"1":54650,"2":110,"3":{"1":110000}},{"1":50810,"2":110,"3":{"1":110000}},{"1":54250,"2":120,"3":{"1":120000}},{"1":50070,"2":110,"3":{"1":110000}},{"1":54255,"2":120,"3":{"1":120000}},{"1":50115,"2":110,"3":{"1":110000}},{"1":50630,"2":110,"3":{"1":110000}},{"1":53535,"2":120,"3":{"1":120000}},{"1":53885,"2":120,"3":{"1":120000}},{"1":53950,"2":120,"3":{"1":120000}},{"1":53595,"2":120,"3":{"1":120000}},{"1":53480,"2":120,"3":{"1":120000}},{"1":53940,"2":120,"3":{"1":120000}},{"1":53975,"2":120,"3":{"1":120000}},{"1":54205,"2":120,"3":{"1":120000}},{"1":54025,"2":120,"3":{"1":120000}},{"1":50320,"2":100,"3":{"1":100000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":50635,"2":50,"3":{"1":100000}},{"1":51170,"2":60,"3":{"1":120000}},{"1":55330,"2":60,"3":{"1":120000}},{"1":54045,"2":60,"3":{"1":120000}},{"1":53970,"2":60,"3":{"1":120000}},{"1":53580,"2":60,"3":{"1":120000}},{"1":52895,"2":60,"3":{"1":120000}},{"1":53810,"2":60,"3":{"1":120000}},{"1":53380,"2":60,"3":{"1":120000}},{"1":53915,"2":60,"3":{"1":120000}},{"1":53140,"2":60,"3":{"1":120000}},{"1":52895,"2":60,"3":{"1":120000}},{"1":53105,"2":60,"3":{"1":120000}},{"1":53005,"2":60,"3":{"1":120000}},{"1":57935,"2":60,"3":{"1":120000}},{"1":57900,"2":60,"3":{"1":120000}},{"1":53215,"2":60,"3":{"1":120000}},{"1":53155,"2":60,"3":{"1":120000}},{"1":58585,"2":60,"3":{"1":120000}},{"1":53065,"2":60,"3":{"1":120000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50015,"2":170,"3":{"2":17000}},{"1":50765,"2":200,"3":{"2":20000}},{"1":51870,"2":190,"3":{"2":19000}},{"1":50910,"2":180,"3":{"2":18000}},{"1":50890,"2":190,"3":{"2":19000}},{"1":51060,"2":190,"3":{"2":19000}},{"1":51365,"2":170,"3":{"2":17000}},{"1":53725,"2":180,"3":{"2":18000}},{"1":51125,"2":190,"3":{"2":19000}},{"1":50730,"2":190,"3":{"2":19000}},{"1":50135,"2":190,"3":{"2":19000}},{"1":51255,"2":190,"3":{"2":19000}},{"1":51895,"2":180,"3":{"2":18000}},{"1":51945,"2":190,"3":{"2":19000}},{"1":50720,"2":190,"3":{"2":19000}},{"1":51260,"2":170,"3":{"2":17000}},{"1":51415,"2":190,"3":{"2":19000}},{"1":51230,"2":180,"3":{"2":18000}},{"1":51170,"2":170,"3":{"2":17000}},{"1":51185,"2":170,"3":{"2":17000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":52525,"2":160,"3":{"2":32000}},{"1":50960,"2":140,"3":{"2":28000}},{"1":53085,"2":150,"3":{"2":30000}},{"1":52360,"2":140,"3":{"2":28000}},{"1":52965,"2":130,"3":{"2":26000}},{"1":51315,"2":130,"3":{"2":26000}},{"1":50010,"2":140,"3":{"2":28000}},{"1":51935,"2":150,"3":{"2":30000}},{"1":53365,"2":150,"3":{"2":30000}},{"1":51145,"2":140,"3":{"2":28000}},{"1":52695,"2":130,"3":{"2":26000}},{"1":53210,"2":150,"3":{"2":30000}},{"1":53185,"2":150,"3":{"2":30000}},{"1":52915,"2":150,"3":{"2":30000}},{"1":52755,"2":150,"3":{"2":30000}},{"1":52975,"2":150,"3":{"2":30000}},{"1":52840,"2":150,"3":{"2":30000}},{"1":52995,"2":150,"3":{"2":30000}},{"1":53160,"2":150,"3":{"2":30000}},{"1":52470,"2":150,"3":{"2":30000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":54410,"2":60,"3":{"2":60000}},{"1":53505,"2":60,"3":{"2":60000}},{"1":57240,"2":60,"3":{"2":60000}},{"1":55895,"2":50,"3":{"2":50000}},{"1":56005,"2":50,"3":{"2":50000}},{"1":50875,"2":50,"3":{"2":50000}},{"1":50170,"2":50,"3":{"2":50000}},{"1":55620,"2":50,"3":{"2":50000}},{"1":59920,"2":60,"3":{"2":60000}},{"1":50360,"2":50,"3":{"2":50000}},{"1":50330,"2":50,"3":{"2":50000}},{"1":50445,"2":50,"3":{"2":50000}},{"1":59560,"2":60,"3":{"2":60000}},{"1":51120,"2":50,"3":{"2":50000}},{"1":50530,"2":50,"3":{"2":50000}},{"1":50130,"2":50,"3":{"2":50000}},{"1":50575,"2":50,"3":{"2":50000}},{"1":50920,"2":50,"3":{"2":50000}},{"1":58830,"2":60,"3":{"2":60000}},{"1":50060,"2":50,"3":{"2":50000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":53450,"2":30,"3":{"2":60000}},{"1":52100,"2":30,"3":{"2":60000}},{"1":58885,"2":30,"3":{"2":60000}},{"1":59885,"2":30,"3":{"2":60000}},{"1":59880,"2":30,"3":{"2":60000}},{"1":59720,"2":30,"3":{"2":60000}},{"1":59960,"2":30,"3":{"2":60000}},{"1":59755,"2":30,"3":{"2":60000}},{"1":64060,"2":30,"3":{"2":60000}},{"1":58810,"2":30,"3":{"2":60000}},{"1":59250,"2":30,"3":{"2":60000}},{"1":65505,"2":30,"3":{"2":60000}},{"1":64365,"2":30,"3":{"2":60000}},{"1":59810,"2":30,"3":{"2":60000}},{"1":59470,"2":30,"3":{"2":60000}},{"1":59770,"2":30,"3":{"2":60000}},{"1":59615,"2":30,"3":{"2":60000}},{"1":59715,"2":30,"3":{"2":60000}},{"1":70345,"2":30,"3":{"2":60000}},{"1":58395,"2":30,"3":{"2":60000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":51240,"2":160,"3":{"2":16000}},{"1":51805,"2":170,"3":{"2":17000}},{"1":51455,"2":160,"3":{"2":16000}},{"1":50195,"2":140,"3":{"2":14000}},{"1":51945,"2":160,"3":{"2":16000}},{"1":51380,"2":160,"3":{"2":16000}},{"1":52755,"2":160,"3":{"2":16000}},{"1":50705,"2":160,"3":{"2":16000}},{"1":51450,"2":160,"3":{"2":16000}},{"1":52510,"2":160,"3":{"2":16000}},{"1":52425,"2":160,"3":{"2":16000}},{"1":52790,"2":160,"3":{"2":16000}},{"1":56495,"2":160,"3":{"2":16000}},{"1":52635,"2":160,"3":{"2":16000}},{"1":52540,"2":160,"3":{"2":16000}},{"1":52575,"2":160,"3":{"2":16000}},{"1":51445,"2":160,"3":{"2":16000}},{"1":50745,"2":140,"3":{"2":14000}},{"1":51745,"2":160,"3":{"2":16000}},{"1":51770,"2":160,"3":{"2":16000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":51090,"2":140,"3":{"2":28000}},{"1":51930,"2":160,"3":{"2":32000}},{"1":50940,"2":150,"3":{"2":30000}},{"1":50430,"2":130,"3":{"2":26000}},{"1":51930,"2":150,"3":{"2":30000}},{"1":51445,"2":150,"3":{"2":30000}},{"1":52100,"2":150,"3":{"2":30000}},{"1":52100,"2":150,"3":{"2":30000}},{"1":51125,"2":150,"3":{"2":30000}},{"1":51525,"2":150,"3":{"2":30000}},{"1":53425,"2":150,"3":{"2":30000}},{"1":52215,"2":150,"3":{"2":30000}},{"1":52090,"2":150,"3":{"2":30000}},{"1":52615,"2":150,"3":{"2":30000}},{"1":52595,"2":150,"3":{"2":30000}},{"1":52420,"2":150,"3":{"2":30000}},{"1":51470,"2":150,"3":{"2":30000}},{"1":51850,"2":150,"3":{"2":30000}},{"1":51140,"2":150,"3":{"2":30000}},{"1":50045,"2":150,"3":{"2":30000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":53295,"2":110,"3":{"2":110000}},{"1":53060,"2":110,"3":{"2":110000}},{"1":51550,"2":100,"3":{"2":100000}},{"1":54525,"2":100,"3":{"2":100000}},{"1":54495,"2":110,"3":{"2":110000}},{"1":54340,"2":110,"3":{"2":110000}},{"1":50270,"2":100,"3":{"2":100000}},{"1":50635,"2":100,"3":{"2":100000}},{"1":50145,"2":100,"3":{"2":100000}},{"1":50370,"2":100,"3":{"2":100000}},{"1":50350,"2":100,"3":{"2":100000}},{"1":50695,"2":100,"3":{"2":100000}},{"1":50820,"2":100,"3":{"2":100000}},{"1":55890,"2":100,"3":{"2":100000}},{"1":50735,"2":100,"3":{"2":100000}},{"1":50795,"2":100,"3":{"2":100000}},{"1":50165,"2":100,"3":{"2":100000}},{"1":52305,"2":100,"3":{"2":100000}},{"1":50200,"2":100,"3":{"2":100000}},{"1":54140,"2":110,"3":{"2":110000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":57125,"2":60,"3":{"2":120000}},{"1":50110,"2":50,"3":{"2":100000}},{"1":50990,"2":50,"3":{"2":100000}},{"1":54005,"2":50,"3":{"2":100000}},{"1":54820,"2":50,"3":{"2":100000}},{"1":58090,"2":60,"3":{"2":120000}},{"1":59645,"2":60,"3":{"2":120000}},{"1":59520,"2":60,"3":{"2":120000}},{"1":59405,"2":60,"3":{"2":120000}},{"1":59640,"2":60,"3":{"2":120000}},{"1":50185,"2":50,"3":{"2":100000}},{"1":58945,"2":60,"3":{"2":120000}},{"1":55770,"2":50,"3":{"2":100000}},{"1":59615,"2":60,"3":{"2":120000}},{"1":63535,"2":60,"3":{"2":120000}},{"1":50235,"2":50,"3":{"2":100000}},{"1":58955,"2":60,"3":{"2":120000}},{"1":58980,"2":60,"3":{"2":120000}},{"1":59570,"2":60,"3":{"2":120000}},{"1":59150,"2":60,"3":{"2":120000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":51385,"2":190,"3":{"4":19000}},{"1":52095,"2":210,"3":{"4":21000}},{"1":52525,"2":180,"3":{"4":18000}},{"1":50655,"2":180,"3":{"4":18000}},{"1":50460,"2":190,"3":{"4":19000}},{"1":52160,"2":200,"3":{"4":20000}},{"1":50865,"2":190,"3":{"4":19000}},{"1":50110,"2":190,"3":{"4":19000}},{"1":50505,"2":190,"3":{"4":19000}},{"1":52055,"2":200,"3":{"4":20000}},{"1":52405,"2":200,"3":{"4":20000}},{"1":50100,"2":190,"3":{"4":19000}},{"1":50145,"2":190,"3":{"4":19000}},{"1":50920,"2":190,"3":{"4":19000}},{"1":50410,"2":190,"3":{"4":19000}},{"1":51260,"2":180,"3":{"4":18000}},{"1":50080,"2":190,"3":{"4":19000}},{"1":50060,"2":190,"3":{"4":19000}},{"1":51795,"2":200,"3":{"4":20000}},{"1":50120,"2":190,"3":{"4":19000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50875,"2":160,"3":{"4":32000}},{"1":52360,"2":160,"3":{"4":32000}},{"1":51270,"2":160,"3":{"4":32000}},{"1":50810,"2":130,"3":{"4":26000}},{"1":53345,"2":150,"3":{"4":30000}},{"1":53035,"2":150,"3":{"4":30000}},{"1":52260,"2":150,"3":{"4":30000}},{"1":51220,"2":130,"3":{"4":26000}},{"1":52790,"2":150,"3":{"4":30000}},{"1":53095,"2":150,"3":{"4":30000}},{"1":52780,"2":150,"3":{"4":30000}},{"1":53100,"2":150,"3":{"4":30000}},{"1":52965,"2":150,"3":{"4":30000}},{"1":52900,"2":150,"3":{"4":30000}},{"1":53180,"2":150,"3":{"4":30000}},{"1":52280,"2":150,"3":{"4":30000}},{"1":52870,"2":150,"3":{"4":30000}},{"1":52610,"2":150,"3":{"4":30000}},{"1":52130,"2":150,"3":{"4":30000}},{"1":53105,"2":150,"3":{"4":30000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53490,"2":60,"3":{"4":60000}},{"1":50315,"2":50,"3":{"4":50000}},{"1":50215,"2":50,"3":{"4":50000}},{"1":51595,"2":50,"3":{"4":50000}},{"1":51560,"2":50,"3":{"4":50000}},{"1":59200,"2":60,"3":{"4":60000}},{"1":59590,"2":60,"3":{"4":60000}},{"1":51160,"2":50,"3":{"4":50000}},{"1":50575,"2":50,"3":{"4":50000}},{"1":50635,"2":50,"3":{"4":50000}},{"1":50090,"2":50,"3":{"4":50000}},{"1":50320,"2":50,"3":{"4":50000}},{"1":50280,"2":50,"3":{"4":50000}},{"1":50365,"2":50,"3":{"4":50000}},{"1":59200,"2":60,"3":{"4":60000}},{"1":50385,"2":50,"3":{"4":50000}},{"1":50915,"2":50,"3":{"4":50000}},{"1":55115,"2":50,"3":{"4":50000}},{"1":50910,"2":50,"3":{"4":50000}},{"1":50525,"2":50,"3":{"4":50000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53510,"2":30,"3":{"4":60000}},{"1":53600,"2":30,"3":{"4":60000}},{"1":57735,"2":30,"3":{"4":60000}},{"1":60570,"2":30,"3":{"4":60000}},{"1":59940,"2":30,"3":{"4":60000}},{"1":59875,"2":30,"3":{"4":60000}},{"1":59495,"2":30,"3":{"4":60000}},{"1":65795,"2":30,"3":{"4":60000}},{"1":58785,"2":30,"3":{"4":60000}},{"1":59250,"2":30,"3":{"4":60000}},{"1":59125,"2":30,"3":{"4":60000}},{"1":59160,"2":30,"3":{"4":60000}},{"1":59295,"2":30,"3":{"4":60000}},{"1":59195,"2":30,"3":{"4":60000}},{"1":59750,"2":30,"3":{"4":60000}},{"1":60380,"2":30,"3":{"4":60000}},{"1":64920,"2":30,"3":{"4":60000}},{"1":59490,"2":30,"3":{"4":60000}},{"1":58525,"2":30,"3":{"4":60000}},{"1":59995,"2":30,"3":{"4":60000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":53040,"2":40,"3":{"4":40000}},{"1":63415,"2":50,"3":{"4":50000}},{"1":61655,"2":50,"3":{"4":50000}},{"1":50100,"2":40,"3":{"4":40000}},{"1":61565,"2":40,"3":{"4":40000}},{"1":50110,"2":40,"3":{"4":40000}},{"1":55560,"2":40,"3":{"4":40000}},{"1":50635,"2":40,"3":{"4":40000}},{"1":61945,"2":50,"3":{"4":50000}},{"1":55140,"2":40,"3":{"4":40000}},{"1":68015,"2":50,"3":{"4":50000}},{"1":56395,"2":40,"3":{"4":40000}},{"1":51095,"2":40,"3":{"4":40000}},{"1":68245,"2":50,"3":{"4":50000}},{"1":52150,"2":40,"3":{"4":40000}},{"1":56335,"2":40,"3":{"4":40000}},{"1":69140,"2":50,"3":{"4":50000}},{"1":68875,"2":50,"3":{"4":50000}},{"1":51065,"2":40,"3":{"4":40000}},{"1":52835,"2":40,"3":{"4":40000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":51435,"2":170,"3":{"4":17000}},{"1":51725,"2":150,"3":{"4":15000}},{"1":53085,"2":160,"3":{"4":16000}},{"1":51080,"2":160,"3":{"4":16000}},{"1":50605,"2":160,"3":{"4":16000}},{"1":53195,"2":150,"3":{"4":15000}},{"1":50865,"2":160,"3":{"4":16000}},{"1":51900,"2":160,"3":{"4":16000}},{"1":50195,"2":140,"3":{"4":14000}},{"1":50605,"2":160,"3":{"4":16000}},{"1":52635,"2":170,"3":{"4":17000}},{"1":50680,"2":160,"3":{"4":16000}},{"1":51470,"2":160,"3":{"4":16000}},{"1":51450,"2":160,"3":{"4":16000}},{"1":51205,"2":160,"3":{"4":16000}},{"1":51715,"2":150,"3":{"4":15000}},{"1":52700,"2":150,"3":{"4":15000}},{"1":51200,"2":160,"3":{"4":16000}},{"1":52905,"2":160,"3":{"4":16000}},{"1":50585,"2":160,"3":{"4":16000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":51330,"2":160,"3":{"4":32000}},{"1":51085,"2":150,"3":{"4":30000}},{"1":51490,"2":140,"3":{"4":28000}},{"1":51395,"2":150,"3":{"4":30000}},{"1":50990,"2":150,"3":{"4":30000}},{"1":51315,"2":150,"3":{"4":30000}},{"1":52880,"2":160,"3":{"4":32000}},{"1":52615,"2":150,"3":{"4":30000}},{"1":50420,"2":150,"3":{"4":30000}},{"1":51060,"2":150,"3":{"4":30000}},{"1":50135,"2":150,"3":{"4":30000}},{"1":51415,"2":150,"3":{"4":30000}},{"1":50855,"2":150,"3":{"4":30000}},{"1":50945,"2":150,"3":{"4":30000}},{"1":52990,"2":150,"3":{"4":30000}},{"1":51075,"2":150,"3":{"4":30000}},{"1":50500,"2":150,"3":{"4":30000}},{"1":50665,"2":150,"3":{"4":30000}},{"1":51805,"2":150,"3":{"4":30000}},{"1":52105,"2":140,"3":{"4":28000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":55650,"2":110,"3":{"4":110000}},{"1":53525,"2":110,"3":{"4":110000}},{"1":50610,"2":100,"3":{"4":100000}},{"1":54215,"2":110,"3":{"4":110000}},{"1":54290,"2":110,"3":{"4":110000}},{"1":50270,"2":100,"3":{"4":100000}},{"1":50195,"2":100,"3":{"4":100000}},{"1":50325,"2":100,"3":{"4":100000}},{"1":55820,"2":100,"3":{"4":100000}},{"1":54945,"2":110,"3":{"4":110000}},{"1":54635,"2":110,"3":{"4":110000}},{"1":50175,"2":90,"3":{"4":90000}},{"1":50230,"2":100,"3":{"4":100000}},{"1":50090,"2":100,"3":{"4":100000}},{"1":54950,"2":110,"3":{"4":110000}},{"1":54540,"2":110,"3":{"4":110000}},{"1":50200,"2":100,"3":{"4":100000}},{"1":54480,"2":110,"3":{"4":110000}},{"1":54955,"2":110,"3":{"4":110000}},{"1":50115,"2":100,"3":{"4":100000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51270,"2":50,"3":{"4":100000}},{"1":57460,"2":60,"3":{"4":120000}},{"1":51410,"2":50,"3":{"4":100000}},{"1":57900,"2":60,"3":{"4":120000}},{"1":60780,"2":60,"3":{"4":120000}},{"1":50085,"2":50,"3":{"4":100000}},{"1":58870,"2":60,"3":{"4":120000}},{"1":58950,"2":60,"3":{"4":120000}},{"1":58405,"2":60,"3":{"4":120000}},{"1":59010,"2":60,"3":{"4":120000}},{"1":58685,"2":60,"3":{"4":120000}},{"1":58960,"2":60,"3":{"4":120000}},{"1":58945,"2":60,"3":{"4":120000}},{"1":59705,"2":60,"3":{"4":120000}},{"1":53940,"2":50,"3":{"4":100000}},{"1":58650,"2":60,"3":{"4":120000}},{"1":58310,"2":60,"3":{"4":120000}},{"1":58775,"2":60,"3":{"4":120000}},{"1":58910,"2":60,"3":{"4":120000}},{"1":58645,"2":60,"3":{"4":120000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":52200,"2":50,"3":{"4":50000}},{"1":59035,"2":60,"3":{"4":60000}},{"1":52830,"2":50,"3":{"4":50000}},{"1":53705,"2":50,"3":{"4":50000}},{"1":50585,"2":40,"3":{"4":40000}},{"1":58430,"2":50,"3":{"4":50000}},{"1":50230,"2":40,"3":{"4":40000}},{"1":67675,"2":60,"3":{"4":60000}},{"1":55135,"2":50,"3":{"4":50000}},{"1":67190,"2":50,"3":{"4":50000}},{"1":50055,"2":40,"3":{"4":40000}},{"1":51465,"2":50,"3":{"4":50000}},{"1":53410,"2":50,"3":{"4":50000}},{"1":54165,"2":50,"3":{"4":50000}},{"1":58880,"2":50,"3":{"4":50000}},{"1":55355,"2":40,"3":{"4":40000}},{"1":59970,"2":50,"3":{"4":50000}},{"1":60355,"2":50,"3":{"4":50000}},{"1":54570,"2":50,"3":{"4":50000}},{"1":52945,"2":50,"3":{"4":50000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/head/json_vm.pb.json b/benchmark/data/skybrian-macbookpro/head/json_vm.pb.json
deleted file mode 100644
index c880211..0000000
--- a/benchmark/data/skybrian-macbookpro/head/json_vm.pb.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "readjson_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.12.0 (Mon Aug 31 04:17:53 2015) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":50708,"2":410,"3":{"1":41000}},{"1":50407,"2":610,"3":{"1":61000}},{"1":50306,"2":630,"3":{"1":63000}},{"1":50244,"2":680,"3":{"1":68000}},{"1":50097,"2":640,"3":{"1":64000}},{"1":50750,"2":640,"3":{"1":64000}},{"1":50567,"2":640,"3":{"1":64000}},{"1":50514,"2":670,"3":{"1":67000}},{"1":50513,"2":680,"3":{"1":68000}},{"1":50174,"2":670,"3":{"1":67000}},{"1":50256,"2":640,"3":{"1":64000}},{"1":50044,"2":680,"3":{"1":68000}},{"1":50113,"2":610,"3":{"1":61000}},{"1":50002,"2":630,"3":{"1":63000}},{"1":50625,"2":680,"3":{"1":68000}},{"1":50345,"2":680,"3":{"1":68000}},{"1":50595,"2":680,"3":{"1":68000}},{"1":50021,"2":680,"3":{"1":68000}},{"1":50223,"2":680,"3":{"1":68000}},{"1":50449,"2":640,"3":{"1":64000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":50322,"2":530,"3":{"1":106000}},{"1":50527,"2":530,"3":{"1":106000}},{"1":50036,"2":530,"3":{"1":106000}},{"1":50363,"2":530,"3":{"1":106000}},{"1":50459,"2":530,"3":{"1":106000}},{"1":50600,"2":510,"3":{"1":102000}},{"1":50420,"2":530,"3":{"1":106000}},{"1":50350,"2":530,"3":{"1":106000}},{"1":50230,"2":530,"3":{"1":106000}},{"1":50863,"2":530,"3":{"1":106000}},{"1":50175,"2":490,"3":{"1":98000}},{"1":50713,"2":480,"3":{"1":96000}},{"1":50676,"2":490,"3":{"1":98000}},{"1":50258,"2":470,"3":{"1":94000}},{"1":50406,"2":500,"3":{"1":100000}},{"1":50055,"2":530,"3":{"1":106000}},{"1":50864,"2":480,"3":{"1":96000}},{"1":50758,"2":540,"3":{"1":108000}},{"1":50307,"2":530,"3":{"1":106000}},{"1":50598,"2":540,"3":{"1":108000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":50265,"2":160,"3":{"1":160000}},{"1":52710,"2":150,"3":{"1":150000}},{"1":51110,"2":160,"3":{"1":160000}},{"1":52554,"2":160,"3":{"1":160000}},{"1":51490,"2":160,"3":{"1":160000}},{"1":51142,"2":160,"3":{"1":160000}},{"1":51369,"2":160,"3":{"1":160000}},{"1":50998,"2":160,"3":{"1":160000}},{"1":51733,"2":160,"3":{"1":160000}},{"1":50784,"2":160,"3":{"1":160000}},{"1":52357,"2":170,"3":{"1":170000}},{"1":50983,"2":160,"3":{"1":160000}},{"1":51835,"2":160,"3":{"1":160000}},{"1":51801,"2":170,"3":{"1":170000}},{"1":52824,"2":160,"3":{"1":160000}},{"1":50345,"2":150,"3":{"1":150000}},{"1":53036,"2":160,"3":{"1":160000}},{"1":51865,"2":160,"3":{"1":160000}},{"1":52834,"2":150,"3":{"1":150000}},{"1":50083,"2":130,"3":{"1":130000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":54315,"2":90,"3":{"1":180000}},{"1":55004,"2":90,"3":{"1":180000}},{"1":50673,"2":80,"3":{"1":160000}},{"1":54729,"2":90,"3":{"1":180000}},{"1":54376,"2":90,"3":{"1":180000}},{"1":55234,"2":90,"3":{"1":180000}},{"1":54826,"2":90,"3":{"1":180000}},{"1":54704,"2":90,"3":{"1":180000}},{"1":54588,"2":90,"3":{"1":180000}},{"1":51529,"2":70,"3":{"1":140000}},{"1":51192,"2":70,"3":{"1":140000}},{"1":53064,"2":80,"3":{"1":160000}},{"1":52241,"2":80,"3":{"1":160000}},{"1":52098,"2":80,"3":{"1":160000}},{"1":56610,"2":80,"3":{"1":160000}},{"1":53593,"2":70,"3":{"1":140000}},{"1":56833,"2":80,"3":{"1":160000}},{"1":55795,"2":80,"3":{"1":160000}},{"1":54544,"2":80,"3":{"1":160000}},{"1":55354,"2":80,"3":{"1":160000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50314,"2":520,"3":{"1":52000}},{"1":50501,"2":520,"3":{"1":52000}},{"1":50283,"2":520,"3":{"1":52000}},{"1":50266,"2":520,"3":{"1":52000}},{"1":50556,"2":530,"3":{"1":53000}},{"1":50828,"2":550,"3":{"1":55000}},{"1":50092,"2":550,"3":{"1":55000}},{"1":50420,"2":540,"3":{"1":54000}},{"1":50209,"2":520,"3":{"1":52000}},{"1":50199,"2":540,"3":{"1":54000}},{"1":50547,"2":490,"3":{"1":49000}},{"1":50126,"2":510,"3":{"1":51000}},{"1":50372,"2":480,"3":{"1":48000}},{"1":50611,"2":520,"3":{"1":52000}},{"1":50133,"2":520,"3":{"1":52000}},{"1":50223,"2":510,"3":{"1":51000}},{"1":50673,"2":450,"3":{"1":45000}},{"1":50670,"2":450,"3":{"1":45000}},{"1":50707,"2":460,"3":{"1":46000}},{"1":50560,"2":480,"3":{"1":48000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50894,"2":520,"3":{"1":104000}},{"1":50042,"2":510,"3":{"1":102000}},{"1":50272,"2":530,"3":{"1":106000}},{"1":50502,"2":440,"3":{"1":88000}},{"1":50613,"2":520,"3":{"1":104000}},{"1":50173,"2":530,"3":{"1":106000}},{"1":50741,"2":500,"3":{"1":100000}},{"1":50316,"2":500,"3":{"1":100000}},{"1":50437,"2":490,"3":{"1":98000}},{"1":50028,"2":430,"3":{"1":86000}},{"1":51025,"2":450,"3":{"1":90000}},{"1":50293,"2":420,"3":{"1":84000}},{"1":50775,"2":450,"3":{"1":90000}},{"1":50245,"2":410,"3":{"1":82000}},{"1":50851,"2":410,"3":{"1":82000}},{"1":50106,"2":390,"3":{"1":78000}},{"1":50447,"2":450,"3":{"1":90000}},{"1":51017,"2":440,"3":{"1":88000}},{"1":50704,"2":470,"3":{"1":94000}},{"1":51008,"2":450,"3":{"1":90000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":51540,"2":290,"3":{"1":290000}},{"1":51694,"2":270,"3":{"1":270000}},{"1":51796,"2":270,"3":{"1":270000}},{"1":51263,"2":290,"3":{"1":290000}},{"1":50664,"2":290,"3":{"1":290000}},{"1":50532,"2":290,"3":{"1":290000}},{"1":50470,"2":290,"3":{"1":290000}},{"1":50399,"2":270,"3":{"1":270000}},{"1":51094,"2":270,"3":{"1":270000}},{"1":51591,"2":270,"3":{"1":270000}},{"1":51159,"2":250,"3":{"1":250000}},{"1":50120,"2":270,"3":{"1":270000}},{"1":51420,"2":270,"3":{"1":270000}},{"1":51715,"2":250,"3":{"1":250000}},{"1":50886,"2":270,"3":{"1":270000}},{"1":51262,"2":270,"3":{"1":270000}},{"1":50676,"2":270,"3":{"1":270000}},{"1":50726,"2":280,"3":{"1":280000}},{"1":51724,"2":260,"3":{"1":260000}},{"1":50501,"2":260,"3":{"1":260000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":50088,"2":130,"3":{"1":260000}},{"1":53600,"2":140,"3":{"1":280000}},{"1":50754,"2":130,"3":{"1":260000}},{"1":50164,"2":130,"3":{"1":260000}},{"1":50137,"2":130,"3":{"1":260000}},{"1":50958,"2":130,"3":{"1":260000}},{"1":51039,"2":130,"3":{"1":260000}},{"1":53722,"2":140,"3":{"1":280000}},{"1":53485,"2":140,"3":{"1":280000}},{"1":50064,"2":130,"3":{"1":260000}},{"1":51673,"2":130,"3":{"1":260000}},{"1":50797,"2":120,"3":{"1":240000}},{"1":50464,"2":130,"3":{"1":260000}},{"1":56293,"2":130,"3":{"1":260000}},{"1":53174,"2":130,"3":{"1":260000}},{"1":53448,"2":130,"3":{"1":260000}},{"1":53194,"2":130,"3":{"1":260000}},{"1":52061,"2":140,"3":{"1":280000}},{"1":50669,"2":120,"3":{"1":240000}},{"1":50294,"2":130,"3":{"1":260000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50755,"2":590,"3":{"2":59000}},{"1":50558,"2":590,"3":{"2":59000}},{"1":50386,"2":610,"3":{"2":61000}},{"1":50189,"2":600,"3":{"2":60000}},{"1":50238,"2":610,"3":{"2":61000}},{"1":50642,"2":610,"3":{"2":61000}},{"1":50679,"2":610,"3":{"2":61000}},{"1":50143,"2":600,"3":{"2":60000}},{"1":50611,"2":660,"3":{"2":66000}},{"1":50121,"2":600,"3":{"2":60000}},{"1":50207,"2":600,"3":{"2":60000}},{"1":50340,"2":580,"3":{"2":58000}},{"1":50686,"2":660,"3":{"2":66000}},{"1":50670,"2":600,"3":{"2":60000}},{"1":50730,"2":540,"3":{"2":54000}},{"1":50135,"2":630,"3":{"2":63000}},{"1":50053,"2":600,"3":{"2":60000}},{"1":50073,"2":660,"3":{"2":66000}},{"1":50621,"2":620,"3":{"2":62000}},{"1":50224,"2":570,"3":{"2":57000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":50703,"2":470,"3":{"2":94000}},{"1":50568,"2":470,"3":{"2":94000}},{"1":50660,"2":470,"3":{"2":94000}},{"1":50482,"2":470,"3":{"2":94000}},{"1":51032,"2":470,"3":{"2":94000}},{"1":50614,"2":470,"3":{"2":94000}},{"1":50617,"2":470,"3":{"2":94000}},{"1":50332,"2":470,"3":{"2":94000}},{"1":50370,"2":500,"3":{"2":100000}},{"1":50123,"2":500,"3":{"2":100000}},{"1":50005,"2":500,"3":{"2":100000}},{"1":50229,"2":490,"3":{"2":98000}},{"1":54014,"2":300,"3":{"2":60000}},{"1":50769,"2":460,"3":{"2":92000}},{"1":50913,"2":480,"3":{"2":96000}},{"1":50520,"2":460,"3":{"2":92000}},{"1":50347,"2":440,"3":{"2":88000}},{"1":50835,"2":480,"3":{"2":96000}},{"1":50176,"2":470,"3":{"2":94000}},{"1":51028,"2":440,"3":{"2":88000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":51067,"2":150,"3":{"2":150000}},{"1":51138,"2":150,"3":{"2":150000}},{"1":52489,"2":150,"3":{"2":150000}},{"1":52685,"2":150,"3":{"2":150000}},{"1":52023,"2":150,"3":{"2":150000}},{"1":52501,"2":130,"3":{"2":130000}},{"1":50577,"2":130,"3":{"2":130000}},{"1":50521,"2":140,"3":{"2":140000}},{"1":52774,"2":150,"3":{"2":150000}},{"1":51614,"2":140,"3":{"2":140000}},{"1":54178,"2":140,"3":{"2":140000}},{"1":52020,"2":160,"3":{"2":160000}},{"1":52536,"2":160,"3":{"2":160000}},{"1":50516,"2":130,"3":{"2":130000}},{"1":53018,"2":150,"3":{"2":150000}},{"1":52101,"2":150,"3":{"2":150000}},{"1":51412,"2":150,"3":{"2":150000}},{"1":54097,"2":140,"3":{"2":140000}},{"1":50790,"2":130,"3":{"2":130000}},{"1":50714,"2":130,"3":{"2":130000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":51786,"2":70,"3":{"2":140000}},{"1":54757,"2":80,"3":{"2":160000}},{"1":55541,"2":80,"3":{"2":160000}},{"1":56373,"2":80,"3":{"2":160000}},{"1":56917,"2":80,"3":{"2":160000}},{"1":54907,"2":80,"3":{"2":160000}},{"1":55220,"2":80,"3":{"2":160000}},{"1":51250,"2":70,"3":{"2":140000}},{"1":50462,"2":70,"3":{"2":140000}},{"1":50619,"2":70,"3":{"2":140000}},{"1":53607,"2":60,"3":{"2":120000}},{"1":53666,"2":80,"3":{"2":160000}},{"1":50898,"2":80,"3":{"2":160000}},{"1":50567,"2":70,"3":{"2":140000}},{"1":51508,"2":70,"3":{"2":140000}},{"1":57016,"2":80,"3":{"2":160000}},{"1":54103,"2":80,"3":{"2":160000}},{"1":52079,"2":80,"3":{"2":160000}},{"1":51445,"2":70,"3":{"2":140000}},{"1":53356,"2":80,"3":{"2":160000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":50912,"2":520,"3":{"2":52000}},{"1":50494,"2":530,"3":{"2":53000}},{"1":50157,"2":540,"3":{"2":54000}},{"1":50684,"2":510,"3":{"2":51000}},{"1":50858,"2":550,"3":{"2":55000}},{"1":50871,"2":540,"3":{"2":54000}},{"1":50846,"2":520,"3":{"2":52000}},{"1":50164,"2":520,"3":{"2":52000}},{"1":50317,"2":540,"3":{"2":54000}},{"1":50473,"2":570,"3":{"2":57000}},{"1":50187,"2":550,"3":{"2":55000}},{"1":50320,"2":530,"3":{"2":53000}},{"1":50315,"2":550,"3":{"2":55000}},{"1":50403,"2":520,"3":{"2":52000}},{"1":50824,"2":550,"3":{"2":55000}},{"1":50560,"2":420,"3":{"2":42000}},{"1":50744,"2":500,"3":{"2":50000}},{"1":50718,"2":510,"3":{"2":51000}},{"1":50106,"2":470,"3":{"2":47000}},{"1":50154,"2":510,"3":{"2":51000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":50852,"2":490,"3":{"2":98000}},{"1":50877,"2":500,"3":{"2":100000}},{"1":50869,"2":460,"3":{"2":92000}},{"1":50147,"2":510,"3":{"2":102000}},{"1":50132,"2":510,"3":{"2":102000}},{"1":50455,"2":520,"3":{"2":104000}},{"1":50600,"2":480,"3":{"2":96000}},{"1":50844,"2":510,"3":{"2":102000}},{"1":50471,"2":490,"3":{"2":98000}},{"1":50680,"2":490,"3":{"2":98000}},{"1":50376,"2":420,"3":{"2":84000}},{"1":50727,"2":450,"3":{"2":90000}},{"1":50740,"2":440,"3":{"2":88000}},{"1":50318,"2":470,"3":{"2":94000}},{"1":50272,"2":450,"3":{"2":90000}},{"1":50434,"2":480,"3":{"2":96000}},{"1":50206,"2":460,"3":{"2":92000}},{"1":50292,"2":470,"3":{"2":94000}},{"1":51190,"2":400,"3":{"2":80000}},{"1":50994,"2":470,"3":{"2":94000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":51096,"2":230,"3":{"2":230000}},{"1":50385,"2":270,"3":{"2":270000}},{"1":50909,"2":270,"3":{"2":270000}},{"1":50686,"2":270,"3":{"2":270000}},{"1":51181,"2":270,"3":{"2":270000}},{"1":50565,"2":270,"3":{"2":270000}},{"1":51159,"2":270,"3":{"2":270000}},{"1":50846,"2":270,"3":{"2":270000}},{"1":50973,"2":270,"3":{"2":270000}},{"1":50010,"2":240,"3":{"2":240000}},{"1":51205,"2":250,"3":{"2":250000}},{"1":50679,"2":240,"3":{"2":240000}},{"1":50753,"2":240,"3":{"2":240000}},{"1":51430,"2":240,"3":{"2":240000}},{"1":51327,"2":230,"3":{"2":230000}},{"1":50072,"2":250,"3":{"2":250000}},{"1":51139,"2":260,"3":{"2":260000}},{"1":50519,"2":240,"3":{"2":240000}},{"1":50391,"2":220,"3":{"2":220000}},{"1":51332,"2":240,"3":{"2":240000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":54146,"2":130,"3":{"2":260000}},{"1":54071,"2":130,"3":{"2":260000}},{"1":50248,"2":120,"3":{"2":240000}},{"1":53935,"2":130,"3":{"2":260000}},{"1":51901,"2":130,"3":{"2":260000}},{"1":50223,"2":120,"3":{"2":240000}},{"1":52445,"2":120,"3":{"2":240000}},{"1":53278,"2":140,"3":{"2":280000}},{"1":51656,"2":120,"3":{"2":240000}},{"1":53518,"2":120,"3":{"2":240000}},{"1":52561,"2":120,"3":{"2":240000}},{"1":50068,"2":120,"3":{"2":240000}},{"1":51829,"2":120,"3":{"2":240000}},{"1":53273,"2":130,"3":{"2":260000}},{"1":51479,"2":110,"3":{"2":220000}},{"1":51167,"2":130,"3":{"2":260000}},{"1":51055,"2":130,"3":{"2":260000}},{"1":53569,"2":140,"3":{"2":280000}},{"1":50331,"2":120,"3":{"2":240000}},{"1":51164,"2":120,"3":{"2":240000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50028,"2":500,"3":{"4":50000}},{"1":50662,"2":640,"3":{"4":64000}},{"1":50002,"2":530,"3":{"4":53000}},{"1":51173,"2":510,"3":{"4":51000}},{"1":50094,"2":540,"3":{"4":54000}},{"1":50577,"2":550,"3":{"4":55000}},{"1":50796,"2":570,"3":{"4":57000}},{"1":50081,"2":540,"3":{"4":54000}},{"1":50699,"2":530,"3":{"4":53000}},{"1":50551,"2":400,"3":{"4":40000}},{"1":50175,"2":620,"3":{"4":62000}},{"1":50339,"2":630,"3":{"4":63000}},{"1":50452,"2":550,"3":{"4":55000}},{"1":50454,"2":560,"3":{"4":56000}},{"1":50620,"2":460,"3":{"4":46000}},{"1":50718,"2":470,"3":{"4":47000}},{"1":50718,"2":580,"3":{"4":58000}},{"1":50536,"2":540,"3":{"4":54000}},{"1":51284,"2":390,"3":{"4":39000}},{"1":50220,"2":480,"3":{"4":48000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50413,"2":420,"3":{"4":84000}},{"1":50363,"2":430,"3":{"4":86000}},{"1":50628,"2":420,"3":{"4":84000}},{"1":50967,"2":430,"3":{"4":86000}},{"1":50481,"2":410,"3":{"4":82000}},{"1":50241,"2":470,"3":{"4":94000}},{"1":50443,"2":400,"3":{"4":80000}},{"1":50231,"2":420,"3":{"4":84000}},{"1":50828,"2":420,"3":{"4":84000}},{"1":50659,"2":440,"3":{"4":88000}},{"1":51045,"2":400,"3":{"4":80000}},{"1":51219,"2":390,"3":{"4":78000}},{"1":50658,"2":470,"3":{"4":94000}},{"1":50162,"2":480,"3":{"4":96000}},{"1":50699,"2":480,"3":{"4":96000}},{"1":50980,"2":490,"3":{"4":98000}},{"1":50162,"2":480,"3":{"4":96000}},{"1":50985,"2":490,"3":{"4":98000}},{"1":50915,"2":480,"3":{"4":96000}},{"1":50007,"2":480,"3":{"4":96000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53218,"2":150,"3":{"4":150000}},{"1":50902,"2":140,"3":{"4":140000}},{"1":51674,"2":110,"3":{"4":110000}},{"1":51937,"2":130,"3":{"4":130000}},{"1":52402,"2":120,"3":{"4":120000}},{"1":52910,"2":130,"3":{"4":130000}},{"1":51442,"2":130,"3":{"4":130000}},{"1":52826,"2":140,"3":{"4":140000}},{"1":53373,"2":150,"3":{"4":150000}},{"1":50103,"2":130,"3":{"4":130000}},{"1":52505,"2":150,"3":{"4":150000}},{"1":52541,"2":150,"3":{"4":150000}},{"1":52604,"2":150,"3":{"4":150000}},{"1":52542,"2":150,"3":{"4":150000}},{"1":53441,"2":150,"3":{"4":150000}},{"1":51035,"2":140,"3":{"4":140000}},{"1":52904,"2":150,"3":{"4":150000}},{"1":53303,"2":150,"3":{"4":150000}},{"1":50244,"2":140,"3":{"4":140000}},{"1":51195,"2":130,"3":{"4":130000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":58525,"2":60,"3":{"4":120000}},{"1":55960,"2":70,"3":{"4":140000}},{"1":54297,"2":70,"3":{"4":140000}},{"1":52951,"2":70,"3":{"4":140000}},{"1":55413,"2":70,"3":{"4":140000}},{"1":55025,"2":70,"3":{"4":140000}},{"1":53573,"2":70,"3":{"4":140000}},{"1":59609,"2":70,"3":{"4":140000}},{"1":56269,"2":70,"3":{"4":140000}},{"1":54972,"2":70,"3":{"4":140000}},{"1":56162,"2":80,"3":{"4":160000}},{"1":57003,"2":80,"3":{"4":160000}},{"1":56692,"2":80,"3":{"4":160000}},{"1":55826,"2":80,"3":{"4":160000}},{"1":55494,"2":70,"3":{"4":140000}},{"1":56796,"2":80,"3":{"4":160000}},{"1":56088,"2":80,"3":{"4":160000}},{"1":55940,"2":70,"3":{"4":140000}},{"1":55916,"2":80,"3":{"4":160000}},{"1":56294,"2":80,"3":{"4":160000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":52060,"2":70,"3":{"4":70000}},{"1":55703,"2":70,"3":{"4":70000}},{"1":51951,"2":70,"3":{"4":70000}},{"1":52309,"2":70,"3":{"4":70000}},{"1":51560,"2":70,"3":{"4":70000}},{"1":56056,"2":70,"3":{"4":70000}},{"1":53685,"2":60,"3":{"4":60000}},{"1":57196,"2":70,"3":{"4":70000}},{"1":51997,"2":60,"3":{"4":60000}},{"1":54825,"2":70,"3":{"4":70000}},{"1":53704,"2":60,"3":{"4":60000}},{"1":55741,"2":80,"3":{"4":80000}},{"1":56467,"2":80,"3":{"4":80000}},{"1":56482,"2":80,"3":{"4":80000}},{"1":57384,"2":80,"3":{"4":80000}},{"1":52196,"2":70,"3":{"4":70000}},{"1":56558,"2":80,"3":{"4":80000}},{"1":56455,"2":80,"3":{"4":80000}},{"1":54497,"2":70,"3":{"4":70000}},{"1":56320,"2":80,"3":{"4":80000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50910,"2":450,"3":{"4":45000}},{"1":50935,"2":480,"3":{"4":48000}},{"1":50751,"2":490,"3":{"4":49000}},{"1":50083,"2":470,"3":{"4":47000}},{"1":50432,"2":490,"3":{"4":49000}},{"1":50852,"2":490,"3":{"4":49000}},{"1":50545,"2":520,"3":{"4":52000}},{"1":50244,"2":520,"3":{"4":52000}},{"1":50242,"2":460,"3":{"4":46000}},{"1":51090,"2":450,"3":{"4":45000}},{"1":50000,"2":510,"3":{"4":51000}},{"1":50490,"2":510,"3":{"4":51000}},{"1":50419,"2":520,"3":{"4":52000}},{"1":50335,"2":520,"3":{"4":52000}},{"1":50257,"2":520,"3":{"4":52000}},{"1":50425,"2":520,"3":{"4":52000}},{"1":50271,"2":520,"3":{"4":52000}},{"1":50254,"2":520,"3":{"4":52000}},{"1":51847,"2":510,"3":{"4":51000}},{"1":50567,"2":440,"3":{"4":44000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50299,"2":450,"3":{"4":90000}},{"1":50194,"2":400,"3":{"4":80000}},{"1":50111,"2":450,"3":{"4":90000}},{"1":50408,"2":460,"3":{"4":92000}},{"1":50262,"2":400,"3":{"4":80000}},{"1":50207,"2":440,"3":{"4":88000}},{"1":50141,"2":450,"3":{"4":90000}},{"1":50730,"2":460,"3":{"4":92000}},{"1":50917,"2":460,"3":{"4":92000}},{"1":50338,"2":450,"3":{"4":90000}},{"1":50900,"2":460,"3":{"4":92000}},{"1":50635,"2":460,"3":{"4":92000}},{"1":50757,"2":460,"3":{"4":92000}},{"1":50430,"2":400,"3":{"4":80000}},{"1":50965,"2":400,"3":{"4":80000}},{"1":50477,"2":460,"3":{"4":92000}},{"1":50600,"2":400,"3":{"4":80000}},{"1":50546,"2":410,"3":{"4":82000}},{"1":50575,"2":460,"3":{"4":92000}},{"1":51694,"2":390,"3":{"4":78000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51031,"2":190,"3":{"4":190000}},{"1":50531,"2":210,"3":{"4":210000}},{"1":50731,"2":210,"3":{"4":210000}},{"1":51804,"2":190,"3":{"4":190000}},{"1":50631,"2":190,"3":{"4":190000}},{"1":51962,"2":190,"3":{"4":190000}},{"1":53066,"2":210,"3":{"4":210000}},{"1":50219,"2":210,"3":{"4":210000}},{"1":52118,"2":170,"3":{"4":170000}},{"1":51245,"2":190,"3":{"4":190000}},{"1":50694,"2":190,"3":{"4":190000}},{"1":50358,"2":210,"3":{"4":210000}},{"1":51878,"2":220,"3":{"4":220000}},{"1":51777,"2":210,"3":{"4":210000}},{"1":51823,"2":210,"3":{"4":210000}},{"1":51828,"2":200,"3":{"4":200000}},{"1":51614,"2":180,"3":{"4":180000}},{"1":50234,"2":180,"3":{"4":180000}},{"1":52530,"2":170,"3":{"4":170000}},{"1":52205,"2":210,"3":{"4":210000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52644,"2":110,"3":{"4":220000}},{"1":54020,"2":90,"3":{"4":180000}},{"1":50008,"2":90,"3":{"4":180000}},{"1":50271,"2":90,"3":{"4":180000}},{"1":50440,"2":80,"3":{"4":160000}},{"1":54080,"2":100,"3":{"4":200000}},{"1":50721,"2":80,"3":{"4":160000}},{"1":50316,"2":80,"3":{"4":160000}},{"1":50396,"2":90,"3":{"4":180000}},{"1":53365,"2":90,"3":{"4":180000}},{"1":54330,"2":100,"3":{"4":200000}},{"1":52937,"2":100,"3":{"4":200000}},{"1":54545,"2":90,"3":{"4":180000}},{"1":53560,"2":110,"3":{"4":220000}},{"1":53264,"2":100,"3":{"4":200000}},{"1":51215,"2":100,"3":{"4":200000}},{"1":52104,"2":110,"3":{"4":220000}},{"1":50169,"2":100,"3":{"4":200000}},{"1":51676,"2":110,"3":{"4":220000}},{"1":52329,"2":110,"3":{"4":220000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":50385,"2":60,"3":{"4":60000}},{"1":54991,"2":80,"3":{"4":80000}},{"1":54042,"2":90,"3":{"4":90000}},{"1":53431,"2":90,"3":{"4":90000}},{"1":52057,"2":80,"3":{"4":80000}},{"1":53792,"2":90,"3":{"4":90000}},{"1":54088,"2":90,"3":{"4":90000}},{"1":52937,"2":80,"3":{"4":80000}},{"1":53372,"2":80,"3":{"4":80000}},{"1":53583,"2":90,"3":{"4":90000}},{"1":55733,"2":80,"3":{"4":80000}},{"1":53431,"2":80,"3":{"4":80000}},{"1":54054,"2":90,"3":{"4":90000}},{"1":54175,"2":90,"3":{"4":90000}},{"1":54049,"2":90,"3":{"4":90000}},{"1":50792,"2":80,"3":{"4":80000}},{"1":54600,"2":80,"3":{"4":80000}},{"1":55198,"2":90,"3":{"4":90000}},{"1":54039,"2":80,"3":{"4":80000}},{"1":52047,"2":70,"3":{"4":70000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/head/props_chrome.pb.json b/benchmark/data/skybrian-macbookpro/head/props_chrome.pb.json
deleted file mode 100644
index 458a188..0000000
--- a/benchmark/data/skybrian-macbookpro/head/props_chrome.pb.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/props.html",
- "10": {
- "1": "skybrian-macbookpro",
- "10": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50980,"2":81960,"3":{"4":8196000}},{"1":50000,"2":142730,"3":{"4":14273000}},{"1":50000,"2":141210,"3":{"4":14121000}},{"1":50000,"2":141510,"3":{"4":14151000}},{"1":50000,"2":141300,"3":{"4":14130000}},{"1":50000,"2":141820,"3":{"4":14182000}},{"1":50000,"2":142980,"3":{"4":14298000}},{"1":50000,"2":129590,"3":{"4":12959000}},{"1":50000,"2":133600,"3":{"4":13360000}},{"1":50000,"2":127120,"3":{"4":12712000}},{"1":50000,"2":141610,"3":{"4":14161000}},{"1":50000,"2":143160,"3":{"4":14316000}},{"1":50000,"2":141190,"3":{"4":14119000}},{"1":50000,"2":139590,"3":{"4":13959000}},{"1":50000,"2":142950,"3":{"4":14295000}},{"1":50000,"2":123420,"3":{"4":12342000}},{"1":50000,"2":138970,"3":{"4":13897000}},{"1":50000,"2":138020,"3":{"4":13802000}},{"1":50000,"2":145050,"3":{"4":14505000}},{"1":50000,"2":145800,"3":{"4":14580000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50000,"2":139800,"3":{"4":13980000}},{"1":50000,"2":144640,"3":{"4":14464000}},{"1":50000,"2":140750,"3":{"4":14075000}},{"1":50000,"2":141970,"3":{"4":14197000}},{"1":50000,"2":140820,"3":{"4":14082000}},{"1":50000,"2":141460,"3":{"4":14146000}},{"1":50000,"2":141820,"3":{"4":14182000}},{"1":50000,"2":140920,"3":{"4":14092000}},{"1":50000,"2":127000,"3":{"4":12700000}},{"1":50000,"2":140810,"3":{"4":14081000}},{"1":50000,"2":142450,"3":{"4":14245000}},{"1":50000,"2":141570,"3":{"4":14157000}},{"1":50000,"2":140530,"3":{"4":14053000}},{"1":50000,"2":139450,"3":{"4":13945000}},{"1":50000,"2":142170,"3":{"4":14217000}},{"1":50000,"2":134240,"3":{"4":13424000}},{"1":50000,"2":143580,"3":{"4":14358000}},{"1":50000,"2":144490,"3":{"4":14449000}},{"1":50000,"2":128580,"3":{"4":12858000}},{"1":50000,"2":149860,"3":{"4":14986000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50010,"2":8080,"3":{"5":808000}},{"1":50030,"2":7640,"3":{"5":764000}},{"1":50045,"2":8270,"3":{"5":827000}},{"1":50040,"2":8380,"3":{"5":838000}},{"1":50030,"2":8270,"3":{"5":827000}},{"1":50040,"2":7790,"3":{"5":779000}},{"1":50020,"2":8260,"3":{"5":826000}},{"1":50010,"2":8380,"3":{"5":838000}},{"1":50010,"2":8430,"3":{"5":843000}},{"1":50005,"2":7830,"3":{"5":783000}},{"1":50020,"2":8470,"3":{"5":847000}},{"1":50060,"2":8400,"3":{"5":840000}},{"1":50015,"2":8410,"3":{"5":841000}},{"1":50035,"2":8330,"3":{"5":833000}},{"1":50010,"2":8570,"3":{"5":857000}},{"1":50055,"2":8680,"3":{"5":868000}},{"1":50025,"2":8630,"3":{"5":863000}},{"1":50025,"2":8600,"3":{"5":860000}},{"1":50005,"2":7780,"3":{"5":778000}},{"1":50050,"2":8830,"3":{"5":883000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50020,"2":6990,"3":{"5":699000}},{"1":50050,"2":8480,"3":{"5":848000}},{"1":50010,"2":8360,"3":{"5":836000}},{"1":50015,"2":8240,"3":{"5":824000}},{"1":50010,"2":8360,"3":{"5":836000}},{"1":50005,"2":8280,"3":{"5":828000}},{"1":50040,"2":7610,"3":{"5":761000}},{"1":50040,"2":8590,"3":{"5":859000}},{"1":50040,"2":8450,"3":{"5":845000}},{"1":50005,"2":8360,"3":{"5":836000}},{"1":50035,"2":8440,"3":{"5":844000}},{"1":50025,"2":8400,"3":{"5":840000}},{"1":50055,"2":8410,"3":{"5":841000}},{"1":50035,"2":8450,"3":{"5":845000}},{"1":50010,"2":8780,"3":{"5":878000}},{"1":50055,"2":8470,"3":{"5":847000}},{"1":50045,"2":8580,"3":{"5":858000}},{"1":50050,"2":8640,"3":{"5":864000}},{"1":50040,"2":7640,"3":{"5":764000}},{"1":50025,"2":8600,"3":{"5":860000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50035,"2":9710,"3":{"4":971000}},{"1":50005,"2":10110,"3":{"4":1011000}},{"1":50010,"2":9800,"3":{"4":980000}},{"1":50025,"2":10080,"3":{"4":1008000}},{"1":50030,"2":10060,"3":{"4":1006000}},{"1":50030,"2":10130,"3":{"4":1013000}},{"1":50015,"2":10340,"3":{"4":1034000}},{"1":50000,"2":10450,"3":{"4":1045000}},{"1":50000,"2":10030,"3":{"4":1003000}},{"1":50005,"2":10030,"3":{"4":1003000}},{"1":50030,"2":10120,"3":{"4":1012000}},{"1":50010,"2":10050,"3":{"4":1005000}},{"1":50045,"2":10120,"3":{"4":1012000}},{"1":50020,"2":10070,"3":{"4":1007000}},{"1":50025,"2":10310,"3":{"4":1031000}},{"1":50005,"2":10560,"3":{"4":1056000}},{"1":50035,"2":10440,"3":{"4":1044000}},{"1":50025,"2":10630,"3":{"4":1063000}},{"1":50005,"2":10430,"3":{"4":1043000}},{"1":50045,"2":10410,"3":{"4":1041000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50025,"2":8370,"3":{"4":837000}},{"1":50040,"2":8790,"3":{"4":879000}},{"1":50005,"2":8840,"3":{"4":884000}},{"1":50040,"2":8680,"3":{"4":868000}},{"1":50010,"2":8600,"3":{"4":860000}},{"1":50000,"2":8880,"3":{"4":888000}},{"1":50050,"2":7890,"3":{"4":789000}},{"1":50010,"2":9070,"3":{"4":907000}},{"1":50020,"2":8840,"3":{"4":884000}},{"1":50035,"2":8740,"3":{"4":874000}},{"1":50010,"2":8930,"3":{"4":893000}},{"1":50050,"2":8470,"3":{"4":847000}},{"1":50000,"2":8770,"3":{"4":877000}},{"1":50020,"2":8780,"3":{"4":878000}},{"1":50020,"2":8950,"3":{"4":895000}},{"1":50040,"2":8940,"3":{"4":894000}},{"1":50040,"2":9350,"3":{"4":935000}},{"1":50025,"2":8910,"3":{"4":891000}},{"1":50035,"2":9000,"3":{"4":900000}},{"1":50015,"2":9320,"3":{"4":932000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian-macbookpro/head/props_vm.pb.json b/benchmark/data/skybrian-macbookpro/head/props_vm.pb.json
deleted file mode 100644
index 0947bdf..0000000
--- a/benchmark/data/skybrian-macbookpro/head/props_vm.pb.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "props_vm.dart",
- "10": {
- "1": "skybrian-macbookpro",
- "2": 2,
- "3": "1.12.0 (Mon Aug 31 04:17:53 2015) on \"macos_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+5"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50001,"2":335030,"3":{"4":33503000}},{"1":50000,"2":349700,"3":{"4":34970000}},{"1":50000,"2":382400,"3":{"4":38240000}},{"1":50000,"2":415760,"3":{"4":41576000}},{"1":50000,"2":419600,"3":{"4":41960000}},{"1":50000,"2":420440,"3":{"4":42044000}},{"1":50000,"2":403630,"3":{"4":40363000}},{"1":50000,"2":416660,"3":{"4":41666000}},{"1":50001,"2":401300,"3":{"4":40130000}},{"1":50000,"2":416590,"3":{"4":41659000}},{"1":50000,"2":417150,"3":{"4":41715000}},{"1":50000,"2":408390,"3":{"4":40839000}},{"1":50000,"2":410570,"3":{"4":41057000}},{"1":50000,"2":403980,"3":{"4":40398000}},{"1":50000,"2":410020,"3":{"4":41002000}},{"1":50000,"2":409430,"3":{"4":40943000}},{"1":50000,"2":408120,"3":{"4":40812000}},{"1":50000,"2":407020,"3":{"4":40702000}},{"1":50000,"2":370670,"3":{"4":37067000}},{"1":50000,"2":392900,"3":{"4":39290000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50000,"2":415820,"3":{"4":41582000}},{"1":50000,"2":409240,"3":{"4":40924000}},{"1":50001,"2":411250,"3":{"4":41125000}},{"1":50000,"2":410810,"3":{"4":41081000}},{"1":50000,"2":408470,"3":{"4":40847000}},{"1":50000,"2":411110,"3":{"4":41111000}},{"1":50000,"2":410430,"3":{"4":41043000}},{"1":50000,"2":380590,"3":{"4":38059000}},{"1":50001,"2":413440,"3":{"4":41344000}},{"1":50000,"2":415860,"3":{"4":41586000}},{"1":50000,"2":413940,"3":{"4":41394000}},{"1":50000,"2":413200,"3":{"4":41320000}},{"1":50000,"2":412600,"3":{"4":41260000}},{"1":50000,"2":375810,"3":{"4":37581000}},{"1":50000,"2":412710,"3":{"4":41271000}},{"1":50000,"2":414630,"3":{"4":41463000}},{"1":50000,"2":412740,"3":{"4":41274000}},{"1":50001,"2":410570,"3":{"4":41057000}},{"1":50001,"2":413910,"3":{"4":41391000}},{"1":50001,"2":412470,"3":{"4":41247000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50026,"2":12080,"3":{"5":1208000}},{"1":50016,"2":12170,"3":{"5":1217000}},{"1":50018,"2":12290,"3":{"5":1229000}},{"1":50040,"2":12210,"3":{"5":1221000}},{"1":50041,"2":12200,"3":{"5":1220000}},{"1":50031,"2":12240,"3":{"5":1224000}},{"1":50000,"2":12120,"3":{"5":1212000}},{"1":50048,"2":12170,"3":{"5":1217000}},{"1":50033,"2":12200,"3":{"5":1220000}},{"1":50018,"2":12180,"3":{"5":1218000}},{"1":50027,"2":12210,"3":{"5":1221000}},{"1":50004,"2":12000,"3":{"5":1200000}},{"1":50012,"2":12120,"3":{"5":1212000}},{"1":50019,"2":11970,"3":{"5":1197000}},{"1":50031,"2":11930,"3":{"5":1193000}},{"1":50009,"2":11890,"3":{"5":1189000}},{"1":50028,"2":10750,"3":{"5":1075000}},{"1":50019,"2":10900,"3":{"5":1090000}},{"1":50032,"2":11910,"3":{"5":1191000}},{"1":50012,"2":11960,"3":{"5":1196000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50007,"2":11610,"3":{"5":1161000}},{"1":50019,"2":11590,"3":{"5":1159000}},{"1":50031,"2":11600,"3":{"5":1160000}},{"1":50001,"2":11420,"3":{"5":1142000}},{"1":50030,"2":11500,"3":{"5":1150000}},{"1":50019,"2":11550,"3":{"5":1155000}},{"1":50009,"2":11500,"3":{"5":1150000}},{"1":50005,"2":11500,"3":{"5":1150000}},{"1":50002,"2":11590,"3":{"5":1159000}},{"1":50033,"2":12440,"3":{"5":1244000}},{"1":50000,"2":11720,"3":{"5":1172000}},{"1":50002,"2":11730,"3":{"5":1173000}},{"1":50033,"2":11720,"3":{"5":1172000}},{"1":50009,"2":11740,"3":{"5":1174000}},{"1":50010,"2":11710,"3":{"5":1171000}},{"1":50038,"2":11750,"3":{"5":1175000}},{"1":50041,"2":11720,"3":{"5":1172000}},{"1":50039,"2":11740,"3":{"5":1174000}},{"1":50036,"2":11830,"3":{"5":1183000}},{"1":50012,"2":12280,"3":{"5":1228000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50028,"2":16500,"3":{"4":1650000}},{"1":50014,"2":16180,"3":{"4":1618000}},{"1":50004,"2":16700,"3":{"4":1670000}},{"1":50025,"2":16630,"3":{"4":1663000}},{"1":50016,"2":16680,"3":{"4":1668000}},{"1":50001,"2":16670,"3":{"4":1667000}},{"1":50018,"2":16700,"3":{"4":1670000}},{"1":50002,"2":16650,"3":{"4":1665000}},{"1":50005,"2":15210,"3":{"4":1521000}},{"1":50030,"2":16840,"3":{"4":1684000}},{"1":50008,"2":16730,"3":{"4":1673000}},{"1":50010,"2":16720,"3":{"4":1672000}},{"1":50007,"2":16770,"3":{"4":1677000}},{"1":50012,"2":16590,"3":{"4":1659000}},{"1":50010,"2":16750,"3":{"4":1675000}},{"1":50017,"2":16710,"3":{"4":1671000}},{"1":50011,"2":15900,"3":{"4":1590000}},{"1":50010,"2":16670,"3":{"4":1667000}},{"1":50045,"2":16270,"3":{"4":1627000}},{"1":50023,"2":16680,"3":{"4":1668000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50021,"2":14480,"3":{"4":1448000}},{"1":50026,"2":14840,"3":{"4":1484000}},{"1":50030,"2":14790,"3":{"4":1479000}},{"1":50005,"2":14610,"3":{"4":1461000}},{"1":50001,"2":14550,"3":{"4":1455000}},{"1":50028,"2":14610,"3":{"4":1461000}},{"1":50014,"2":14490,"3":{"4":1449000}},{"1":50023,"2":14560,"3":{"4":1456000}},{"1":50017,"2":14560,"3":{"4":1456000}},{"1":50028,"2":14500,"3":{"4":1450000}},{"1":50014,"2":14550,"3":{"4":1455000}},{"1":50013,"2":14510,"3":{"4":1451000}},{"1":50030,"2":14620,"3":{"4":1462000}},{"1":50011,"2":14560,"3":{"4":1456000}},{"1":50008,"2":14540,"3":{"4":1454000}},{"1":50016,"2":14680,"3":{"4":1468000}},{"1":50019,"2":14660,"3":{"4":1466000}},{"1":50024,"2":14630,"3":{"4":1463000}},{"1":50014,"2":13110,"3":{"4":1311000}},{"1":50006,"2":14500,"3":{"4":1450000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/0.4.2/json_chrome.pb.json b/benchmark/data/skybrian5/0.4.2/json_chrome.pb.json
deleted file mode 100644
index a9d0bf4..0000000
--- a/benchmark/data/skybrian5/0.4.2/json_chrome.pb.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/readjson.html",
- "10": {
- "1": "skybrian5",
- "10": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+3"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.1"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+7"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":54740,"2":60,"3":{"1":6000}},{"1":55695,"2":70,"3":{"1":7000}},{"1":55715,"2":80,"3":{"1":8000}},{"1":55830,"2":80,"3":{"1":8000}},{"1":55035,"2":80,"3":{"1":8000}},{"1":54940,"2":80,"3":{"1":8000}},{"1":55965,"2":80,"3":{"1":8000}},{"1":55260,"2":80,"3":{"1":8000}},{"1":51155,"2":70,"3":{"1":7000}},{"1":52215,"2":70,"3":{"1":7000}},{"1":54485,"2":70,"3":{"1":7000}},{"1":53065,"2":70,"3":{"1":7000}},{"1":53405,"2":70,"3":{"1":7000}},{"1":52605,"2":70,"3":{"1":7000}},{"1":50825,"2":70,"3":{"1":7000}},{"1":51700,"2":70,"3":{"1":7000}},{"1":51140,"2":70,"3":{"1":7000}},{"1":51940,"2":70,"3":{"1":7000}},{"1":51160,"2":70,"3":{"1":7000}},{"1":50725,"2":70,"3":{"1":7000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":56340,"2":60,"3":{"1":12000}},{"1":53370,"2":60,"3":{"1":12000}},{"1":53640,"2":60,"3":{"1":12000}},{"1":52830,"2":60,"3":{"1":12000}},{"1":53215,"2":60,"3":{"1":12000}},{"1":54385,"2":60,"3":{"1":12000}},{"1":53690,"2":60,"3":{"1":12000}},{"1":53820,"2":60,"3":{"1":12000}},{"1":55040,"2":60,"3":{"1":12000}},{"1":55295,"2":60,"3":{"1":12000}},{"1":58035,"2":60,"3":{"1":12000}},{"1":57350,"2":60,"3":{"1":12000}},{"1":57730,"2":60,"3":{"1":12000}},{"1":56425,"2":60,"3":{"1":12000}},{"1":56600,"2":60,"3":{"1":12000}},{"1":57220,"2":60,"3":{"1":12000}},{"1":57020,"2":60,"3":{"1":12000}},{"1":58565,"2":60,"3":{"1":12000}},{"1":56410,"2":60,"3":{"1":12000}},{"1":56305,"2":60,"3":{"1":12000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":57665,"2":30,"3":{"1":30000}},{"1":55690,"2":30,"3":{"1":30000}},{"1":55835,"2":30,"3":{"1":30000}},{"1":52480,"2":30,"3":{"1":30000}},{"1":52460,"2":30,"3":{"1":30000}},{"1":52560,"2":30,"3":{"1":30000}},{"1":52600,"2":30,"3":{"1":30000}},{"1":53095,"2":30,"3":{"1":30000}},{"1":53870,"2":30,"3":{"1":30000}},{"1":53760,"2":30,"3":{"1":30000}},{"1":56350,"2":30,"3":{"1":30000}},{"1":54920,"2":30,"3":{"1":30000}},{"1":53985,"2":30,"3":{"1":30000}},{"1":54995,"2":30,"3":{"1":30000}},{"1":58280,"2":30,"3":{"1":30000}},{"1":56470,"2":30,"3":{"1":30000}},{"1":56585,"2":30,"3":{"1":30000}},{"1":57735,"2":30,"3":{"1":30000}},{"1":58315,"2":30,"3":{"1":30000}},{"1":57770,"2":30,"3":{"1":30000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":71790,"2":20,"3":{"1":40000}},{"1":74625,"2":20,"3":{"1":40000}},{"1":73615,"2":20,"3":{"1":40000}},{"1":69670,"2":20,"3":{"1":40000}},{"1":69405,"2":20,"3":{"1":40000}},{"1":69895,"2":20,"3":{"1":40000}},{"1":69845,"2":20,"3":{"1":40000}},{"1":70525,"2":20,"3":{"1":40000}},{"1":71445,"2":20,"3":{"1":40000}},{"1":72060,"2":20,"3":{"1":40000}},{"1":76905,"2":20,"3":{"1":40000}},{"1":72580,"2":20,"3":{"1":40000}},{"1":73670,"2":20,"3":{"1":40000}},{"1":73265,"2":20,"3":{"1":40000}},{"1":79080,"2":20,"3":{"1":40000}},{"1":74700,"2":20,"3":{"1":40000}},{"1":75045,"2":20,"3":{"1":40000}},{"1":77825,"2":20,"3":{"1":40000}},{"1":77250,"2":20,"3":{"1":40000}},{"1":77340,"2":20,"3":{"1":40000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50835,"2":60,"3":{"1":6000}},{"1":52285,"2":60,"3":{"1":6000}},{"1":50945,"2":60,"3":{"1":6000}},{"1":58245,"2":70,"3":{"1":7000}},{"1":58280,"2":70,"3":{"1":7000}},{"1":50215,"2":60,"3":{"1":6000}},{"1":50145,"2":60,"3":{"1":6000}},{"1":58215,"2":70,"3":{"1":7000}},{"1":52810,"2":60,"3":{"1":6000}},{"1":52370,"2":60,"3":{"1":6000}},{"1":53990,"2":60,"3":{"1":6000}},{"1":53080,"2":60,"3":{"1":6000}},{"1":51830,"2":60,"3":{"1":6000}},{"1":51630,"2":60,"3":{"1":6000}},{"1":53415,"2":60,"3":{"1":6000}},{"1":52155,"2":60,"3":{"1":6000}},{"1":52510,"2":60,"3":{"1":6000}},{"1":54665,"2":60,"3":{"1":6000}},{"1":54655,"2":60,"3":{"1":6000}},{"1":52555,"2":60,"3":{"1":6000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":54990,"2":70,"3":{"1":14000}},{"1":50490,"2":60,"3":{"1":12000}},{"1":51845,"2":60,"3":{"1":12000}},{"1":50400,"2":60,"3":{"1":12000}},{"1":58410,"2":70,"3":{"1":14000}},{"1":50875,"2":60,"3":{"1":12000}},{"1":50890,"2":60,"3":{"1":12000}},{"1":50510,"2":60,"3":{"1":12000}},{"1":53175,"2":60,"3":{"1":12000}},{"1":53590,"2":60,"3":{"1":12000}},{"1":53810,"2":60,"3":{"1":12000}},{"1":53230,"2":60,"3":{"1":12000}},{"1":52715,"2":60,"3":{"1":12000}},{"1":52075,"2":60,"3":{"1":12000}},{"1":53890,"2":60,"3":{"1":12000}},{"1":52760,"2":60,"3":{"1":12000}},{"1":53115,"2":60,"3":{"1":12000}},{"1":55200,"2":60,"3":{"1":12000}},{"1":55090,"2":60,"3":{"1":12000}},{"1":53120,"2":60,"3":{"1":12000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":52695,"2":60,"3":{"1":60000}},{"1":56750,"2":60,"3":{"1":60000}},{"1":57305,"2":60,"3":{"1":60000}},{"1":56305,"2":60,"3":{"1":60000}},{"1":55620,"2":60,"3":{"1":60000}},{"1":56750,"2":60,"3":{"1":60000}},{"1":57260,"2":60,"3":{"1":60000}},{"1":56295,"2":60,"3":{"1":60000}},{"1":51055,"2":50,"3":{"1":50000}},{"1":59040,"2":60,"3":{"1":60000}},{"1":59135,"2":60,"3":{"1":60000}},{"1":50040,"2":50,"3":{"1":50000}},{"1":59000,"2":60,"3":{"1":60000}},{"1":58410,"2":60,"3":{"1":60000}},{"1":59785,"2":60,"3":{"1":60000}},{"1":50030,"2":50,"3":{"1":50000}},{"1":59130,"2":60,"3":{"1":60000}},{"1":50215,"2":50,"3":{"1":50000}},{"1":59740,"2":60,"3":{"1":60000}},{"1":59605,"2":60,"3":{"1":60000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":52100,"2":30,"3":{"1":60000}},{"1":55555,"2":30,"3":{"1":60000}},{"1":56690,"2":30,"3":{"1":60000}},{"1":55705,"2":30,"3":{"1":60000}},{"1":55325,"2":30,"3":{"1":60000}},{"1":56650,"2":30,"3":{"1":60000}},{"1":56710,"2":30,"3":{"1":60000}},{"1":55970,"2":30,"3":{"1":60000}},{"1":59500,"2":30,"3":{"1":60000}},{"1":58430,"2":30,"3":{"1":60000}},{"1":59425,"2":30,"3":{"1":60000}},{"1":60170,"2":30,"3":{"1":60000}},{"1":57695,"2":30,"3":{"1":60000}},{"1":57830,"2":30,"3":{"1":60000}},{"1":58695,"2":30,"3":{"1":60000}},{"1":57900,"2":30,"3":{"1":60000}},{"1":59415,"2":30,"3":{"1":60000}},{"1":59750,"2":30,"3":{"1":60000}},{"1":60215,"2":30,"3":{"1":60000}},{"1":58930,"2":30,"3":{"1":60000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50900,"2":70,"3":{"2":7000}},{"1":51220,"2":70,"3":{"2":7000}},{"1":51025,"2":70,"3":{"2":7000}},{"1":55765,"2":80,"3":{"2":8000}},{"1":55340,"2":80,"3":{"2":8000}},{"1":56415,"2":80,"3":{"2":8000}},{"1":56865,"2":80,"3":{"2":8000}},{"1":56350,"2":80,"3":{"2":8000}},{"1":51910,"2":70,"3":{"2":7000}},{"1":51110,"2":70,"3":{"2":7000}},{"1":55635,"2":70,"3":{"2":7000}},{"1":55150,"2":70,"3":{"2":7000}},{"1":54770,"2":70,"3":{"2":7000}},{"1":54430,"2":70,"3":{"2":7000}},{"1":52470,"2":70,"3":{"2":7000}},{"1":53885,"2":70,"3":{"2":7000}},{"1":53325,"2":70,"3":{"2":7000}},{"1":55270,"2":70,"3":{"2":7000}},{"1":53045,"2":70,"3":{"2":7000}},{"1":53000,"2":70,"3":{"2":7000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":53765,"2":60,"3":{"2":12000}},{"1":56100,"2":60,"3":{"2":12000}},{"1":56410,"2":60,"3":{"2":12000}},{"1":54050,"2":60,"3":{"2":12000}},{"1":54490,"2":60,"3":{"2":12000}},{"1":55715,"2":60,"3":{"2":12000}},{"1":55740,"2":60,"3":{"2":12000}},{"1":55095,"2":60,"3":{"2":12000}},{"1":56760,"2":60,"3":{"2":12000}},{"1":57520,"2":60,"3":{"2":12000}},{"1":59335,"2":60,"3":{"2":12000}},{"1":59350,"2":60,"3":{"2":12000}},{"1":58525,"2":60,"3":{"2":12000}},{"1":58725,"2":60,"3":{"2":12000}},{"1":61230,"2":60,"3":{"2":12000}},{"1":58650,"2":60,"3":{"2":12000}},{"1":59120,"2":60,"3":{"2":12000}},{"1":50095,"2":50,"3":{"2":10000}},{"1":50465,"2":50,"3":{"2":10000}},{"1":59770,"2":60,"3":{"2":12000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":55335,"2":30,"3":{"2":30000}},{"1":59610,"2":30,"3":{"2":30000}},{"1":61670,"2":30,"3":{"2":30000}},{"1":54770,"2":30,"3":{"2":30000}},{"1":55210,"2":30,"3":{"2":30000}},{"1":55955,"2":30,"3":{"2":30000}},{"1":56665,"2":30,"3":{"2":30000}},{"1":57690,"2":30,"3":{"2":30000}},{"1":57475,"2":30,"3":{"2":30000}},{"1":57705,"2":30,"3":{"2":30000}},{"1":58680,"2":30,"3":{"2":30000}},{"1":58840,"2":30,"3":{"2":30000}},{"1":58305,"2":30,"3":{"2":30000}},{"1":58230,"2":30,"3":{"2":30000}},{"1":60445,"2":30,"3":{"2":30000}},{"1":61360,"2":30,"3":{"2":30000}},{"1":61370,"2":30,"3":{"2":30000}},{"1":60705,"2":30,"3":{"2":30000}},{"1":61450,"2":30,"3":{"2":30000}},{"1":60750,"2":30,"3":{"2":30000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":73480,"2":20,"3":{"2":40000}},{"1":79085,"2":20,"3":{"2":40000}},{"1":80740,"2":20,"3":{"2":40000}},{"1":73300,"2":20,"3":{"2":40000}},{"1":73935,"2":20,"3":{"2":40000}},{"1":74640,"2":20,"3":{"2":40000}},{"1":75355,"2":20,"3":{"2":40000}},{"1":76910,"2":20,"3":{"2":40000}},{"1":76400,"2":20,"3":{"2":40000}},{"1":77010,"2":20,"3":{"2":40000}},{"1":77705,"2":20,"3":{"2":40000}},{"1":78140,"2":20,"3":{"2":40000}},{"1":77465,"2":20,"3":{"2":40000}},{"1":77365,"2":20,"3":{"2":40000}},{"1":81030,"2":20,"3":{"2":40000}},{"1":81295,"2":20,"3":{"2":40000}},{"1":83295,"2":20,"3":{"2":40000}},{"1":80615,"2":20,"3":{"2":40000}},{"1":81155,"2":20,"3":{"2":40000}},{"1":80200,"2":20,"3":{"2":40000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":53435,"2":60,"3":{"2":6000}},{"1":50985,"2":60,"3":{"2":6000}},{"1":52570,"2":60,"3":{"2":6000}},{"1":57780,"2":70,"3":{"2":7000}},{"1":50215,"2":60,"3":{"2":6000}},{"1":57645,"2":70,"3":{"2":7000}},{"1":50770,"2":60,"3":{"2":6000}},{"1":57880,"2":70,"3":{"2":7000}},{"1":52315,"2":60,"3":{"2":6000}},{"1":52320,"2":60,"3":{"2":6000}},{"1":55710,"2":60,"3":{"2":6000}},{"1":54845,"2":60,"3":{"2":6000}},{"1":55120,"2":60,"3":{"2":6000}},{"1":55060,"2":60,"3":{"2":6000}},{"1":54920,"2":60,"3":{"2":6000}},{"1":54045,"2":60,"3":{"2":6000}},{"1":54205,"2":60,"3":{"2":6000}},{"1":54505,"2":60,"3":{"2":6000}},{"1":55960,"2":60,"3":{"2":6000}},{"1":53055,"2":60,"3":{"2":6000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":51680,"2":60,"3":{"2":12000}},{"1":52565,"2":60,"3":{"2":12000}},{"1":53370,"2":60,"3":{"2":12000}},{"1":50485,"2":60,"3":{"2":12000}},{"1":51020,"2":60,"3":{"2":12000}},{"1":50265,"2":60,"3":{"2":12000}},{"1":51270,"2":60,"3":{"2":12000}},{"1":53470,"2":60,"3":{"2":12000}},{"1":52925,"2":60,"3":{"2":12000}},{"1":52425,"2":60,"3":{"2":12000}},{"1":57150,"2":60,"3":{"2":12000}},{"1":55650,"2":60,"3":{"2":12000}},{"1":54985,"2":60,"3":{"2":12000}},{"1":55715,"2":60,"3":{"2":12000}},{"1":55175,"2":60,"3":{"2":12000}},{"1":54640,"2":60,"3":{"2":12000}},{"1":54945,"2":60,"3":{"2":12000}},{"1":55590,"2":60,"3":{"2":12000}},{"1":50030,"2":50,"3":{"2":10000}},{"1":54270,"2":60,"3":{"2":12000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":59745,"2":60,"3":{"2":60000}},{"1":50200,"2":50,"3":{"2":50000}},{"1":59495,"2":60,"3":{"2":60000}},{"1":58010,"2":60,"3":{"2":60000}},{"1":59020,"2":60,"3":{"2":60000}},{"1":57640,"2":60,"3":{"2":60000}},{"1":58640,"2":60,"3":{"2":60000}},{"1":58590,"2":60,"3":{"2":60000}},{"1":50510,"2":50,"3":{"2":50000}},{"1":50140,"2":50,"3":{"2":50000}},{"1":53370,"2":50,"3":{"2":50000}},{"1":52715,"2":50,"3":{"2":50000}},{"1":52720,"2":50,"3":{"2":50000}},{"1":52300,"2":50,"3":{"2":50000}},{"1":52500,"2":50,"3":{"2":50000}},{"1":52385,"2":50,"3":{"2":50000}},{"1":53035,"2":50,"3":{"2":50000}},{"1":52585,"2":50,"3":{"2":50000}},{"1":54315,"2":50,"3":{"2":50000}},{"1":51600,"2":50,"3":{"2":50000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":58865,"2":30,"3":{"2":60000}},{"1":58760,"2":30,"3":{"2":60000}},{"1":58835,"2":30,"3":{"2":60000}},{"1":57600,"2":30,"3":{"2":60000}},{"1":58030,"2":30,"3":{"2":60000}},{"1":56985,"2":30,"3":{"2":60000}},{"1":57835,"2":30,"3":{"2":60000}},{"1":57770,"2":30,"3":{"2":60000}},{"1":69280,"2":30,"3":{"2":60000}},{"1":59965,"2":30,"3":{"2":60000}},{"1":64205,"2":30,"3":{"2":60000}},{"1":62925,"2":30,"3":{"2":60000}},{"1":62020,"2":30,"3":{"2":60000}},{"1":62695,"2":30,"3":{"2":60000}},{"1":63500,"2":30,"3":{"2":60000}},{"1":61960,"2":30,"3":{"2":60000}},{"1":61340,"2":30,"3":{"2":60000}},{"1":62405,"2":30,"3":{"2":60000}},{"1":64630,"2":30,"3":{"2":60000}},{"1":61365,"2":30,"3":{"2":60000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":56900,"2":80,"3":{"4":8000}},{"1":56815,"2":80,"3":{"4":8000}},{"1":57210,"2":80,"3":{"4":8000}},{"1":54820,"2":80,"3":{"4":8000}},{"1":55475,"2":80,"3":{"4":8000}},{"1":56250,"2":80,"3":{"4":8000}},{"1":55700,"2":80,"3":{"4":8000}},{"1":55690,"2":80,"3":{"4":8000}},{"1":51595,"2":70,"3":{"4":7000}},{"1":52030,"2":70,"3":{"4":7000}},{"1":54560,"2":70,"3":{"4":7000}},{"1":55225,"2":70,"3":{"4":7000}},{"1":53625,"2":70,"3":{"4":7000}},{"1":53335,"2":70,"3":{"4":7000}},{"1":53350,"2":70,"3":{"4":7000}},{"1":53185,"2":70,"3":{"4":7000}},{"1":53220,"2":70,"3":{"4":7000}},{"1":54105,"2":70,"3":{"4":7000}},{"1":53140,"2":70,"3":{"4":7000}},{"1":52145,"2":70,"3":{"4":7000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":53610,"2":60,"3":{"4":12000}},{"1":54040,"2":60,"3":{"4":12000}},{"1":58610,"2":50,"3":{"4":10000}},{"1":53540,"2":60,"3":{"4":12000}},{"1":53790,"2":60,"3":{"4":12000}},{"1":58400,"2":50,"3":{"4":10000}},{"1":53985,"2":60,"3":{"4":12000}},{"1":54120,"2":60,"3":{"4":12000}},{"1":57705,"2":60,"3":{"4":12000}},{"1":55695,"2":60,"3":{"4":12000}},{"1":58565,"2":60,"3":{"4":12000}},{"1":58725,"2":60,"3":{"4":12000}},{"1":57850,"2":60,"3":{"4":12000}},{"1":57935,"2":60,"3":{"4":12000}},{"1":57980,"2":60,"3":{"4":12000}},{"1":57850,"2":60,"3":{"4":12000}},{"1":58925,"2":60,"3":{"4":12000}},{"1":58945,"2":60,"3":{"4":12000}},{"1":58910,"2":60,"3":{"4":12000}},{"1":57365,"2":60,"3":{"4":12000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":55625,"2":30,"3":{"4":30000}},{"1":55045,"2":30,"3":{"4":30000}},{"1":56220,"2":30,"3":{"4":30000}},{"1":53195,"2":30,"3":{"4":30000}},{"1":53575,"2":30,"3":{"4":30000}},{"1":54830,"2":30,"3":{"4":30000}},{"1":54150,"2":30,"3":{"4":30000}},{"1":54795,"2":30,"3":{"4":30000}},{"1":55275,"2":30,"3":{"4":30000}},{"1":56200,"2":30,"3":{"4":30000}},{"1":57275,"2":30,"3":{"4":30000}},{"1":55940,"2":30,"3":{"4":30000}},{"1":56995,"2":30,"3":{"4":30000}},{"1":55605,"2":30,"3":{"4":30000}},{"1":57820,"2":30,"3":{"4":30000}},{"1":57560,"2":30,"3":{"4":30000}},{"1":60500,"2":30,"3":{"4":30000}},{"1":58620,"2":30,"3":{"4":30000}},{"1":58540,"2":30,"3":{"4":30000}},{"1":57820,"2":30,"3":{"4":30000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":74235,"2":20,"3":{"4":40000}},{"1":73105,"2":20,"3":{"4":40000}},{"1":74050,"2":20,"3":{"4":40000}},{"1":70900,"2":20,"3":{"4":40000}},{"1":71610,"2":20,"3":{"4":40000}},{"1":73215,"2":20,"3":{"4":40000}},{"1":72165,"2":20,"3":{"4":40000}},{"1":75160,"2":20,"3":{"4":40000}},{"1":73505,"2":20,"3":{"4":40000}},{"1":74460,"2":20,"3":{"4":40000}},{"1":75630,"2":20,"3":{"4":40000}},{"1":74245,"2":20,"3":{"4":40000}},{"1":76095,"2":20,"3":{"4":40000}},{"1":73965,"2":20,"3":{"4":40000}},{"1":78465,"2":20,"3":{"4":40000}},{"1":76200,"2":20,"3":{"4":40000}},{"1":78820,"2":20,"3":{"4":40000}},{"1":76870,"2":20,"3":{"4":40000}},{"1":76795,"2":20,"3":{"4":40000}},{"1":77000,"2":20,"3":{"4":40000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":66525,"2":30,"3":{"4":30000}},{"1":63620,"2":30,"3":{"4":30000}},{"1":57840,"2":20,"3":{"4":20000}},{"1":63680,"2":30,"3":{"4":30000}},{"1":63945,"2":30,"3":{"4":30000}},{"1":66060,"2":20,"3":{"4":20000}},{"1":64680,"2":30,"3":{"4":30000}},{"1":76780,"2":30,"3":{"4":30000}},{"1":54280,"2":20,"3":{"4":20000}},{"1":65840,"2":30,"3":{"4":30000}},{"1":67705,"2":30,"3":{"4":30000}},{"1":61760,"2":30,"3":{"4":30000}},{"1":65005,"2":30,"3":{"4":30000}},{"1":64270,"2":30,"3":{"4":30000}},{"1":67130,"2":30,"3":{"4":30000}},{"1":65665,"2":30,"3":{"4":30000}},{"1":66905,"2":30,"3":{"4":30000}},{"1":84645,"2":30,"3":{"4":30000}},{"1":66705,"2":30,"3":{"4":30000}},{"1":66405,"2":30,"3":{"4":30000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":52550,"2":50,"3":{"4":5000}},{"1":51745,"2":60,"3":{"4":6000}},{"1":50570,"2":60,"3":{"4":6000}},{"1":51960,"2":60,"3":{"4":6000}},{"1":53910,"2":60,"3":{"4":6000}},{"1":51135,"2":60,"3":{"4":6000}},{"1":51690,"2":60,"3":{"4":6000}},{"1":51820,"2":60,"3":{"4":6000}},{"1":51900,"2":60,"3":{"4":6000}},{"1":55540,"2":60,"3":{"4":6000}},{"1":55800,"2":60,"3":{"4":6000}},{"1":53550,"2":60,"3":{"4":6000}},{"1":53255,"2":60,"3":{"4":6000}},{"1":54100,"2":60,"3":{"4":6000}},{"1":54050,"2":60,"3":{"4":6000}},{"1":53995,"2":60,"3":{"4":6000}},{"1":54555,"2":60,"3":{"4":6000}},{"1":61340,"2":40,"3":{"4":4000}},{"1":55070,"2":60,"3":{"4":6000}},{"1":53830,"2":60,"3":{"4":6000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":52040,"2":60,"3":{"4":12000}},{"1":52850,"2":60,"3":{"4":12000}},{"1":51710,"2":60,"3":{"4":12000}},{"1":52685,"2":60,"3":{"4":12000}},{"1":54640,"2":60,"3":{"4":12000}},{"1":52145,"2":60,"3":{"4":12000}},{"1":51755,"2":60,"3":{"4":12000}},{"1":55615,"2":60,"3":{"4":12000}},{"1":53045,"2":60,"3":{"4":12000}},{"1":58665,"2":50,"3":{"4":10000}},{"1":56060,"2":60,"3":{"4":12000}},{"1":57995,"2":60,"3":{"4":12000}},{"1":53940,"2":60,"3":{"4":12000}},{"1":54825,"2":60,"3":{"4":12000}},{"1":54565,"2":60,"3":{"4":12000}},{"1":55085,"2":60,"3":{"4":12000}},{"1":59305,"2":60,"3":{"4":12000}},{"1":55360,"2":50,"3":{"4":10000}},{"1":55740,"2":60,"3":{"4":12000}},{"1":54680,"2":60,"3":{"4":12000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":60050,"2":60,"3":{"4":60000}},{"1":59735,"2":60,"3":{"4":60000}},{"1":58925,"2":60,"3":{"4":60000}},{"1":60155,"2":60,"3":{"4":60000}},{"1":50635,"2":50,"3":{"4":50000}},{"1":59665,"2":60,"3":{"4":60000}},{"1":59300,"2":60,"3":{"4":60000}},{"1":50500,"2":50,"3":{"4":50000}},{"1":50015,"2":50,"3":{"4":50000}},{"1":52325,"2":50,"3":{"4":50000}},{"1":52700,"2":50,"3":{"4":50000}},{"1":52195,"2":50,"3":{"4":50000}},{"1":51220,"2":50,"3":{"4":50000}},{"1":51485,"2":50,"3":{"4":50000}},{"1":51510,"2":50,"3":{"4":50000}},{"1":51990,"2":50,"3":{"4":50000}},{"1":52495,"2":50,"3":{"4":50000}},{"1":53345,"2":50,"3":{"4":50000}},{"1":53025,"2":50,"3":{"4":50000}},{"1":52305,"2":50,"3":{"4":50000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":58805,"2":30,"3":{"4":60000}},{"1":59890,"2":30,"3":{"4":60000}},{"1":58165,"2":30,"3":{"4":60000}},{"1":59820,"2":30,"3":{"4":60000}},{"1":60565,"2":30,"3":{"4":60000}},{"1":59080,"2":30,"3":{"4":60000}},{"1":58620,"2":30,"3":{"4":60000}},{"1":60180,"2":30,"3":{"4":60000}},{"1":59610,"2":30,"3":{"4":60000}},{"1":62745,"2":30,"3":{"4":60000}},{"1":63110,"2":30,"3":{"4":60000}},{"1":61550,"2":30,"3":{"4":60000}},{"1":60815,"2":30,"3":{"4":60000}},{"1":62400,"2":30,"3":{"4":60000}},{"1":62235,"2":30,"3":{"4":60000}},{"1":61730,"2":30,"3":{"4":60000}},{"1":62465,"2":30,"3":{"4":60000}},{"1":63055,"2":30,"3":{"4":60000}},{"1":63040,"2":30,"3":{"4":60000}},{"1":61650,"2":30,"3":{"4":60000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":54420,"2":40,"3":{"4":40000}},{"1":51765,"2":40,"3":{"4":40000}},{"1":54135,"2":40,"3":{"4":40000}},{"1":52565,"2":40,"3":{"4":40000}},{"1":50200,"2":40,"3":{"4":40000}},{"1":54790,"2":40,"3":{"4":40000}},{"1":52130,"2":40,"3":{"4":40000}},{"1":61270,"2":50,"3":{"4":50000}},{"1":53135,"2":40,"3":{"4":40000}},{"1":52085,"2":30,"3":{"4":30000}},{"1":61885,"2":40,"3":{"4":40000}},{"1":53785,"2":40,"3":{"4":40000}},{"1":63620,"2":40,"3":{"4":40000}},{"1":50255,"2":30,"3":{"4":30000}},{"1":52085,"2":30,"3":{"4":30000}},{"1":66400,"2":40,"3":{"4":40000}},{"1":61110,"2":40,"3":{"4":40000}},{"1":62930,"2":40,"3":{"4":40000}},{"1":62415,"2":40,"3":{"4":40000}},{"1":62855,"2":40,"3":{"4":40000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/0.4.2/json_vm.pb.json b/benchmark/data/skybrian5/0.4.2/json_vm.pb.json
deleted file mode 100644
index 5b594c3..0000000
--- a/benchmark/data/skybrian5/0.4.2/json_vm.pb.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "readjson_vm.dart",
- "10": {
- "1": "skybrian5",
- "2": 1,
- "3": "1.12.0 (Mon Aug 31 03:24:52 2015) on \"linux_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+3"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.1"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+7"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":50482,"2":350,"3":{"1":35000}},{"1":51340,"2":380,"3":{"1":38000}},{"1":50996,"2":390,"3":{"1":39000}},{"1":50182,"2":400,"3":{"1":40000}},{"1":50336,"2":400,"3":{"1":40000}},{"1":50175,"2":400,"3":{"1":40000}},{"1":50139,"2":400,"3":{"1":40000}},{"1":50107,"2":400,"3":{"1":40000}},{"1":50162,"2":400,"3":{"1":40000}},{"1":50208,"2":400,"3":{"1":40000}},{"1":50950,"2":370,"3":{"1":37000}},{"1":50250,"2":390,"3":{"1":39000}},{"1":50120,"2":390,"3":{"1":39000}},{"1":50091,"2":390,"3":{"1":39000}},{"1":50103,"2":390,"3":{"1":39000}},{"1":50128,"2":390,"3":{"1":39000}},{"1":50213,"2":390,"3":{"1":39000}},{"1":50011,"2":390,"3":{"1":39000}},{"1":50238,"2":390,"3":{"1":39000}},{"1":50203,"2":390,"3":{"1":39000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":50731,"2":340,"3":{"1":68000}},{"1":50593,"2":340,"3":{"1":68000}},{"1":51101,"2":340,"3":{"1":68000}},{"1":50430,"2":340,"3":{"1":68000}},{"1":50456,"2":340,"3":{"1":68000}},{"1":50460,"2":340,"3":{"1":68000}},{"1":50472,"2":340,"3":{"1":68000}},{"1":50441,"2":340,"3":{"1":68000}},{"1":50437,"2":340,"3":{"1":68000}},{"1":50471,"2":340,"3":{"1":68000}},{"1":51344,"2":340,"3":{"1":68000}},{"1":51382,"2":340,"3":{"1":68000}},{"1":51332,"2":340,"3":{"1":68000}},{"1":51335,"2":340,"3":{"1":68000}},{"1":51347,"2":340,"3":{"1":68000}},{"1":51468,"2":340,"3":{"1":68000}},{"1":51531,"2":340,"3":{"1":68000}},{"1":51421,"2":340,"3":{"1":68000}},{"1":51462,"2":340,"3":{"1":68000}},{"1":51397,"2":340,"3":{"1":68000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":50799,"2":130,"3":{"1":130000}},{"1":50836,"2":130,"3":{"1":130000}},{"1":50943,"2":130,"3":{"1":130000}},{"1":51148,"2":130,"3":{"1":130000}},{"1":50842,"2":130,"3":{"1":130000}},{"1":50888,"2":130,"3":{"1":130000}},{"1":50811,"2":130,"3":{"1":130000}},{"1":50848,"2":130,"3":{"1":130000}},{"1":50929,"2":130,"3":{"1":130000}},{"1":51131,"2":130,"3":{"1":130000}},{"1":51485,"2":130,"3":{"1":130000}},{"1":51532,"2":130,"3":{"1":130000}},{"1":51540,"2":130,"3":{"1":130000}},{"1":51556,"2":130,"3":{"1":130000}},{"1":51502,"2":130,"3":{"1":130000}},{"1":51521,"2":130,"3":{"1":130000}},{"1":51452,"2":130,"3":{"1":130000}},{"1":51453,"2":130,"3":{"1":130000}},{"1":51463,"2":130,"3":{"1":130000}},{"1":51502,"2":130,"3":{"1":130000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":54726,"2":70,"3":{"1":140000}},{"1":54706,"2":70,"3":{"1":140000}},{"1":54883,"2":70,"3":{"1":140000}},{"1":54741,"2":70,"3":{"1":140000}},{"1":54861,"2":70,"3":{"1":140000}},{"1":54843,"2":70,"3":{"1":140000}},{"1":54703,"2":70,"3":{"1":140000}},{"1":54757,"2":70,"3":{"1":140000}},{"1":54707,"2":70,"3":{"1":140000}},{"1":54899,"2":70,"3":{"1":140000}},{"1":55429,"2":70,"3":{"1":140000}},{"1":55402,"2":70,"3":{"1":140000}},{"1":55414,"2":70,"3":{"1":140000}},{"1":55542,"2":70,"3":{"1":140000}},{"1":55444,"2":70,"3":{"1":140000}},{"1":55546,"2":70,"3":{"1":140000}},{"1":55393,"2":70,"3":{"1":140000}},{"1":55648,"2":70,"3":{"1":140000}},{"1":55421,"2":70,"3":{"1":140000}},{"1":55412,"2":70,"3":{"1":140000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":51135,"2":320,"3":{"1":32000}},{"1":50235,"2":350,"3":{"1":35000}},{"1":50278,"2":350,"3":{"1":35000}},{"1":50240,"2":350,"3":{"1":35000}},{"1":50243,"2":350,"3":{"1":35000}},{"1":50239,"2":350,"3":{"1":35000}},{"1":50255,"2":350,"3":{"1":35000}},{"1":50147,"2":350,"3":{"1":35000}},{"1":50262,"2":350,"3":{"1":35000}},{"1":50223,"2":350,"3":{"1":35000}},{"1":50994,"2":320,"3":{"1":32000}},{"1":50169,"2":350,"3":{"1":35000}},{"1":50198,"2":350,"3":{"1":35000}},{"1":50154,"2":350,"3":{"1":35000}},{"1":50160,"2":350,"3":{"1":35000}},{"1":50149,"2":350,"3":{"1":35000}},{"1":50047,"2":350,"3":{"1":35000}},{"1":50198,"2":350,"3":{"1":35000}},{"1":50145,"2":350,"3":{"1":35000}},{"1":50183,"2":350,"3":{"1":35000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50639,"2":340,"3":{"1":68000}},{"1":50610,"2":340,"3":{"1":68000}},{"1":50623,"2":340,"3":{"1":68000}},{"1":50770,"2":340,"3":{"1":68000}},{"1":50235,"2":340,"3":{"1":68000}},{"1":50193,"2":340,"3":{"1":68000}},{"1":50225,"2":340,"3":{"1":68000}},{"1":50112,"2":340,"3":{"1":68000}},{"1":50214,"2":340,"3":{"1":68000}},{"1":50213,"2":340,"3":{"1":68000}},{"1":50484,"2":340,"3":{"1":68000}},{"1":50510,"2":340,"3":{"1":68000}},{"1":50499,"2":340,"3":{"1":68000}},{"1":50504,"2":340,"3":{"1":68000}},{"1":50548,"2":340,"3":{"1":68000}},{"1":50546,"2":340,"3":{"1":68000}},{"1":50524,"2":340,"3":{"1":68000}},{"1":50501,"2":340,"3":{"1":68000}},{"1":50508,"2":340,"3":{"1":68000}},{"1":50514,"2":340,"3":{"1":68000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50406,"2":250,"3":{"1":250000}},{"1":50366,"2":250,"3":{"1":250000}},{"1":50314,"2":250,"3":{"1":250000}},{"1":50381,"2":250,"3":{"1":250000}},{"1":50381,"2":250,"3":{"1":250000}},{"1":50337,"2":250,"3":{"1":250000}},{"1":50364,"2":250,"3":{"1":250000}},{"1":50266,"2":250,"3":{"1":250000}},{"1":51648,"2":250,"3":{"1":250000}},{"1":50354,"2":250,"3":{"1":250000}},{"1":50095,"2":250,"3":{"1":250000}},{"1":50075,"2":250,"3":{"1":250000}},{"1":50685,"2":250,"3":{"1":250000}},{"1":50574,"2":250,"3":{"1":250000}},{"1":50160,"2":250,"3":{"1":250000}},{"1":50096,"2":250,"3":{"1":250000}},{"1":50084,"2":250,"3":{"1":250000}},{"1":50155,"2":250,"3":{"1":250000}},{"1":50535,"2":250,"3":{"1":250000}},{"1":50554,"2":250,"3":{"1":250000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":52429,"2":130,"3":{"1":260000}},{"1":52567,"2":130,"3":{"1":260000}},{"1":52393,"2":130,"3":{"1":260000}},{"1":52394,"2":130,"3":{"1":260000}},{"1":52427,"2":130,"3":{"1":260000}},{"1":52385,"2":130,"3":{"1":260000}},{"1":52390,"2":130,"3":{"1":260000}},{"1":52402,"2":130,"3":{"1":260000}},{"1":52396,"2":130,"3":{"1":260000}},{"1":52634,"2":130,"3":{"1":260000}},{"1":52459,"2":130,"3":{"1":260000}},{"1":52457,"2":130,"3":{"1":260000}},{"1":52461,"2":130,"3":{"1":260000}},{"1":52325,"2":130,"3":{"1":260000}},{"1":52136,"2":130,"3":{"1":260000}},{"1":52036,"2":130,"3":{"1":260000}},{"1":52062,"2":130,"3":{"1":260000}},{"1":51809,"2":130,"3":{"1":260000}},{"1":52483,"2":130,"3":{"1":260000}},{"1":51996,"2":130,"3":{"1":260000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50808,"2":350,"3":{"2":35000}},{"1":50244,"2":380,"3":{"2":38000}},{"1":50261,"2":380,"3":{"2":38000}},{"1":50490,"2":390,"3":{"2":39000}},{"1":50488,"2":390,"3":{"2":39000}},{"1":50444,"2":390,"3":{"2":39000}},{"1":50482,"2":390,"3":{"2":39000}},{"1":50468,"2":390,"3":{"2":39000}},{"1":50465,"2":390,"3":{"2":39000}},{"1":50521,"2":390,"3":{"2":39000}},{"1":50543,"2":350,"3":{"2":35000}},{"1":50580,"2":380,"3":{"2":38000}},{"1":50546,"2":380,"3":{"2":38000}},{"1":50577,"2":380,"3":{"2":38000}},{"1":50566,"2":380,"3":{"2":38000}},{"1":50551,"2":380,"3":{"2":38000}},{"1":50411,"2":380,"3":{"2":38000}},{"1":50555,"2":380,"3":{"2":38000}},{"1":50507,"2":380,"3":{"2":38000}},{"1":50536,"2":380,"3":{"2":38000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":51125,"2":330,"3":{"2":66000}},{"1":50992,"2":330,"3":{"2":66000}},{"1":51303,"2":330,"3":{"2":66000}},{"1":50939,"2":330,"3":{"2":66000}},{"1":51211,"2":330,"3":{"2":66000}},{"1":51047,"2":330,"3":{"2":66000}},{"1":51045,"2":330,"3":{"2":66000}},{"1":51026,"2":330,"3":{"2":66000}},{"1":51083,"2":330,"3":{"2":66000}},{"1":51067,"2":330,"3":{"2":66000}},{"1":50089,"2":320,"3":{"2":64000}},{"1":50083,"2":320,"3":{"2":64000}},{"1":50069,"2":320,"3":{"2":64000}},{"1":50077,"2":320,"3":{"2":64000}},{"1":51543,"2":330,"3":{"2":66000}},{"1":51527,"2":330,"3":{"2":66000}},{"1":51509,"2":330,"3":{"2":66000}},{"1":51511,"2":330,"3":{"2":66000}},{"1":50284,"2":320,"3":{"2":64000}},{"1":50063,"2":320,"3":{"2":64000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":51255,"2":120,"3":{"2":120000}},{"1":51190,"2":120,"3":{"2":120000}},{"1":51198,"2":120,"3":{"2":120000}},{"1":51447,"2":120,"3":{"2":120000}},{"1":51272,"2":120,"3":{"2":120000}},{"1":51258,"2":120,"3":{"2":120000}},{"1":51168,"2":120,"3":{"2":120000}},{"1":51210,"2":120,"3":{"2":120000}},{"1":51216,"2":120,"3":{"2":120000}},{"1":51285,"2":120,"3":{"2":120000}},{"1":53487,"2":130,"3":{"2":130000}},{"1":53418,"2":130,"3":{"2":130000}},{"1":53527,"2":130,"3":{"2":130000}},{"1":53408,"2":130,"3":{"2":130000}},{"1":53437,"2":130,"3":{"2":130000}},{"1":53639,"2":130,"3":{"2":130000}},{"1":53460,"2":130,"3":{"2":130000}},{"1":53498,"2":130,"3":{"2":130000}},{"1":53581,"2":130,"3":{"2":130000}},{"1":53562,"2":130,"3":{"2":130000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":51400,"2":60,"3":{"2":120000}},{"1":51254,"2":60,"3":{"2":120000}},{"1":51226,"2":60,"3":{"2":120000}},{"1":51297,"2":60,"3":{"2":120000}},{"1":51213,"2":60,"3":{"2":120000}},{"1":51260,"2":60,"3":{"2":120000}},{"1":51211,"2":60,"3":{"2":120000}},{"1":51434,"2":60,"3":{"2":120000}},{"1":51308,"2":60,"3":{"2":120000}},{"1":51215,"2":60,"3":{"2":120000}},{"1":57697,"2":70,"3":{"2":140000}},{"1":57973,"2":70,"3":{"2":140000}},{"1":57926,"2":70,"3":{"2":140000}},{"1":57706,"2":70,"3":{"2":140000}},{"1":57631,"2":70,"3":{"2":140000}},{"1":57618,"2":70,"3":{"2":140000}},{"1":57829,"2":70,"3":{"2":140000}},{"1":57587,"2":70,"3":{"2":140000}},{"1":57807,"2":70,"3":{"2":140000}},{"1":57612,"2":70,"3":{"2":140000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":54972,"2":340,"3":{"2":34000}},{"1":50370,"2":350,"3":{"2":35000}},{"1":50419,"2":350,"3":{"2":35000}},{"1":50358,"2":350,"3":{"2":35000}},{"1":50440,"2":350,"3":{"2":35000}},{"1":50412,"2":350,"3":{"2":35000}},{"1":50419,"2":350,"3":{"2":35000}},{"1":50400,"2":350,"3":{"2":35000}},{"1":50388,"2":350,"3":{"2":35000}},{"1":50417,"2":350,"3":{"2":35000}},{"1":50349,"2":310,"3":{"2":31000}},{"1":50688,"2":350,"3":{"2":35000}},{"1":50710,"2":350,"3":{"2":35000}},{"1":50705,"2":350,"3":{"2":35000}},{"1":50715,"2":350,"3":{"2":35000}},{"1":50682,"2":350,"3":{"2":35000}},{"1":50684,"2":350,"3":{"2":35000}},{"1":50685,"2":350,"3":{"2":35000}},{"1":50700,"2":350,"3":{"2":35000}},{"1":50688,"2":350,"3":{"2":35000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":51170,"2":340,"3":{"2":68000}},{"1":51215,"2":340,"3":{"2":68000}},{"1":51207,"2":340,"3":{"2":68000}},{"1":51389,"2":340,"3":{"2":68000}},{"1":50948,"2":340,"3":{"2":68000}},{"1":50980,"2":340,"3":{"2":68000}},{"1":50945,"2":340,"3":{"2":68000}},{"1":50925,"2":340,"3":{"2":68000}},{"1":50932,"2":340,"3":{"2":68000}},{"1":50966,"2":340,"3":{"2":68000}},{"1":51507,"2":340,"3":{"2":68000}},{"1":51457,"2":340,"3":{"2":68000}},{"1":51363,"2":340,"3":{"2":68000}},{"1":51506,"2":340,"3":{"2":68000}},{"1":51437,"2":340,"3":{"2":68000}},{"1":51436,"2":340,"3":{"2":68000}},{"1":51448,"2":340,"3":{"2":68000}},{"1":51459,"2":340,"3":{"2":68000}},{"1":51446,"2":340,"3":{"2":68000}},{"1":50066,"2":330,"3":{"2":66000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":50364,"2":240,"3":{"2":240000}},{"1":50362,"2":240,"3":{"2":240000}},{"1":50344,"2":240,"3":{"2":240000}},{"1":50374,"2":240,"3":{"2":240000}},{"1":50373,"2":240,"3":{"2":240000}},{"1":50348,"2":240,"3":{"2":240000}},{"1":50378,"2":240,"3":{"2":240000}},{"1":50689,"2":240,"3":{"2":240000}},{"1":50375,"2":240,"3":{"2":240000}},{"1":50389,"2":240,"3":{"2":240000}},{"1":50844,"2":240,"3":{"2":240000}},{"1":50835,"2":240,"3":{"2":240000}},{"1":50864,"2":240,"3":{"2":240000}},{"1":51017,"2":240,"3":{"2":240000}},{"1":50857,"2":240,"3":{"2":240000}},{"1":50846,"2":240,"3":{"2":240000}},{"1":50828,"2":240,"3":{"2":240000}},{"1":50839,"2":240,"3":{"2":240000}},{"1":50811,"2":240,"3":{"2":240000}},{"1":50867,"2":240,"3":{"2":240000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":50245,"2":120,"3":{"2":240000}},{"1":50262,"2":120,"3":{"2":240000}},{"1":50248,"2":120,"3":{"2":240000}},{"1":50246,"2":120,"3":{"2":240000}},{"1":50291,"2":120,"3":{"2":240000}},{"1":50209,"2":120,"3":{"2":240000}},{"1":50252,"2":120,"3":{"2":240000}},{"1":50222,"2":120,"3":{"2":240000}},{"1":50240,"2":120,"3":{"2":240000}},{"1":50199,"2":120,"3":{"2":240000}},{"1":50784,"2":120,"3":{"2":240000}},{"1":50686,"2":120,"3":{"2":240000}},{"1":50669,"2":120,"3":{"2":240000}},{"1":50743,"2":120,"3":{"2":240000}},{"1":50725,"2":120,"3":{"2":240000}},{"1":50664,"2":120,"3":{"2":240000}},{"1":50677,"2":120,"3":{"2":240000}},{"1":50673,"2":120,"3":{"2":240000}},{"1":50671,"2":120,"3":{"2":240000}},{"1":50663,"2":120,"3":{"2":240000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50749,"2":370,"3":{"4":37000}},{"1":50012,"2":370,"3":{"4":37000}},{"1":51276,"2":380,"3":{"4":38000}},{"1":51317,"2":380,"3":{"4":38000}},{"1":51292,"2":380,"3":{"4":38000}},{"1":51262,"2":380,"3":{"4":38000}},{"1":51284,"2":380,"3":{"4":38000}},{"1":51292,"2":380,"3":{"4":38000}},{"1":51274,"2":380,"3":{"4":38000}},{"1":51289,"2":380,"3":{"4":38000}},{"1":51910,"2":360,"3":{"4":36000}},{"1":51069,"2":380,"3":{"4":38000}},{"1":51063,"2":380,"3":{"4":38000}},{"1":51058,"2":380,"3":{"4":38000}},{"1":51130,"2":380,"3":{"4":38000}},{"1":51100,"2":380,"3":{"4":38000}},{"1":51102,"2":380,"3":{"4":38000}},{"1":51062,"2":380,"3":{"4":38000}},{"1":51037,"2":380,"3":{"4":38000}},{"1":51107,"2":380,"3":{"4":38000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50029,"2":310,"3":{"4":62000}},{"1":50012,"2":310,"3":{"4":62000}},{"1":50368,"2":310,"3":{"4":62000}},{"1":51543,"2":320,"3":{"4":64000}},{"1":51452,"2":320,"3":{"4":64000}},{"1":50325,"2":310,"3":{"4":62000}},{"1":50005,"2":310,"3":{"4":62000}},{"1":50088,"2":310,"3":{"4":62000}},{"1":51585,"2":320,"3":{"4":64000}},{"1":51618,"2":320,"3":{"4":64000}},{"1":51432,"2":320,"3":{"4":64000}},{"1":51321,"2":320,"3":{"4":64000}},{"1":51348,"2":320,"3":{"4":64000}},{"1":51314,"2":320,"3":{"4":64000}},{"1":51373,"2":320,"3":{"4":64000}},{"1":51332,"2":320,"3":{"4":64000}},{"1":51243,"2":320,"3":{"4":64000}},{"1":51264,"2":320,"3":{"4":64000}},{"1":51264,"2":320,"3":{"4":64000}},{"1":51266,"2":320,"3":{"4":64000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52517,"2":120,"3":{"4":120000}},{"1":52502,"2":120,"3":{"4":120000}},{"1":52897,"2":120,"3":{"4":120000}},{"1":52749,"2":120,"3":{"4":120000}},{"1":52599,"2":120,"3":{"4":120000}},{"1":52650,"2":120,"3":{"4":120000}},{"1":52505,"2":120,"3":{"4":120000}},{"1":52584,"2":120,"3":{"4":120000}},{"1":52499,"2":120,"3":{"4":120000}},{"1":52517,"2":120,"3":{"4":120000}},{"1":53207,"2":120,"3":{"4":120000}},{"1":52420,"2":120,"3":{"4":120000}},{"1":52382,"2":120,"3":{"4":120000}},{"1":52317,"2":120,"3":{"4":120000}},{"1":52513,"2":120,"3":{"4":120000}},{"1":53189,"2":120,"3":{"4":120000}},{"1":52264,"2":120,"3":{"4":120000}},{"1":52396,"2":120,"3":{"4":120000}},{"1":52329,"2":120,"3":{"4":120000}},{"1":52309,"2":120,"3":{"4":120000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52333,"2":60,"3":{"4":120000}},{"1":52470,"2":60,"3":{"4":120000}},{"1":52414,"2":60,"3":{"4":120000}},{"1":52343,"2":60,"3":{"4":120000}},{"1":52431,"2":60,"3":{"4":120000}},{"1":52315,"2":60,"3":{"4":120000}},{"1":52328,"2":60,"3":{"4":120000}},{"1":52335,"2":60,"3":{"4":120000}},{"1":52309,"2":60,"3":{"4":120000}},{"1":52366,"2":60,"3":{"4":120000}},{"1":52132,"2":60,"3":{"4":120000}},{"1":52201,"2":60,"3":{"4":120000}},{"1":58009,"2":60,"3":{"4":120000}},{"1":52442,"2":60,"3":{"4":120000}},{"1":52527,"2":60,"3":{"4":120000}},{"1":52541,"2":60,"3":{"4":120000}},{"1":52340,"2":60,"3":{"4":120000}},{"1":52364,"2":60,"3":{"4":120000}},{"1":52431,"2":60,"3":{"4":120000}},{"1":52233,"2":60,"3":{"4":120000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":50916,"2":70,"3":{"4":70000}},{"1":50433,"2":70,"3":{"4":70000}},{"1":50472,"2":70,"3":{"4":70000}},{"1":50900,"2":70,"3":{"4":70000}},{"1":50398,"2":70,"3":{"4":70000}},{"1":50359,"2":70,"3":{"4":70000}},{"1":50883,"2":70,"3":{"4":70000}},{"1":50360,"2":70,"3":{"4":70000}},{"1":50396,"2":70,"3":{"4":70000}},{"1":50834,"2":70,"3":{"4":70000}},{"1":50311,"2":70,"3":{"4":70000}},{"1":50330,"2":70,"3":{"4":70000}},{"1":50259,"2":70,"3":{"4":70000}},{"1":51171,"2":70,"3":{"4":70000}},{"1":50244,"2":70,"3":{"4":70000}},{"1":50354,"2":70,"3":{"4":70000}},{"1":50114,"2":70,"3":{"4":70000}},{"1":50825,"2":70,"3":{"4":70000}},{"1":50206,"2":70,"3":{"4":70000}},{"1":50232,"2":70,"3":{"4":70000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50911,"2":340,"3":{"4":34000}},{"1":51183,"2":340,"3":{"4":34000}},{"1":50550,"2":340,"3":{"4":34000}},{"1":50367,"2":340,"3":{"4":34000}},{"1":50260,"2":340,"3":{"4":34000}},{"1":50650,"2":340,"3":{"4":34000}},{"1":50399,"2":340,"3":{"4":34000}},{"1":50388,"2":340,"3":{"4":34000}},{"1":50350,"2":340,"3":{"4":34000}},{"1":50439,"2":340,"3":{"4":34000}},{"1":50275,"2":340,"3":{"4":34000}},{"1":50158,"2":340,"3":{"4":34000}},{"1":50398,"2":340,"3":{"4":34000}},{"1":50274,"2":340,"3":{"4":34000}},{"1":50270,"2":340,"3":{"4":34000}},{"1":50305,"2":340,"3":{"4":34000}},{"1":50325,"2":340,"3":{"4":34000}},{"1":50268,"2":340,"3":{"4":34000}},{"1":50263,"2":340,"3":{"4":34000}},{"1":50246,"2":340,"3":{"4":34000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50464,"2":320,"3":{"4":64000}},{"1":50475,"2":320,"3":{"4":64000}},{"1":50455,"2":320,"3":{"4":64000}},{"1":50477,"2":320,"3":{"4":64000}},{"1":50466,"2":320,"3":{"4":64000}},{"1":50446,"2":320,"3":{"4":64000}},{"1":50440,"2":320,"3":{"4":64000}},{"1":50336,"2":320,"3":{"4":64000}},{"1":50501,"2":320,"3":{"4":64000}},{"1":50453,"2":320,"3":{"4":64000}},{"1":50332,"2":320,"3":{"4":64000}},{"1":50329,"2":320,"3":{"4":64000}},{"1":50317,"2":320,"3":{"4":64000}},{"1":50337,"2":320,"3":{"4":64000}},{"1":50378,"2":320,"3":{"4":64000}},{"1":50323,"2":320,"3":{"4":64000}},{"1":50247,"2":320,"3":{"4":64000}},{"1":50331,"2":320,"3":{"4":64000}},{"1":50350,"2":320,"3":{"4":64000}},{"1":50212,"2":320,"3":{"4":64000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":51579,"2":210,"3":{"4":210000}},{"1":51565,"2":210,"3":{"4":210000}},{"1":51572,"2":210,"3":{"4":210000}},{"1":51567,"2":210,"3":{"4":210000}},{"1":51451,"2":210,"3":{"4":210000}},{"1":51631,"2":210,"3":{"4":210000}},{"1":51568,"2":210,"3":{"4":210000}},{"1":51565,"2":210,"3":{"4":210000}},{"1":51592,"2":210,"3":{"4":210000}},{"1":51563,"2":210,"3":{"4":210000}},{"1":51449,"2":210,"3":{"4":210000}},{"1":51571,"2":210,"3":{"4":210000}},{"1":51524,"2":210,"3":{"4":210000}},{"1":51466,"2":210,"3":{"4":210000}},{"1":51499,"2":210,"3":{"4":210000}},{"1":51532,"2":210,"3":{"4":210000}},{"1":51455,"2":210,"3":{"4":210000}},{"1":51438,"2":210,"3":{"4":210000}},{"1":51462,"2":210,"3":{"4":210000}},{"1":51430,"2":210,"3":{"4":210000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53694,"2":110,"3":{"4":220000}},{"1":53704,"2":110,"3":{"4":220000}},{"1":53721,"2":110,"3":{"4":220000}},{"1":53690,"2":110,"3":{"4":220000}},{"1":53690,"2":110,"3":{"4":220000}},{"1":53689,"2":110,"3":{"4":220000}},{"1":53684,"2":110,"3":{"4":220000}},{"1":53673,"2":110,"3":{"4":220000}},{"1":53728,"2":110,"3":{"4":220000}},{"1":53681,"2":110,"3":{"4":220000}},{"1":53615,"2":110,"3":{"4":220000}},{"1":53600,"2":110,"3":{"4":220000}},{"1":53583,"2":110,"3":{"4":220000}},{"1":53565,"2":110,"3":{"4":220000}},{"1":53598,"2":110,"3":{"4":220000}},{"1":53560,"2":110,"3":{"4":220000}},{"1":53561,"2":110,"3":{"4":220000}},{"1":53569,"2":110,"3":{"4":220000}},{"1":53680,"2":110,"3":{"4":220000}},{"1":53574,"2":110,"3":{"4":220000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":52756,"2":100,"3":{"4":100000}},{"1":52779,"2":100,"3":{"4":100000}},{"1":52724,"2":100,"3":{"4":100000}},{"1":52609,"2":100,"3":{"4":100000}},{"1":52645,"2":100,"3":{"4":100000}},{"1":52687,"2":100,"3":{"4":100000}},{"1":52795,"2":100,"3":{"4":100000}},{"1":52639,"2":100,"3":{"4":100000}},{"1":52632,"2":100,"3":{"4":100000}},{"1":52630,"2":100,"3":{"4":100000}},{"1":52709,"2":100,"3":{"4":100000}},{"1":52664,"2":100,"3":{"4":100000}},{"1":52783,"2":100,"3":{"4":100000}},{"1":52859,"2":100,"3":{"4":100000}},{"1":52869,"2":100,"3":{"4":100000}},{"1":52645,"2":100,"3":{"4":100000}},{"1":52611,"2":100,"3":{"4":100000}},{"1":52635,"2":100,"3":{"4":100000}},{"1":52676,"2":100,"3":{"4":100000}},{"1":52686,"2":100,"3":{"4":100000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/0.4.2/props_chrome.pb.json b/benchmark/data/skybrian5/0.4.2/props_chrome.pb.json
deleted file mode 100644
index 5b30240..0000000
--- a/benchmark/data/skybrian5/0.4.2/props_chrome.pb.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/props.html",
- "10": {
- "1": "skybrian5",
- "10": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+6"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50230,"2":7100,"3":{"4":710000}},{"1":50570,"2":7300,"3":{"4":730000}},{"1":50490,"2":7300,"3":{"4":730000}},{"1":50475,"2":7300,"3":{"4":730000}},{"1":50230,"2":7300,"3":{"4":730000}},{"1":50195,"2":7300,"3":{"4":730000}},{"1":50480,"2":7300,"3":{"4":730000}},{"1":50300,"2":7300,"3":{"4":730000}},{"1":50290,"2":7300,"3":{"4":730000}},{"1":50415,"2":7300,"3":{"4":730000}},{"1":50395,"2":7300,"3":{"4":730000}},{"1":50680,"2":7300,"3":{"4":730000}},{"1":50665,"2":7300,"3":{"4":730000}},{"1":50545,"2":7300,"3":{"4":730000}},{"1":50270,"2":7300,"3":{"4":730000}},{"1":50310,"2":7300,"3":{"4":730000}},{"1":50305,"2":7300,"3":{"4":730000}},{"1":50360,"2":7300,"3":{"4":730000}},{"1":50295,"2":7300,"3":{"4":730000}},{"1":50365,"2":7300,"3":{"4":730000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50090,"2":15200,"3":{"4":1520000}},{"1":50080,"2":15400,"3":{"4":1540000}},{"1":50050,"2":15400,"3":{"4":1540000}},{"1":50240,"2":15400,"3":{"4":1540000}},{"1":50040,"2":15300,"3":{"4":1530000}},{"1":50075,"2":15400,"3":{"4":1540000}},{"1":50030,"2":15400,"3":{"4":1540000}},{"1":50250,"2":15400,"3":{"4":1540000}},{"1":50170,"2":15400,"3":{"4":1540000}},{"1":50225,"2":15300,"3":{"4":1530000}},{"1":50230,"2":15300,"3":{"4":1530000}},{"1":50065,"2":15400,"3":{"4":1540000}},{"1":50245,"2":15200,"3":{"4":1520000}},{"1":50045,"2":15300,"3":{"4":1530000}},{"1":50075,"2":15400,"3":{"4":1540000}},{"1":50085,"2":15100,"3":{"4":1510000}},{"1":50170,"2":15400,"3":{"4":1540000}},{"1":50150,"2":15400,"3":{"4":1540000}},{"1":50130,"2":15400,"3":{"4":1540000}},{"1":50040,"2":15400,"3":{"4":1540000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50800,"2":4000,"3":{"5":400000}},{"1":51145,"2":4300,"3":{"5":430000}},{"1":50870,"2":4300,"3":{"5":430000}},{"1":50645,"2":4200,"3":{"5":420000}},{"1":50110,"2":4200,"3":{"5":420000}},{"1":50975,"2":4300,"3":{"5":430000}},{"1":50965,"2":4300,"3":{"5":430000}},{"1":50345,"2":4200,"3":{"5":420000}},{"1":51050,"2":4300,"3":{"5":430000}},{"1":50990,"2":4200,"3":{"5":420000}},{"1":50700,"2":4200,"3":{"5":420000}},{"1":50935,"2":4300,"3":{"5":430000}},{"1":50490,"2":4200,"3":{"5":420000}},{"1":50115,"2":4200,"3":{"5":420000}},{"1":50980,"2":4300,"3":{"5":430000}},{"1":50660,"2":4200,"3":{"5":420000}},{"1":51105,"2":4300,"3":{"5":430000}},{"1":51045,"2":4300,"3":{"5":430000}},{"1":50985,"2":4300,"3":{"5":430000}},{"1":50790,"2":4300,"3":{"5":430000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50415,"2":4000,"3":{"5":400000}},{"1":51145,"2":4300,"3":{"5":430000}},{"1":50835,"2":4300,"3":{"5":430000}},{"1":51490,"2":4200,"3":{"5":420000}},{"1":50400,"2":4200,"3":{"5":420000}},{"1":50075,"2":4200,"3":{"5":420000}},{"1":50950,"2":4300,"3":{"5":430000}},{"1":50065,"2":4200,"3":{"5":420000}},{"1":51140,"2":4300,"3":{"5":430000}},{"1":51005,"2":4300,"3":{"5":430000}},{"1":50685,"2":4200,"3":{"5":420000}},{"1":50995,"2":4300,"3":{"5":430000}},{"1":50875,"2":4300,"3":{"5":430000}},{"1":50165,"2":4200,"3":{"5":420000}},{"1":50000,"2":4200,"3":{"5":420000}},{"1":50300,"2":4200,"3":{"5":420000}},{"1":50015,"2":4200,"3":{"5":420000}},{"1":50185,"2":4200,"3":{"5":420000}},{"1":50135,"2":4200,"3":{"5":420000}},{"1":50880,"2":4300,"3":{"5":430000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50135,"2":31800,"3":{"4":3180000}},{"1":50020,"2":33200,"3":{"4":3320000}},{"1":50085,"2":33400,"3":{"4":3340000}},{"1":50010,"2":33000,"3":{"4":3300000}},{"1":50090,"2":33200,"3":{"4":3320000}},{"1":50010,"2":33200,"3":{"4":3320000}},{"1":50085,"2":33100,"3":{"4":3310000}},{"1":50070,"2":33300,"3":{"4":3330000}},{"1":50020,"2":33200,"3":{"4":3320000}},{"1":50095,"2":33400,"3":{"4":3340000}},{"1":50100,"2":32800,"3":{"4":3280000}},{"1":50115,"2":32900,"3":{"4":3290000}},{"1":50050,"2":33400,"3":{"4":3340000}},{"1":50105,"2":33100,"3":{"4":3310000}},{"1":50110,"2":33400,"3":{"4":3340000}},{"1":50010,"2":33000,"3":{"4":3300000}},{"1":50130,"2":33300,"3":{"4":3330000}},{"1":50025,"2":33300,"3":{"4":3330000}},{"1":50120,"2":33400,"3":{"4":3340000}},{"1":50000,"2":33200,"3":{"4":3320000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50145,"2":11500,"3":{"4":1150000}},{"1":50030,"2":11900,"3":{"4":1190000}},{"1":50010,"2":11900,"3":{"4":1190000}},{"1":50205,"2":12000,"3":{"4":1200000}},{"1":50050,"2":11700,"3":{"4":1170000}},{"1":50395,"2":11900,"3":{"4":1190000}},{"1":50330,"2":12000,"3":{"4":1200000}},{"1":50270,"2":11600,"3":{"4":1160000}},{"1":50355,"2":12000,"3":{"4":1200000}},{"1":50155,"2":11900,"3":{"4":1190000}},{"1":50235,"2":11900,"3":{"4":1190000}},{"1":50420,"2":11900,"3":{"4":1190000}},{"1":50075,"2":11900,"3":{"4":1190000}},{"1":50215,"2":12000,"3":{"4":1200000}},{"1":50300,"2":12000,"3":{"4":1200000}},{"1":50365,"2":11900,"3":{"4":1190000}},{"1":50410,"2":12000,"3":{"4":1200000}},{"1":50335,"2":12000,"3":{"4":1200000}},{"1":50160,"2":12000,"3":{"4":1200000}},{"1":50020,"2":11900,"3":{"4":1190000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/0.4.2/props_vm.pb.json b/benchmark/data/skybrian5/0.4.2/props_vm.pb.json
deleted file mode 100644
index a91b6c5..0000000
--- a/benchmark/data/skybrian5/0.4.2/props_vm.pb.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "props_vm.dart",
- "10": {
- "1": "skybrian5",
- "2": 1,
- "3": "1.12.0 (Mon Aug 31 03:24:52 2015) on \"linux_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+6"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf","2":"hosted","3":"0.4.2"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50025,"2":14600,"3":{"4":1460000}},{"1":50137,"2":14800,"3":{"4":1480000}},{"1":50122,"2":14800,"3":{"4":1480000}},{"1":50246,"2":14800,"3":{"4":1480000}},{"1":50121,"2":14800,"3":{"4":1480000}},{"1":50073,"2":14800,"3":{"4":1480000}},{"1":50213,"2":14800,"3":{"4":1480000}},{"1":50073,"2":14800,"3":{"4":1480000}},{"1":50244,"2":14800,"3":{"4":1480000}},{"1":50085,"2":14800,"3":{"4":1480000}},{"1":50124,"2":14800,"3":{"4":1480000}},{"1":50214,"2":14800,"3":{"4":1480000}},{"1":50238,"2":14700,"3":{"4":1470000}},{"1":50229,"2":14800,"3":{"4":1480000}},{"1":50240,"2":14800,"3":{"4":1480000}},{"1":50123,"2":14800,"3":{"4":1480000}},{"1":50283,"2":14800,"3":{"4":1480000}},{"1":50042,"2":14700,"3":{"4":1470000}},{"1":50272,"2":14800,"3":{"4":1480000}},{"1":50240,"2":14800,"3":{"4":1480000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50056,"2":30800,"3":{"4":3080000}},{"1":50012,"2":30600,"3":{"4":3060000}},{"1":50016,"2":30700,"3":{"4":3070000}},{"1":50161,"2":30800,"3":{"4":3080000}},{"1":50099,"2":29300,"3":{"4":2930000}},{"1":50079,"2":30800,"3":{"4":3080000}},{"1":50126,"2":30900,"3":{"4":3090000}},{"1":50044,"2":30800,"3":{"4":3080000}},{"1":50146,"2":30900,"3":{"4":3090000}},{"1":50045,"2":30300,"3":{"4":3030000}},{"1":50019,"2":30400,"3":{"4":3040000}},{"1":50044,"2":30800,"3":{"4":3080000}},{"1":50132,"2":30800,"3":{"4":3080000}},{"1":50018,"2":30800,"3":{"4":3080000}},{"1":50157,"2":30800,"3":{"4":3080000}},{"1":50160,"2":30700,"3":{"4":3070000}},{"1":50017,"2":30800,"3":{"4":3080000}},{"1":50127,"2":30500,"3":{"4":3050000}},{"1":50115,"2":30600,"3":{"4":3060000}},{"1":50078,"2":30600,"3":{"4":3060000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50193,"2":10600,"3":{"5":1060000}},{"1":50230,"2":10700,"3":{"5":1070000}},{"1":50337,"2":10700,"3":{"5":1070000}},{"1":50224,"2":10700,"3":{"5":1070000}},{"1":50013,"2":10600,"3":{"5":1060000}},{"1":50025,"2":10600,"3":{"5":1060000}},{"1":50166,"2":10700,"3":{"5":1070000}},{"1":50375,"2":10700,"3":{"5":1070000}},{"1":50171,"2":10700,"3":{"5":1070000}},{"1":50316,"2":10700,"3":{"5":1070000}},{"1":50401,"2":10700,"3":{"5":1070000}},{"1":50203,"2":10700,"3":{"5":1070000}},{"1":50192,"2":10700,"3":{"5":1070000}},{"1":50278,"2":10700,"3":{"5":1070000}},{"1":50214,"2":10700,"3":{"5":1070000}},{"1":50318,"2":10700,"3":{"5":1070000}},{"1":50295,"2":10700,"3":{"5":1070000}},{"1":50293,"2":10700,"3":{"5":1070000}},{"1":50308,"2":10700,"3":{"5":1070000}},{"1":50190,"2":10700,"3":{"5":1070000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50224,"2":10700,"3":{"5":1070000}},{"1":50223,"2":10700,"3":{"5":1070000}},{"1":50312,"2":10700,"3":{"5":1070000}},{"1":50305,"2":10700,"3":{"5":1070000}},{"1":50302,"2":10700,"3":{"5":1070000}},{"1":50123,"2":10600,"3":{"5":1060000}},{"1":50203,"2":10700,"3":{"5":1070000}},{"1":50362,"2":10700,"3":{"5":1070000}},{"1":50180,"2":10700,"3":{"5":1070000}},{"1":50283,"2":10700,"3":{"5":1070000}},{"1":50020,"2":10600,"3":{"5":1060000}},{"1":50416,"2":10700,"3":{"5":1070000}},{"1":50208,"2":10700,"3":{"5":1070000}},{"1":50301,"2":10700,"3":{"5":1070000}},{"1":50183,"2":10700,"3":{"5":1070000}},{"1":50170,"2":10700,"3":{"5":1070000}},{"1":50178,"2":10700,"3":{"5":1070000}},{"1":50255,"2":10700,"3":{"5":1070000}},{"1":50229,"2":10700,"3":{"5":1070000}},{"1":50175,"2":10700,"3":{"5":1070000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50062,"2":44300,"3":{"4":4430000}},{"1":50074,"2":44700,"3":{"4":4470000}},{"1":50010,"2":44700,"3":{"4":4470000}},{"1":50055,"2":44700,"3":{"4":4470000}},{"1":50077,"2":44800,"3":{"4":4480000}},{"1":50047,"2":44800,"3":{"4":4480000}},{"1":50026,"2":44900,"3":{"4":4490000}},{"1":50060,"2":44900,"3":{"4":4490000}},{"1":50091,"2":45000,"3":{"4":4500000}},{"1":50071,"2":45000,"3":{"4":4500000}},{"1":50059,"2":45000,"3":{"4":4500000}},{"1":50281,"2":45000,"3":{"4":4500000}},{"1":50103,"2":45000,"3":{"4":4500000}},{"1":50062,"2":45000,"3":{"4":4500000}},{"1":50076,"2":44900,"3":{"4":4490000}},{"1":50097,"2":45000,"3":{"4":4500000}},{"1":50101,"2":45000,"3":{"4":4500000}},{"1":50072,"2":45000,"3":{"4":4500000}},{"1":50008,"2":44900,"3":{"4":4490000}},{"1":50044,"2":45000,"3":{"4":4500000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50164,"2":17400,"3":{"4":1740000}},{"1":50040,"2":17600,"3":{"4":1760000}},{"1":50152,"2":17600,"3":{"4":1760000}},{"1":50135,"2":17600,"3":{"4":1760000}},{"1":50108,"2":17600,"3":{"4":1760000}},{"1":50126,"2":17600,"3":{"4":1760000}},{"1":50111,"2":17600,"3":{"4":1760000}},{"1":50279,"2":17700,"3":{"4":1770000}},{"1":50281,"2":17700,"3":{"4":1770000}},{"1":50067,"2":17600,"3":{"4":1760000}},{"1":50079,"2":17800,"3":{"4":1780000}},{"1":50235,"2":17900,"3":{"4":1790000}},{"1":50179,"2":17700,"3":{"4":1770000}},{"1":50092,"2":17700,"3":{"4":1770000}},{"1":50070,"2":17700,"3":{"4":1770000}},{"1":50035,"2":17700,"3":{"4":1770000}},{"1":50028,"2":17700,"3":{"4":1770000}},{"1":50003,"2":17600,"3":{"4":1760000}},{"1":50196,"2":17700,"3":{"4":1770000}},{"1":50060,"2":17700,"3":{"4":1770000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/head/json_chrome.pb.json b/benchmark/data/skybrian5/head/json_chrome.pb.json
deleted file mode 100644
index d3ad3b1..0000000
--- a/benchmark/data/skybrian5/head/json_chrome.pb.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/readjson.html",
- "10": {
- "1": "skybrian5",
- "10": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+4"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":51080,"2":230,"3":{"1":23000}},{"1":57095,"2":90,"3":{"1":9000}},{"1":50280,"2":200,"3":{"1":20000}},{"1":51315,"2":190,"3":{"1":19000}},{"1":50245,"2":220,"3":{"1":22000}},{"1":51620,"2":230,"3":{"1":23000}},{"1":50275,"2":220,"3":{"1":22000}},{"1":50165,"2":210,"3":{"1":21000}},{"1":50260,"2":210,"3":{"1":21000}},{"1":50415,"2":210,"3":{"1":21000}},{"1":51105,"2":200,"3":{"1":20000}},{"1":50255,"2":220,"3":{"1":22000}},{"1":50450,"2":200,"3":{"1":20000}},{"1":51420,"2":190,"3":{"1":19000}},{"1":50365,"2":190,"3":{"1":19000}},{"1":51270,"2":210,"3":{"1":21000}},{"1":52890,"2":200,"3":{"1":20000}},{"1":51375,"2":200,"3":{"1":20000}},{"1":50950,"2":200,"3":{"1":20000}},{"1":50270,"2":200,"3":{"1":20000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":52070,"2":190,"3":{"1":38000}},{"1":52550,"2":130,"3":{"1":26000}},{"1":50830,"2":170,"3":{"1":34000}},{"1":51060,"2":150,"3":{"1":30000}},{"1":51270,"2":170,"3":{"1":34000}},{"1":52220,"2":120,"3":{"1":24000}},{"1":51015,"2":170,"3":{"1":34000}},{"1":51015,"2":170,"3":{"1":34000}},{"1":51470,"2":170,"3":{"1":34000}},{"1":51510,"2":170,"3":{"1":34000}},{"1":51515,"2":160,"3":{"1":32000}},{"1":50270,"2":170,"3":{"1":34000}},{"1":50115,"2":170,"3":{"1":34000}},{"1":50930,"2":150,"3":{"1":30000}},{"1":52900,"2":160,"3":{"1":32000}},{"1":51980,"2":170,"3":{"1":34000}},{"1":52285,"2":160,"3":{"1":32000}},{"1":51420,"2":160,"3":{"1":32000}},{"1":51625,"2":160,"3":{"1":32000}},{"1":51910,"2":160,"3":{"1":32000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":54610,"2":80,"3":{"1":80000}},{"1":50810,"2":60,"3":{"1":60000}},{"1":55700,"2":80,"3":{"1":80000}},{"1":50410,"2":60,"3":{"1":60000}},{"1":60085,"2":60,"3":{"1":60000}},{"1":52055,"2":70,"3":{"1":70000}},{"1":52545,"2":50,"3":{"1":50000}},{"1":56540,"2":80,"3":{"1":80000}},{"1":56550,"2":80,"3":{"1":80000}},{"1":51495,"2":70,"3":{"1":70000}},{"1":55590,"2":70,"3":{"1":70000}},{"1":55595,"2":80,"3":{"1":80000}},{"1":51715,"2":70,"3":{"1":70000}},{"1":56265,"2":70,"3":{"1":70000}},{"1":55900,"2":70,"3":{"1":70000}},{"1":51435,"2":70,"3":{"1":70000}},{"1":53410,"2":70,"3":{"1":70000}},{"1":56345,"2":70,"3":{"1":70000}},{"1":55120,"2":70,"3":{"1":70000}},{"1":56235,"2":70,"3":{"1":70000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":54065,"2":40,"3":{"1":80000}},{"1":50340,"2":30,"3":{"1":60000}},{"1":55245,"2":40,"3":{"1":80000}},{"1":50760,"2":30,"3":{"1":60000}},{"1":58800,"2":40,"3":{"1":80000}},{"1":56125,"2":40,"3":{"1":80000}},{"1":58820,"2":40,"3":{"1":80000}},{"1":63110,"2":40,"3":{"1":80000}},{"1":63195,"2":40,"3":{"1":80000}},{"1":57930,"2":40,"3":{"1":80000}},{"1":62915,"2":40,"3":{"1":80000}},{"1":55225,"2":40,"3":{"1":80000}},{"1":58570,"2":40,"3":{"1":80000}},{"1":64125,"2":40,"3":{"1":80000}},{"1":58825,"2":40,"3":{"1":80000}},{"1":59470,"2":40,"3":{"1":80000}},{"1":60560,"2":40,"3":{"1":80000}},{"1":62940,"2":40,"3":{"1":80000}},{"1":55890,"2":30,"3":{"1":60000}},{"1":63955,"2":40,"3":{"1":80000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50230,"2":190,"3":{"1":19000}},{"1":52770,"2":160,"3":{"1":16000}},{"1":51450,"2":160,"3":{"1":16000}},{"1":52335,"2":120,"3":{"1":12000}},{"1":51970,"2":150,"3":{"1":15000}},{"1":52390,"2":150,"3":{"1":15000}},{"1":52025,"2":140,"3":{"1":14000}},{"1":50990,"2":140,"3":{"1":14000}},{"1":50915,"2":160,"3":{"1":16000}},{"1":52730,"2":100,"3":{"1":10000}},{"1":50780,"2":110,"3":{"1":11000}},{"1":52485,"2":160,"3":{"1":16000}},{"1":52235,"2":160,"3":{"1":16000}},{"1":51740,"2":90,"3":{"1":9000}},{"1":53950,"2":120,"3":{"1":12000}},{"1":51975,"2":150,"3":{"1":15000}},{"1":51905,"2":110,"3":{"1":11000}},{"1":51445,"2":100,"3":{"1":10000}},{"1":53020,"2":150,"3":{"1":15000}},{"1":52330,"2":150,"3":{"1":15000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50325,"2":190,"3":{"1":38000}},{"1":50210,"2":130,"3":{"1":26000}},{"1":51370,"2":150,"3":{"1":30000}},{"1":51340,"2":140,"3":{"1":28000}},{"1":51215,"2":110,"3":{"1":22000}},{"1":60955,"2":160,"3":{"1":32000}},{"1":52130,"2":140,"3":{"1":28000}},{"1":58245,"2":150,"3":{"1":30000}},{"1":51565,"2":150,"3":{"1":30000}},{"1":52300,"2":160,"3":{"1":32000}},{"1":50285,"2":150,"3":{"1":30000}},{"1":50010,"2":140,"3":{"1":28000}},{"1":51335,"2":100,"3":{"1":20000}},{"1":51455,"2":140,"3":{"1":28000}},{"1":55525,"2":170,"3":{"1":34000}},{"1":50885,"2":160,"3":{"1":32000}},{"1":51005,"2":140,"3":{"1":28000}},{"1":50555,"2":150,"3":{"1":30000}},{"1":57600,"2":150,"3":{"1":30000}},{"1":54955,"2":100,"3":{"1":20000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50225,"2":130,"3":{"1":130000}},{"1":52995,"2":120,"3":{"1":120000}},{"1":50465,"2":120,"3":{"1":120000}},{"1":54635,"2":110,"3":{"1":110000}},{"1":51640,"2":110,"3":{"1":110000}},{"1":50095,"2":110,"3":{"1":110000}},{"1":51850,"2":90,"3":{"1":90000}},{"1":53570,"2":90,"3":{"1":90000}},{"1":52240,"2":110,"3":{"1":110000}},{"1":50685,"2":120,"3":{"1":120000}},{"1":53020,"2":110,"3":{"1":110000}},{"1":50870,"2":120,"3":{"1":120000}},{"1":50450,"2":130,"3":{"1":130000}},{"1":61140,"2":110,"3":{"1":110000}},{"1":53620,"2":130,"3":{"1":130000}},{"1":53190,"2":130,"3":{"1":130000}},{"1":54725,"2":110,"3":{"1":110000}},{"1":53950,"2":110,"3":{"1":110000}},{"1":56125,"2":90,"3":{"1":90000}},{"1":53500,"2":110,"3":{"1":110000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":51315,"2":70,"3":{"1":140000}},{"1":52190,"2":60,"3":{"1":120000}},{"1":51605,"2":60,"3":{"1":120000}},{"1":58665,"2":60,"3":{"1":120000}},{"1":55810,"2":60,"3":{"1":120000}},{"1":54505,"2":60,"3":{"1":120000}},{"1":54970,"2":60,"3":{"1":120000}},{"1":54600,"2":60,"3":{"1":120000}},{"1":51505,"2":40,"3":{"1":80000}},{"1":61975,"2":50,"3":{"1":100000}},{"1":54480,"2":40,"3":{"1":80000}},{"1":52070,"2":60,"3":{"1":120000}},{"1":55065,"2":70,"3":{"1":140000}},{"1":56040,"2":60,"3":{"1":120000}},{"1":51055,"2":60,"3":{"1":120000}},{"1":51275,"2":50,"3":{"1":100000}},{"1":59300,"2":60,"3":{"1":120000}},{"1":54940,"2":60,"3":{"1":120000}},{"1":55320,"2":60,"3":{"1":120000}},{"1":54815,"2":60,"3":{"1":120000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":51620,"2":250,"3":{"2":25000}},{"1":53075,"2":130,"3":{"2":13000}},{"1":51060,"2":210,"3":{"2":21000}},{"1":50290,"2":140,"3":{"2":14000}},{"1":53100,"2":170,"3":{"2":17000}},{"1":53810,"2":180,"3":{"2":18000}},{"1":52645,"2":170,"3":{"2":17000}},{"1":50240,"2":180,"3":{"2":18000}},{"1":50955,"2":200,"3":{"2":20000}},{"1":52265,"2":210,"3":{"2":21000}},{"1":50855,"2":190,"3":{"2":19000}},{"1":50820,"2":210,"3":{"2":21000}},{"1":51755,"2":170,"3":{"2":17000}},{"1":50255,"2":170,"3":{"2":17000}},{"1":51710,"2":220,"3":{"2":22000}},{"1":51715,"2":220,"3":{"2":22000}},{"1":51070,"2":150,"3":{"2":15000}},{"1":52245,"2":190,"3":{"2":19000}},{"1":51050,"2":170,"3":{"2":17000}},{"1":50475,"2":110,"3":{"2":11000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":50115,"2":190,"3":{"2":38000}},{"1":50385,"2":150,"3":{"2":30000}},{"1":58485,"2":170,"3":{"2":34000}},{"1":52100,"2":130,"3":{"2":26000}},{"1":52555,"2":150,"3":{"2":30000}},{"1":61145,"2":110,"3":{"2":22000}},{"1":52455,"2":160,"3":{"2":32000}},{"1":50370,"2":140,"3":{"2":28000}},{"1":52605,"2":160,"3":{"2":32000}},{"1":52290,"2":160,"3":{"2":32000}},{"1":50860,"2":140,"3":{"2":28000}},{"1":50295,"2":160,"3":{"2":32000}},{"1":52530,"2":150,"3":{"2":30000}},{"1":52615,"2":150,"3":{"2":30000}},{"1":59140,"2":170,"3":{"2":34000}},{"1":58920,"2":170,"3":{"2":34000}},{"1":51310,"2":150,"3":{"2":30000}},{"1":51530,"2":140,"3":{"2":28000}},{"1":52295,"2":150,"3":{"2":30000}},{"1":50060,"2":160,"3":{"2":32000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":53425,"2":80,"3":{"2":80000}},{"1":57635,"2":60,"3":{"2":60000}},{"1":51560,"2":50,"3":{"2":50000}},{"1":66370,"2":60,"3":{"2":60000}},{"1":50980,"2":60,"3":{"2":60000}},{"1":58800,"2":60,"3":{"2":60000}},{"1":53275,"2":60,"3":{"2":60000}},{"1":52985,"2":40,"3":{"2":40000}},{"1":53135,"2":50,"3":{"2":50000}},{"1":50120,"2":50,"3":{"2":50000}},{"1":55580,"2":60,"3":{"2":60000}},{"1":58315,"2":70,"3":{"2":70000}},{"1":57150,"2":60,"3":{"2":60000}},{"1":56500,"2":60,"3":{"2":60000}},{"1":53430,"2":50,"3":{"2":50000}},{"1":53565,"2":50,"3":{"2":50000}},{"1":55160,"2":60,"3":{"2":60000}},{"1":56520,"2":60,"3":{"2":60000}},{"1":69995,"2":50,"3":{"2":50000}},{"1":52445,"2":60,"3":{"2":60000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":52210,"2":40,"3":{"2":80000}},{"1":51180,"2":20,"3":{"2":40000}},{"1":62990,"2":40,"3":{"2":80000}},{"1":62010,"2":20,"3":{"2":40000}},{"1":50985,"2":30,"3":{"2":60000}},{"1":57675,"2":30,"3":{"2":60000}},{"1":50935,"2":30,"3":{"2":60000}},{"1":56270,"2":30,"3":{"2":60000}},{"1":51120,"2":30,"3":{"2":60000}},{"1":50370,"2":30,"3":{"2":60000}},{"1":56155,"2":30,"3":{"2":60000}},{"1":72330,"2":30,"3":{"2":60000}},{"1":56355,"2":30,"3":{"2":60000}},{"1":51635,"2":20,"3":{"2":40000}},{"1":62565,"2":40,"3":{"2":80000}},{"1":66530,"2":40,"3":{"2":80000}},{"1":55000,"2":30,"3":{"2":60000}},{"1":75095,"2":30,"3":{"2":60000}},{"1":57610,"2":30,"3":{"2":60000}},{"1":52385,"2":30,"3":{"2":60000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":51240,"2":200,"3":{"2":20000}},{"1":51985,"2":140,"3":{"2":14000}},{"1":50810,"2":160,"3":{"2":16000}},{"1":51945,"2":150,"3":{"2":15000}},{"1":52680,"2":150,"3":{"2":15000}},{"1":51850,"2":130,"3":{"2":13000}},{"1":50455,"2":120,"3":{"2":12000}},{"1":52605,"2":140,"3":{"2":14000}},{"1":50870,"2":150,"3":{"2":15000}},{"1":51755,"2":160,"3":{"2":16000}},{"1":53085,"2":90,"3":{"2":9000}},{"1":51860,"2":180,"3":{"2":18000}},{"1":51480,"2":90,"3":{"2":9000}},{"1":50580,"2":140,"3":{"2":14000}},{"1":52260,"2":170,"3":{"2":17000}},{"1":53065,"2":160,"3":{"2":16000}},{"1":54485,"2":130,"3":{"2":13000}},{"1":51645,"2":140,"3":{"2":14000}},{"1":54945,"2":140,"3":{"2":14000}},{"1":52410,"2":180,"3":{"2":18000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":50050,"2":190,"3":{"2":38000}},{"1":50530,"2":120,"3":{"2":24000}},{"1":53645,"2":150,"3":{"2":30000}},{"1":55260,"2":120,"3":{"2":24000}},{"1":51830,"2":150,"3":{"2":30000}},{"1":53655,"2":110,"3":{"2":22000}},{"1":51505,"2":140,"3":{"2":28000}},{"1":50065,"2":110,"3":{"2":22000}},{"1":52065,"2":100,"3":{"2":20000}},{"1":53450,"2":100,"3":{"2":20000}},{"1":53705,"2":130,"3":{"2":26000}},{"1":50370,"2":120,"3":{"2":24000}},{"1":52540,"2":150,"3":{"2":30000}},{"1":50705,"2":130,"3":{"2":26000}},{"1":50910,"2":100,"3":{"2":20000}},{"1":50940,"2":90,"3":{"2":18000}},{"1":51980,"2":120,"3":{"2":24000}},{"1":51045,"2":130,"3":{"2":26000}},{"1":52955,"2":100,"3":{"2":20000}},{"1":51455,"2":150,"3":{"2":30000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":50660,"2":130,"3":{"2":130000}},{"1":51170,"2":60,"3":{"2":60000}},{"1":53730,"2":110,"3":{"2":110000}},{"1":58095,"2":60,"3":{"2":60000}},{"1":52630,"2":100,"3":{"2":100000}},{"1":51845,"2":80,"3":{"2":80000}},{"1":52875,"2":70,"3":{"2":70000}},{"1":51940,"2":80,"3":{"2":80000}},{"1":51380,"2":90,"3":{"2":90000}},{"1":60360,"2":110,"3":{"2":110000}},{"1":53325,"2":70,"3":{"2":70000}},{"1":51675,"2":110,"3":{"2":110000}},{"1":56890,"2":90,"3":{"2":90000}},{"1":56070,"2":70,"3":{"2":70000}},{"1":57830,"2":100,"3":{"2":100000}},{"1":52100,"2":100,"3":{"2":100000}},{"1":58465,"2":60,"3":{"2":60000}},{"1":58770,"2":60,"3":{"2":60000}},{"1":54595,"2":90,"3":{"2":90000}},{"1":55115,"2":100,"3":{"2":100000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":53515,"2":70,"3":{"2":140000}},{"1":55765,"2":50,"3":{"2":100000}},{"1":60395,"2":50,"3":{"2":100000}},{"1":64160,"2":50,"3":{"2":100000}},{"1":50590,"2":40,"3":{"2":80000}},{"1":50860,"2":50,"3":{"2":100000}},{"1":56815,"2":50,"3":{"2":100000}},{"1":51015,"2":40,"3":{"2":80000}},{"1":59475,"2":60,"3":{"2":120000}},{"1":55680,"2":50,"3":{"2":100000}},{"1":56270,"2":60,"3":{"2":120000}},{"1":64350,"2":40,"3":{"2":80000}},{"1":60190,"2":50,"3":{"2":100000}},{"1":61175,"2":50,"3":{"2":100000}},{"1":58705,"2":50,"3":{"2":100000}},{"1":59140,"2":40,"3":{"2":80000}},{"1":57010,"2":50,"3":{"2":100000}},{"1":61285,"2":50,"3":{"2":100000}},{"1":59740,"2":50,"3":{"2":100000}},{"1":50845,"2":50,"3":{"2":100000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50935,"2":140,"3":{"4":14000}},{"1":50855,"2":190,"3":{"4":19000}},{"1":50345,"2":210,"3":{"4":21000}},{"1":53525,"2":180,"3":{"4":18000}},{"1":51115,"2":200,"3":{"4":20000}},{"1":50785,"2":190,"3":{"4":19000}},{"1":51065,"2":200,"3":{"4":20000}},{"1":54715,"2":190,"3":{"4":19000}},{"1":50070,"2":200,"3":{"4":20000}},{"1":50320,"2":200,"3":{"4":20000}},{"1":50005,"2":190,"3":{"4":19000}},{"1":50915,"2":190,"3":{"4":19000}},{"1":50255,"2":180,"3":{"4":18000}},{"1":51390,"2":190,"3":{"4":19000}},{"1":50275,"2":210,"3":{"4":21000}},{"1":51070,"2":200,"3":{"4":20000}},{"1":50925,"2":180,"3":{"4":18000}},{"1":51425,"2":190,"3":{"4":19000}},{"1":51230,"2":150,"3":{"4":15000}},{"1":50395,"2":200,"3":{"4":20000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50490,"2":170,"3":{"4":34000}},{"1":51380,"2":120,"3":{"4":24000}},{"1":56865,"2":170,"3":{"4":34000}},{"1":52585,"2":110,"3":{"4":22000}},{"1":51565,"2":160,"3":{"4":32000}},{"1":52045,"2":170,"3":{"4":34000}},{"1":53420,"2":110,"3":{"4":22000}},{"1":52665,"2":160,"3":{"4":32000}},{"1":50570,"2":160,"3":{"4":32000}},{"1":52690,"2":160,"3":{"4":32000}},{"1":55035,"2":130,"3":{"4":26000}},{"1":51600,"2":160,"3":{"4":32000}},{"1":51630,"2":150,"3":{"4":30000}},{"1":51105,"2":150,"3":{"4":30000}},{"1":50495,"2":160,"3":{"4":32000}},{"1":51595,"2":170,"3":{"4":34000}},{"1":52880,"2":100,"3":{"4":20000}},{"1":52480,"2":120,"3":{"4":24000}},{"1":51470,"2":160,"3":{"4":32000}},{"1":53000,"2":150,"3":{"4":30000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53175,"2":70,"3":{"4":70000}},{"1":54150,"2":60,"3":{"4":60000}},{"1":51880,"2":60,"3":{"4":60000}},{"1":56980,"2":60,"3":{"4":60000}},{"1":59615,"2":50,"3":{"4":50000}},{"1":51335,"2":60,"3":{"4":60000}},{"1":57395,"2":70,"3":{"4":70000}},{"1":52830,"2":60,"3":{"4":60000}},{"1":57655,"2":70,"3":{"4":70000}},{"1":57390,"2":50,"3":{"4":50000}},{"1":57405,"2":70,"3":{"4":70000}},{"1":58080,"2":70,"3":{"4":70000}},{"1":51090,"2":60,"3":{"4":60000}},{"1":52640,"2":60,"3":{"4":60000}},{"1":57700,"2":70,"3":{"4":70000}},{"1":57435,"2":60,"3":{"4":60000}},{"1":52665,"2":60,"3":{"4":60000}},{"1":53250,"2":60,"3":{"4":60000}},{"1":52155,"2":60,"3":{"4":60000}},{"1":57225,"2":70,"3":{"4":70000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":59920,"2":40,"3":{"4":80000}},{"1":53105,"2":30,"3":{"4":60000}},{"1":50025,"2":30,"3":{"4":60000}},{"1":55990,"2":30,"3":{"4":60000}},{"1":65380,"2":40,"3":{"4":80000}},{"1":67005,"2":40,"3":{"4":80000}},{"1":65520,"2":40,"3":{"4":80000}},{"1":52425,"2":30,"3":{"4":60000}},{"1":70445,"2":30,"3":{"4":60000}},{"1":52050,"2":30,"3":{"4":60000}},{"1":65315,"2":40,"3":{"4":80000}},{"1":66125,"2":40,"3":{"4":80000}},{"1":50870,"2":30,"3":{"4":60000}},{"1":52075,"2":30,"3":{"4":60000}},{"1":50010,"2":30,"3":{"4":60000}},{"1":62370,"2":40,"3":{"4":80000}},{"1":51445,"2":30,"3":{"4":60000}},{"1":51395,"2":30,"3":{"4":60000}},{"1":67020,"2":30,"3":{"4":60000}},{"1":64410,"2":40,"3":{"4":80000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":51755,"2":60,"3":{"4":60000}},{"1":54510,"2":40,"3":{"4":40000}},{"1":55960,"2":40,"3":{"4":40000}},{"1":51105,"2":40,"3":{"4":40000}},{"1":52290,"2":50,"3":{"4":50000}},{"1":56300,"2":40,"3":{"4":40000}},{"1":55570,"2":40,"3":{"4":40000}},{"1":57260,"2":40,"3":{"4":40000}},{"1":52180,"2":50,"3":{"4":50000}},{"1":56075,"2":50,"3":{"4":50000}},{"1":52110,"2":40,"3":{"4":40000}},{"1":55350,"2":40,"3":{"4":40000}},{"1":63635,"2":50,"3":{"4":50000}},{"1":61215,"2":40,"3":{"4":40000}},{"1":55605,"2":40,"3":{"4":40000}},{"1":51215,"2":50,"3":{"4":50000}},{"1":56840,"2":50,"3":{"4":50000}},{"1":61235,"2":40,"3":{"4":40000}},{"1":55900,"2":50,"3":{"4":50000}},{"1":63275,"2":50,"3":{"4":50000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":53860,"2":170,"3":{"4":17000}},{"1":50560,"2":160,"3":{"4":16000}},{"1":50205,"2":160,"3":{"4":16000}},{"1":50970,"2":120,"3":{"4":12000}},{"1":50735,"2":150,"3":{"4":15000}},{"1":53790,"2":160,"3":{"4":16000}},{"1":51755,"2":150,"3":{"4":15000}},{"1":52910,"2":150,"3":{"4":15000}},{"1":60575,"2":110,"3":{"4":11000}},{"1":50725,"2":140,"3":{"4":14000}},{"1":51520,"2":160,"3":{"4":16000}},{"1":50130,"2":180,"3":{"4":18000}},{"1":50955,"2":150,"3":{"4":15000}},{"1":51925,"2":160,"3":{"4":16000}},{"1":52120,"2":160,"3":{"4":16000}},{"1":52650,"2":140,"3":{"4":14000}},{"1":51865,"2":160,"3":{"4":16000}},{"1":51780,"2":160,"3":{"4":16000}},{"1":53285,"2":150,"3":{"4":15000}},{"1":52145,"2":160,"3":{"4":16000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":51105,"2":110,"3":{"4":22000}},{"1":51970,"2":160,"3":{"4":32000}},{"1":52385,"2":140,"3":{"4":28000}},{"1":52045,"2":140,"3":{"4":28000}},{"1":53035,"2":150,"3":{"4":30000}},{"1":53210,"2":130,"3":{"4":26000}},{"1":57450,"2":140,"3":{"4":28000}},{"1":50670,"2":130,"3":{"4":26000}},{"1":52635,"2":150,"3":{"4":30000}},{"1":50405,"2":130,"3":{"4":26000}},{"1":53090,"2":140,"3":{"4":28000}},{"1":54600,"2":150,"3":{"4":30000}},{"1":50020,"2":120,"3":{"4":24000}},{"1":53675,"2":140,"3":{"4":28000}},{"1":54595,"2":130,"3":{"4":26000}},{"1":52165,"2":150,"3":{"4":30000}},{"1":50510,"2":140,"3":{"4":28000}},{"1":52695,"2":140,"3":{"4":28000}},{"1":50470,"2":140,"3":{"4":28000}},{"1":54020,"2":140,"3":{"4":28000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53755,"2":90,"3":{"4":90000}},{"1":52475,"2":70,"3":{"4":70000}},{"1":51075,"2":110,"3":{"4":110000}},{"1":56290,"2":80,"3":{"4":80000}},{"1":60220,"2":70,"3":{"4":70000}},{"1":54015,"2":90,"3":{"4":90000}},{"1":61955,"2":90,"3":{"4":90000}},{"1":53300,"2":100,"3":{"4":100000}},{"1":50640,"2":110,"3":{"4":110000}},{"1":50835,"2":70,"3":{"4":70000}},{"1":50865,"2":110,"3":{"4":110000}},{"1":53790,"2":110,"3":{"4":110000}},{"1":51695,"2":90,"3":{"4":90000}},{"1":56575,"2":80,"3":{"4":80000}},{"1":53140,"2":100,"3":{"4":100000}},{"1":52695,"2":90,"3":{"4":90000}},{"1":50090,"2":90,"3":{"4":90000}},{"1":50125,"2":70,"3":{"4":70000}},{"1":57510,"2":100,"3":{"4":100000}},{"1":51430,"2":110,"3":{"4":110000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":53455,"2":50,"3":{"4":100000}},{"1":55275,"2":60,"3":{"4":120000}},{"1":54530,"2":60,"3":{"4":120000}},{"1":54900,"2":50,"3":{"4":100000}},{"1":54255,"2":50,"3":{"4":100000}},{"1":56310,"2":50,"3":{"4":100000}},{"1":59520,"2":50,"3":{"4":100000}},{"1":54010,"2":50,"3":{"4":100000}},{"1":52505,"2":60,"3":{"4":120000}},{"1":50825,"2":50,"3":{"4":100000}},{"1":53770,"2":60,"3":{"4":120000}},{"1":57660,"2":60,"3":{"4":120000}},{"1":55775,"2":50,"3":{"4":100000}},{"1":55780,"2":50,"3":{"4":100000}},{"1":54295,"2":60,"3":{"4":120000}},{"1":55915,"2":50,"3":{"4":100000}},{"1":52880,"2":50,"3":{"4":100000}},{"1":51460,"2":50,"3":{"4":100000}},{"1":51650,"2":50,"3":{"4":100000}},{"1":53570,"2":50,"3":{"4":100000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":58505,"2":50,"3":{"4":50000}},{"1":57735,"2":50,"3":{"4":50000}},{"1":55140,"2":70,"3":{"4":70000}},{"1":58475,"2":50,"3":{"4":50000}},{"1":56085,"2":60,"3":{"4":60000}},{"1":53515,"2":50,"3":{"4":50000}},{"1":51225,"2":40,"3":{"4":40000}},{"1":61515,"2":50,"3":{"4":50000}},{"1":53270,"2":60,"3":{"4":60000}},{"1":56845,"2":60,"3":{"4":60000}},{"1":52335,"2":60,"3":{"4":60000}},{"1":52100,"2":80,"3":{"4":80000}},{"1":74785,"2":60,"3":{"4":60000}},{"1":56865,"2":60,"3":{"4":60000}},{"1":50880,"2":60,"3":{"4":60000}},{"1":59935,"2":70,"3":{"4":70000}},{"1":53055,"2":50,"3":{"4":50000}},{"1":59875,"2":50,"3":{"4":50000}},{"1":51945,"2":60,"3":{"4":60000}},{"1":55500,"2":70,"3":{"4":70000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/head/json_vm.pb.json b/benchmark/data/skybrian5/head/json_vm.pb.json
deleted file mode 100644
index fe8d085..0000000
--- a/benchmark/data/skybrian5/head/json_vm.pb.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "readjson_vm.dart",
- "10": {
- "1": "skybrian5",
- "2": 1,
- "3": "1.12.0 (Mon Aug 31 03:24:52 2015) on \"linux_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+4"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+8"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":1,"2":{"1":100,"2":1},"3":20,"4":50},"2":[{"1":50173,"2":750,"3":{"1":75000}},{"1":50197,"2":940,"3":{"1":94000}},{"1":50136,"2":940,"3":{"1":94000}},{"1":50146,"2":940,"3":{"1":94000}},{"1":50100,"2":940,"3":{"1":94000}},{"1":50303,"2":930,"3":{"1":93000}},{"1":50067,"2":930,"3":{"1":93000}},{"1":50066,"2":930,"3":{"1":93000}},{"1":50492,"2":940,"3":{"1":94000}},{"1":50477,"2":940,"3":{"1":94000}},{"1":50509,"2":930,"3":{"1":93000}},{"1":50480,"2":930,"3":{"1":93000}},{"1":50474,"2":930,"3":{"1":93000}},{"1":50473,"2":930,"3":{"1":93000}},{"1":50380,"2":930,"3":{"1":93000}},{"1":50390,"2":930,"3":{"1":93000}},{"1":50528,"2":930,"3":{"1":93000}},{"1":50290,"2":910,"3":{"1":91000}},{"1":50480,"2":920,"3":{"1":92000}},{"1":50384,"2":920,"3":{"1":92000}}]},
- {"1":{"1":1,"2":{"1":100,"2":2},"3":20,"4":50},"2":[{"1":50058,"2":730,"3":{"1":146000}},{"1":50151,"2":730,"3":{"1":146000}},{"1":50097,"2":730,"3":{"1":146000}},{"1":50162,"2":730,"3":{"1":146000}},{"1":50047,"2":730,"3":{"1":146000}},{"1":50036,"2":730,"3":{"1":146000}},{"1":50068,"2":730,"3":{"1":146000}},{"1":50155,"2":730,"3":{"1":146000}},{"1":50152,"2":730,"3":{"1":146000}},{"1":50053,"2":730,"3":{"1":146000}},{"1":50391,"2":720,"3":{"1":144000}},{"1":50352,"2":720,"3":{"1":144000}},{"1":50373,"2":720,"3":{"1":144000}},{"1":50448,"2":720,"3":{"1":144000}},{"1":50348,"2":720,"3":{"1":144000}},{"1":50350,"2":720,"3":{"1":144000}},{"1":50363,"2":720,"3":{"1":144000}},{"1":50420,"2":720,"3":{"1":144000}},{"1":50354,"2":720,"3":{"1":144000}},{"1":50361,"2":720,"3":{"1":144000}}]},
- {"1":{"1":1,"2":{"1":100,"2":10},"3":20,"4":50},"2":[{"1":51668,"2":230,"3":{"1":230000}},{"1":51730,"2":230,"3":{"1":230000}},{"1":51788,"2":230,"3":{"1":230000}},{"1":51805,"2":230,"3":{"1":230000}},{"1":51798,"2":230,"3":{"1":230000}},{"1":51781,"2":230,"3":{"1":230000}},{"1":51860,"2":230,"3":{"1":230000}},{"1":51809,"2":230,"3":{"1":230000}},{"1":51650,"2":230,"3":{"1":230000}},{"1":51628,"2":230,"3":{"1":230000}},{"1":52183,"2":230,"3":{"1":230000}},{"1":52088,"2":230,"3":{"1":230000}},{"1":52194,"2":230,"3":{"1":230000}},{"1":50035,"2":220,"3":{"1":220000}},{"1":52243,"2":230,"3":{"1":230000}},{"1":52239,"2":230,"3":{"1":230000}},{"1":50050,"2":220,"3":{"1":220000}},{"1":51812,"2":210,"3":{"1":210000}},{"1":50170,"2":220,"3":{"1":220000}},{"1":52133,"2":230,"3":{"1":230000}}]},
- {"1":{"1":1,"2":{"1":200,"2":10},"3":20,"4":50},"2":[{"1":54170,"2":120,"3":{"1":240000}},{"1":54261,"2":120,"3":{"1":240000}},{"1":54221,"2":120,"3":{"1":240000}},{"1":54211,"2":120,"3":{"1":240000}},{"1":54131,"2":120,"3":{"1":240000}},{"1":54096,"2":120,"3":{"1":240000}},{"1":53967,"2":120,"3":{"1":240000}},{"1":53989,"2":120,"3":{"1":240000}},{"1":54044,"2":120,"3":{"1":240000}},{"1":54130,"2":120,"3":{"1":240000}},{"1":50006,"2":110,"3":{"1":220000}},{"1":50002,"2":110,"3":{"1":220000}},{"1":50036,"2":110,"3":{"1":220000}},{"1":50302,"2":110,"3":{"1":220000}},{"1":50274,"2":110,"3":{"1":220000}},{"1":50369,"2":110,"3":{"1":220000}},{"1":50253,"2":110,"3":{"1":220000}},{"1":50436,"2":110,"3":{"1":220000}},{"1":50220,"2":110,"3":{"1":220000}},{"1":50249,"2":110,"3":{"1":220000}}]},
- {"1":{"1":2,"2":{"1":100,"3":1},"3":20,"4":50},"2":[{"1":50174,"2":780,"3":{"1":78000}},{"1":50132,"2":780,"3":{"1":78000}},{"1":50151,"2":780,"3":{"1":78000}},{"1":50172,"2":770,"3":{"1":77000}},{"1":50037,"2":770,"3":{"1":77000}},{"1":50041,"2":780,"3":{"1":78000}},{"1":50414,"2":770,"3":{"1":77000}},{"1":50638,"2":780,"3":{"1":78000}},{"1":50124,"2":780,"3":{"1":78000}},{"1":50101,"2":780,"3":{"1":78000}},{"1":50209,"2":760,"3":{"1":76000}},{"1":50154,"2":750,"3":{"1":75000}},{"1":50634,"2":760,"3":{"1":76000}},{"1":50347,"2":760,"3":{"1":76000}},{"1":50577,"2":760,"3":{"1":76000}},{"1":50014,"2":750,"3":{"1":75000}},{"1":50007,"2":750,"3":{"1":75000}},{"1":50034,"2":750,"3":{"1":75000}},{"1":50049,"2":750,"3":{"1":75000}},{"1":50032,"2":760,"3":{"1":76000}}]},
- {"1":{"1":2,"2":{"1":100,"3":2},"3":20,"4":50},"2":[{"1":50053,"2":710,"3":{"1":142000}},{"1":50599,"2":720,"3":{"1":144000}},{"1":50058,"2":710,"3":{"1":142000}},{"1":50607,"2":720,"3":{"1":144000}},{"1":50012,"2":710,"3":{"1":142000}},{"1":50684,"2":720,"3":{"1":144000}},{"1":50591,"2":720,"3":{"1":144000}},{"1":50007,"2":710,"3":{"1":142000}},{"1":50616,"2":720,"3":{"1":144000}},{"1":50701,"2":720,"3":{"1":144000}},{"1":50340,"2":700,"3":{"1":140000}},{"1":50322,"2":700,"3":{"1":140000}},{"1":50321,"2":700,"3":{"1":140000}},{"1":50406,"2":700,"3":{"1":140000}},{"1":50324,"2":700,"3":{"1":140000}},{"1":50422,"2":700,"3":{"1":140000}},{"1":50288,"2":700,"3":{"1":140000}},{"1":50283,"2":700,"3":{"1":140000}},{"1":50358,"2":700,"3":{"1":140000}},{"1":50315,"2":700,"3":{"1":140000}}]},
- {"1":{"1":2,"2":{"1":100,"3":10},"3":20,"4":50},"2":[{"1":50478,"2":390,"3":{"1":390000}},{"1":50471,"2":390,"3":{"1":390000}},{"1":50479,"2":390,"3":{"1":390000}},{"1":50407,"2":390,"3":{"1":390000}},{"1":50466,"2":390,"3":{"1":390000}},{"1":50361,"2":390,"3":{"1":390000}},{"1":50728,"2":390,"3":{"1":390000}},{"1":50495,"2":390,"3":{"1":390000}},{"1":50396,"2":390,"3":{"1":390000}},{"1":50453,"2":390,"3":{"1":390000}},{"1":50968,"2":390,"3":{"1":390000}},{"1":50812,"2":390,"3":{"1":390000}},{"1":51000,"2":390,"3":{"1":390000}},{"1":51011,"2":390,"3":{"1":390000}},{"1":50885,"2":390,"3":{"1":390000}},{"1":50978,"2":390,"3":{"1":390000}},{"1":50866,"2":390,"3":{"1":390000}},{"1":50937,"2":390,"3":{"1":390000}},{"1":50923,"2":390,"3":{"1":390000}},{"1":50864,"2":390,"3":{"1":390000}}]},
- {"1":{"1":2,"2":{"1":200,"3":10},"3":20,"4":50},"2":[{"1":52576,"2":200,"3":{"1":400000}},{"1":52551,"2":200,"3":{"1":400000}},{"1":52524,"2":200,"3":{"1":400000}},{"1":52526,"2":200,"3":{"1":400000}},{"1":52541,"2":200,"3":{"1":400000}},{"1":52558,"2":200,"3":{"1":400000}},{"1":52466,"2":200,"3":{"1":400000}},{"1":52531,"2":200,"3":{"1":400000}},{"1":52417,"2":200,"3":{"1":400000}},{"1":52575,"2":200,"3":{"1":400000}},{"1":50128,"2":190,"3":{"1":380000}},{"1":50045,"2":190,"3":{"1":380000}},{"1":50163,"2":190,"3":{"1":380000}},{"1":50175,"2":190,"3":{"1":380000}},{"1":50041,"2":190,"3":{"1":380000}},{"1":50404,"2":190,"3":{"1":380000}},{"1":50097,"2":190,"3":{"1":380000}},{"1":50171,"2":190,"3":{"1":380000}},{"1":50081,"2":190,"3":{"1":380000}},{"1":50153,"2":190,"3":{"1":380000}}]},
- {"1":{"1":3,"2":{"1":100,"4":1},"3":20,"4":50},"2":[{"1":50459,"2":860,"3":{"2":86000}},{"1":50496,"2":890,"3":{"2":89000}},{"1":50516,"2":890,"3":{"2":89000}},{"1":50543,"2":890,"3":{"2":89000}},{"1":50377,"2":880,"3":{"2":88000}},{"1":50207,"2":880,"3":{"2":88000}},{"1":50163,"2":880,"3":{"2":88000}},{"1":50273,"2":880,"3":{"2":88000}},{"1":50232,"2":880,"3":{"2":88000}},{"1":50448,"2":880,"3":{"2":88000}},{"1":50008,"2":900,"3":{"2":90000}},{"1":50471,"2":910,"3":{"2":91000}},{"1":50195,"2":900,"3":{"2":90000}},{"1":50532,"2":910,"3":{"2":91000}},{"1":50494,"2":910,"3":{"2":91000}},{"1":50492,"2":910,"3":{"2":91000}},{"1":50015,"2":900,"3":{"2":90000}},{"1":50456,"2":910,"3":{"2":91000}},{"1":50508,"2":910,"3":{"2":91000}},{"1":50430,"2":900,"3":{"2":90000}}]},
- {"1":{"1":3,"2":{"1":100,"4":2},"3":20,"4":50},"2":[{"1":50358,"2":680,"3":{"2":136000}},{"1":50256,"2":680,"3":{"2":136000}},{"1":50299,"2":680,"3":{"2":136000}},{"1":50268,"2":680,"3":{"2":136000}},{"1":50187,"2":680,"3":{"2":136000}},{"1":50225,"2":680,"3":{"2":136000}},{"1":50181,"2":680,"3":{"2":136000}},{"1":50201,"2":680,"3":{"2":136000}},{"1":50206,"2":680,"3":{"2":136000}},{"1":50224,"2":680,"3":{"2":136000}},{"1":50209,"2":700,"3":{"2":140000}},{"1":50129,"2":700,"3":{"2":140000}},{"1":50160,"2":700,"3":{"2":140000}},{"1":50176,"2":700,"3":{"2":140000}},{"1":50131,"2":700,"3":{"2":140000}},{"1":50134,"2":700,"3":{"2":140000}},{"1":50232,"2":700,"3":{"2":140000}},{"1":50175,"2":700,"3":{"2":140000}},{"1":50182,"2":700,"3":{"2":140000}},{"1":50176,"2":700,"3":{"2":140000}}]},
- {"1":{"1":3,"2":{"1":100,"4":10},"3":20,"4":50},"2":[{"1":51273,"2":210,"3":{"2":210000}},{"1":51543,"2":210,"3":{"2":210000}},{"1":51409,"2":210,"3":{"2":210000}},{"1":51442,"2":210,"3":{"2":210000}},{"1":51403,"2":210,"3":{"2":210000}},{"1":51401,"2":210,"3":{"2":210000}},{"1":51454,"2":210,"3":{"2":210000}},{"1":51432,"2":210,"3":{"2":210000}},{"1":51390,"2":210,"3":{"2":210000}},{"1":51471,"2":210,"3":{"2":210000}},{"1":52239,"2":220,"3":{"2":220000}},{"1":52138,"2":220,"3":{"2":220000}},{"1":51844,"2":220,"3":{"2":220000}},{"1":51912,"2":220,"3":{"2":220000}},{"1":51931,"2":220,"3":{"2":220000}},{"1":51838,"2":220,"3":{"2":220000}},{"1":51965,"2":220,"3":{"2":220000}},{"1":51991,"2":220,"3":{"2":220000}},{"1":52118,"2":220,"3":{"2":220000}},{"1":52072,"2":220,"3":{"2":220000}}]},
- {"1":{"1":3,"2":{"1":200,"4":10},"3":20,"4":50},"2":[{"1":54006,"2":110,"3":{"2":220000}},{"1":54032,"2":110,"3":{"2":220000}},{"1":54016,"2":110,"3":{"2":220000}},{"1":53931,"2":110,"3":{"2":220000}},{"1":54112,"2":110,"3":{"2":220000}},{"1":53988,"2":110,"3":{"2":220000}},{"1":54096,"2":110,"3":{"2":220000}},{"1":54007,"2":110,"3":{"2":220000}},{"1":54107,"2":110,"3":{"2":220000}},{"1":54082,"2":110,"3":{"2":220000}},{"1":52082,"2":110,"3":{"2":220000}},{"1":52292,"2":110,"3":{"2":220000}},{"1":52083,"2":110,"3":{"2":220000}},{"1":52058,"2":110,"3":{"2":220000}},{"1":52212,"2":110,"3":{"2":220000}},{"1":52060,"2":110,"3":{"2":220000}},{"1":52104,"2":110,"3":{"2":220000}},{"1":52203,"2":110,"3":{"2":220000}},{"1":52069,"2":110,"3":{"2":220000}},{"1":52116,"2":110,"3":{"2":220000}}]},
- {"1":{"1":4,"2":{"1":100,"5":1},"3":20,"4":50},"2":[{"1":50530,"2":780,"3":{"2":78000}},{"1":50194,"2":770,"3":{"2":77000}},{"1":50507,"2":780,"3":{"2":78000}},{"1":50082,"2":770,"3":{"2":77000}},{"1":50478,"2":780,"3":{"2":78000}},{"1":50188,"2":770,"3":{"2":77000}},{"1":50251,"2":770,"3":{"2":77000}},{"1":50045,"2":770,"3":{"2":77000}},{"1":50194,"2":770,"3":{"2":77000}},{"1":50055,"2":770,"3":{"2":77000}},{"1":50463,"2":760,"3":{"2":76000}},{"1":50283,"2":750,"3":{"2":75000}},{"1":50347,"2":750,"3":{"2":75000}},{"1":50339,"2":750,"3":{"2":75000}},{"1":50381,"2":750,"3":{"2":75000}},{"1":50433,"2":750,"3":{"2":75000}},{"1":50495,"2":750,"3":{"2":75000}},{"1":50591,"2":750,"3":{"2":75000}},{"1":50528,"2":760,"3":{"2":76000}},{"1":50554,"2":760,"3":{"2":76000}}]},
- {"1":{"1":4,"2":{"1":100,"5":2},"3":20,"4":50},"2":[{"1":50298,"2":700,"3":{"2":140000}},{"1":50406,"2":700,"3":{"2":140000}},{"1":50443,"2":700,"3":{"2":140000}},{"1":50365,"2":700,"3":{"2":140000}},{"1":50420,"2":700,"3":{"2":140000}},{"1":50431,"2":700,"3":{"2":140000}},{"1":50392,"2":700,"3":{"2":140000}},{"1":50324,"2":700,"3":{"2":140000}},{"1":50386,"2":700,"3":{"2":140000}},{"1":50393,"2":700,"3":{"2":140000}},{"1":50047,"2":680,"3":{"2":136000}},{"1":50100,"2":680,"3":{"2":136000}},{"1":50141,"2":680,"3":{"2":136000}},{"1":50708,"2":690,"3":{"2":138000}},{"1":50108,"2":680,"3":{"2":136000}},{"1":50061,"2":680,"3":{"2":136000}},{"1":50720,"2":690,"3":{"2":138000}},{"1":50166,"2":680,"3":{"2":136000}},{"1":50069,"2":680,"3":{"2":136000}},{"1":50005,"2":680,"3":{"2":136000}}]},
- {"1":{"1":4,"2":{"1":100,"5":10},"3":20,"4":50},"2":[{"1":51226,"2":370,"3":{"2":370000}},{"1":51216,"2":370,"3":{"2":370000}},{"1":51329,"2":370,"3":{"2":370000}},{"1":51122,"2":370,"3":{"2":370000}},{"1":51238,"2":370,"3":{"2":370000}},{"1":51309,"2":370,"3":{"2":370000}},{"1":51208,"2":370,"3":{"2":370000}},{"1":51211,"2":370,"3":{"2":370000}},{"1":51128,"2":370,"3":{"2":370000}},{"1":51270,"2":370,"3":{"2":370000}},{"1":50466,"2":360,"3":{"2":360000}},{"1":50461,"2":360,"3":{"2":360000}},{"1":50559,"2":360,"3":{"2":360000}},{"1":50482,"2":360,"3":{"2":360000}},{"1":50607,"2":360,"3":{"2":360000}},{"1":50487,"2":360,"3":{"2":360000}},{"1":50487,"2":360,"3":{"2":360000}},{"1":50464,"2":360,"3":{"2":360000}},{"1":50491,"2":360,"3":{"2":360000}},{"1":50530,"2":360,"3":{"2":360000}}]},
- {"1":{"1":4,"2":{"1":200,"5":10},"3":20,"4":50},"2":[{"1":50094,"2":180,"3":{"2":360000}},{"1":52809,"2":190,"3":{"2":380000}},{"1":50090,"2":180,"3":{"2":360000}},{"1":50176,"2":180,"3":{"2":360000}},{"1":50081,"2":180,"3":{"2":360000}},{"1":50031,"2":180,"3":{"2":360000}},{"1":50141,"2":180,"3":{"2":360000}},{"1":50084,"2":180,"3":{"2":360000}},{"1":50088,"2":180,"3":{"2":360000}},{"1":50150,"2":180,"3":{"2":360000}},{"1":50724,"2":180,"3":{"2":360000}},{"1":50763,"2":180,"3":{"2":360000}},{"1":50720,"2":180,"3":{"2":360000}},{"1":50810,"2":180,"3":{"2":360000}},{"1":50800,"2":180,"3":{"2":360000}},{"1":50686,"2":180,"3":{"2":360000}},{"1":50739,"2":180,"3":{"2":360000}},{"1":50780,"2":180,"3":{"2":360000}},{"1":50669,"2":180,"3":{"2":360000}},{"1":50666,"2":180,"3":{"2":360000}}]},
- {"1":{"1":5,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50267,"2":840,"3":{"4":84000}},{"1":50005,"2":850,"3":{"4":85000}},{"1":50443,"2":860,"3":{"4":86000}},{"1":50429,"2":860,"3":{"4":86000}},{"1":50513,"2":860,"3":{"4":86000}},{"1":50237,"2":850,"3":{"4":85000}},{"1":50571,"2":860,"3":{"4":86000}},{"1":50552,"2":860,"3":{"4":86000}},{"1":50015,"2":850,"3":{"4":85000}},{"1":50574,"2":860,"3":{"4":86000}},{"1":50182,"2":850,"3":{"4":85000}},{"1":50343,"2":850,"3":{"4":85000}},{"1":50285,"2":850,"3":{"4":85000}},{"1":50305,"2":850,"3":{"4":85000}},{"1":50247,"2":850,"3":{"4":85000}},{"1":50305,"2":850,"3":{"4":85000}},{"1":50200,"2":840,"3":{"4":84000}},{"1":50298,"2":850,"3":{"4":85000}},{"1":50313,"2":850,"3":{"4":85000}},{"1":50267,"2":850,"3":{"4":85000}}]},
- {"1":{"1":5,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50343,"2":650,"3":{"4":130000}},{"1":50282,"2":650,"3":{"4":130000}},{"1":50382,"2":650,"3":{"4":130000}},{"1":50389,"2":650,"3":{"4":130000}},{"1":50374,"2":650,"3":{"4":130000}},{"1":50448,"2":650,"3":{"4":130000}},{"1":50447,"2":650,"3":{"4":130000}},{"1":50401,"2":650,"3":{"4":130000}},{"1":50348,"2":650,"3":{"4":130000}},{"1":50286,"2":650,"3":{"4":130000}},{"1":50614,"2":650,"3":{"4":130000}},{"1":50597,"2":650,"3":{"4":130000}},{"1":50579,"2":650,"3":{"4":130000}},{"1":50575,"2":650,"3":{"4":130000}},{"1":50717,"2":650,"3":{"4":130000}},{"1":50583,"2":650,"3":{"4":130000}},{"1":50562,"2":650,"3":{"4":130000}},{"1":50572,"2":650,"3":{"4":130000}},{"1":50582,"2":650,"3":{"4":130000}},{"1":50569,"2":650,"3":{"4":130000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52621,"2":200,"3":{"4":200000}},{"1":50035,"2":190,"3":{"4":190000}},{"1":50109,"2":190,"3":{"4":190000}},{"1":50001,"2":190,"3":{"4":190000}},{"1":50010,"2":190,"3":{"4":190000}},{"1":50136,"2":190,"3":{"4":190000}},{"1":50014,"2":190,"3":{"4":190000}},{"1":52487,"2":200,"3":{"4":200000}},{"1":52615,"2":200,"3":{"4":200000}},{"1":52583,"2":200,"3":{"4":200000}},{"1":50216,"2":190,"3":{"4":190000}},{"1":50073,"2":190,"3":{"4":190000}},{"1":50182,"2":190,"3":{"4":190000}},{"1":50160,"2":190,"3":{"4":190000}},{"1":50263,"2":190,"3":{"4":190000}},{"1":50142,"2":190,"3":{"4":190000}},{"1":50139,"2":190,"3":{"4":190000}},{"1":50244,"2":190,"3":{"4":190000}},{"1":50199,"2":190,"3":{"4":190000}},{"1":50127,"2":190,"3":{"4":190000}}]},
- {"1":{"1":5,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52489,"2":100,"3":{"4":200000}},{"1":52578,"2":100,"3":{"4":200000}},{"1":52576,"2":100,"3":{"4":200000}},{"1":52683,"2":100,"3":{"4":200000}},{"1":52618,"2":100,"3":{"4":200000}},{"1":52571,"2":100,"3":{"4":200000}},{"1":52649,"2":100,"3":{"4":200000}},{"1":52565,"2":100,"3":{"4":200000}},{"1":52623,"2":100,"3":{"4":200000}},{"1":52666,"2":100,"3":{"4":200000}},{"1":52786,"2":100,"3":{"4":200000}},{"1":52770,"2":100,"3":{"4":200000}},{"1":52663,"2":100,"3":{"4":200000}},{"1":53093,"2":100,"3":{"4":200000}},{"1":52770,"2":100,"3":{"4":200000}},{"1":52743,"2":100,"3":{"4":200000}},{"1":52993,"2":100,"3":{"4":200000}},{"1":52749,"2":100,"3":{"4":200000}},{"1":52694,"2":100,"3":{"4":200000}},{"1":52903,"2":100,"3":{"4":200000}}]},
- {"1":{"1":5,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":54298,"2":100,"3":{"4":100000}},{"1":54265,"2":100,"3":{"4":100000}},{"1":54276,"2":100,"3":{"4":100000}},{"1":54285,"2":100,"3":{"4":100000}},{"1":54277,"2":100,"3":{"4":100000}},{"1":54222,"2":100,"3":{"4":100000}},{"1":54264,"2":100,"3":{"4":100000}},{"1":54284,"2":100,"3":{"4":100000}},{"1":54297,"2":100,"3":{"4":100000}},{"1":54292,"2":100,"3":{"4":100000}},{"1":54384,"2":100,"3":{"4":100000}},{"1":54372,"2":100,"3":{"4":100000}},{"1":54376,"2":100,"3":{"4":100000}},{"1":54388,"2":100,"3":{"4":100000}},{"1":54384,"2":100,"3":{"4":100000}},{"1":54372,"2":100,"3":{"4":100000}},{"1":54347,"2":100,"3":{"4":100000}},{"1":54334,"2":100,"3":{"4":100000}},{"1":54380,"2":100,"3":{"4":100000}},{"1":54373,"2":100,"3":{"4":100000}}]},
- {"1":{"1":6,"2":{"1":100,"6":1,"8":10},"3":20,"4":50},"2":[{"1":50660,"2":720,"3":{"4":72000}},{"1":50101,"2":720,"3":{"4":72000}},{"1":50133,"2":720,"3":{"4":72000}},{"1":50635,"2":730,"3":{"4":73000}},{"1":50675,"2":730,"3":{"4":73000}},{"1":50007,"2":720,"3":{"4":72000}},{"1":50039,"2":720,"3":{"4":72000}},{"1":50644,"2":730,"3":{"4":73000}},{"1":50612,"2":730,"3":{"4":73000}},{"1":50058,"2":720,"3":{"4":72000}},{"1":50185,"2":720,"3":{"4":72000}},{"1":50328,"2":720,"3":{"4":72000}},{"1":50320,"2":720,"3":{"4":72000}},{"1":50269,"2":720,"3":{"4":72000}},{"1":50290,"2":720,"3":{"4":72000}},{"1":50207,"2":720,"3":{"4":72000}},{"1":50221,"2":720,"3":{"4":72000}},{"1":50349,"2":720,"3":{"4":72000}},{"1":50300,"2":720,"3":{"4":72000}},{"1":50284,"2":720,"3":{"4":72000}}]},
- {"1":{"1":6,"2":{"1":100,"6":2,"8":10},"3":20,"4":50},"2":[{"1":50050,"2":630,"3":{"4":126000}},{"1":50761,"2":640,"3":{"4":128000}},{"1":50037,"2":630,"3":{"4":126000}},{"1":50119,"2":630,"3":{"4":126000}},{"1":50790,"2":640,"3":{"4":128000}},{"1":50038,"2":630,"3":{"4":126000}},{"1":50772,"2":640,"3":{"4":128000}},{"1":50038,"2":630,"3":{"4":126000}},{"1":50743,"2":640,"3":{"4":128000}},{"1":50051,"2":630,"3":{"4":126000}},{"1":50285,"2":630,"3":{"4":126000}},{"1":50251,"2":630,"3":{"4":126000}},{"1":50261,"2":630,"3":{"4":126000}},{"1":50273,"2":630,"3":{"4":126000}},{"1":50267,"2":630,"3":{"4":126000}},{"1":50213,"2":630,"3":{"4":126000}},{"1":50316,"2":630,"3":{"4":126000}},{"1":50230,"2":630,"3":{"4":126000}},{"1":50321,"2":630,"3":{"4":126000}},{"1":50230,"2":630,"3":{"4":126000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":10},"3":20,"4":50},"2":[{"1":50696,"2":290,"3":{"4":290000}},{"1":50616,"2":290,"3":{"4":290000}},{"1":50735,"2":290,"3":{"4":290000}},{"1":50708,"2":290,"3":{"4":290000}},{"1":50634,"2":290,"3":{"4":290000}},{"1":50683,"2":290,"3":{"4":290000}},{"1":50770,"2":290,"3":{"4":290000}},{"1":50680,"2":290,"3":{"4":290000}},{"1":50689,"2":290,"3":{"4":290000}},{"1":50732,"2":290,"3":{"4":290000}},{"1":50784,"2":290,"3":{"4":290000}},{"1":50862,"2":290,"3":{"4":290000}},{"1":50704,"2":290,"3":{"4":290000}},{"1":51028,"2":290,"3":{"4":290000}},{"1":50817,"2":290,"3":{"4":290000}},{"1":50814,"2":290,"3":{"4":290000}},{"1":50710,"2":290,"3":{"4":290000}},{"1":50829,"2":290,"3":{"4":290000}},{"1":50912,"2":290,"3":{"4":290000}},{"1":50764,"2":290,"3":{"4":290000}}]},
- {"1":{"1":6,"2":{"1":200,"6":10,"8":10},"3":20,"4":50},"2":[{"1":52205,"2":150,"3":{"4":300000}},{"1":52159,"2":150,"3":{"4":300000}},{"1":52216,"2":150,"3":{"4":300000}},{"1":52500,"2":150,"3":{"4":300000}},{"1":52198,"2":150,"3":{"4":300000}},{"1":52153,"2":150,"3":{"4":300000}},{"1":52168,"2":150,"3":{"4":300000}},{"1":52212,"2":150,"3":{"4":300000}},{"1":52191,"2":150,"3":{"4":300000}},{"1":52051,"2":150,"3":{"4":300000}},{"1":52137,"2":150,"3":{"4":300000}},{"1":52349,"2":150,"3":{"4":300000}},{"1":52322,"2":150,"3":{"4":300000}},{"1":52271,"2":150,"3":{"4":300000}},{"1":52159,"2":150,"3":{"4":300000}},{"1":52334,"2":150,"3":{"4":300000}},{"1":52290,"2":150,"3":{"4":300000}},{"1":52316,"2":150,"3":{"4":300000}},{"1":52241,"2":150,"3":{"4":300000}},{"1":52316,"2":150,"3":{"4":300000}}]},
- {"1":{"1":6,"2":{"1":100,"6":10,"8":100},"3":20,"4":50},"2":[{"1":50129,"2":110,"3":{"4":110000}},{"1":50085,"2":110,"3":{"4":110000}},{"1":50309,"2":110,"3":{"4":110000}},{"1":50097,"2":110,"3":{"4":110000}},{"1":50324,"2":110,"3":{"4":110000}},{"1":50089,"2":110,"3":{"4":110000}},{"1":50265,"2":110,"3":{"4":110000}},{"1":50275,"2":110,"3":{"4":110000}},{"1":50079,"2":110,"3":{"4":110000}},{"1":50291,"2":110,"3":{"4":110000}},{"1":50082,"2":110,"3":{"4":110000}},{"1":50548,"2":110,"3":{"4":110000}},{"1":50205,"2":110,"3":{"4":110000}},{"1":50073,"2":110,"3":{"4":110000}},{"1":50490,"2":110,"3":{"4":110000}},{"1":50075,"2":110,"3":{"4":110000}},{"1":50011,"2":110,"3":{"4":110000}},{"1":50105,"2":110,"3":{"4":110000}},{"1":50090,"2":110,"3":{"4":110000}},{"1":50368,"2":110,"3":{"4":110000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/head/props_chrome.pb.json b/benchmark/data/skybrian5/head/props_chrome.pb.json
deleted file mode 100644
index f5352d4..0000000
--- a/benchmark/data/skybrian5/head/props_chrome.pb.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "2": "/props.html",
- "10": {
- "1": "skybrian5",
- "10": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36",
- "20": false,
- "21": false
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+6"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50410,"2":12300,"3":{"4":1230000}},{"1":50115,"2":12400,"3":{"4":1240000}},{"1":50230,"2":12400,"3":{"4":1240000}},{"1":50015,"2":12400,"3":{"4":1240000}},{"1":50240,"2":12300,"3":{"4":1230000}},{"1":50360,"2":12400,"3":{"4":1240000}},{"1":50380,"2":12300,"3":{"4":1230000}},{"1":50160,"2":12100,"3":{"4":1210000}},{"1":50120,"2":12200,"3":{"4":1220000}},{"1":50200,"2":12400,"3":{"4":1240000}},{"1":50150,"2":12300,"3":{"4":1230000}},{"1":50370,"2":12500,"3":{"4":1250000}},{"1":50100,"2":12400,"3":{"4":1240000}},{"1":50230,"2":12400,"3":{"4":1240000}},{"1":50300,"2":12500,"3":{"4":1250000}},{"1":50310,"2":12500,"3":{"4":1250000}},{"1":50285,"2":11900,"3":{"4":1190000}},{"1":50350,"2":12500,"3":{"4":1250000}},{"1":50355,"2":12300,"3":{"4":1230000}},{"1":50170,"2":12400,"3":{"4":1240000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50105,"2":23400,"3":{"4":2340000}},{"1":50105,"2":23400,"3":{"4":2340000}},{"1":50115,"2":23500,"3":{"4":2350000}},{"1":50045,"2":23600,"3":{"4":2360000}},{"1":50010,"2":23400,"3":{"4":2340000}},{"1":50110,"2":23500,"3":{"4":2350000}},{"1":50050,"2":23200,"3":{"4":2320000}},{"1":50165,"2":23600,"3":{"4":2360000}},{"1":50145,"2":23300,"3":{"4":2330000}},{"1":50165,"2":23500,"3":{"4":2350000}},{"1":50110,"2":23500,"3":{"4":2350000}},{"1":50045,"2":23500,"3":{"4":2350000}},{"1":50155,"2":23500,"3":{"4":2350000}},{"1":50175,"2":23300,"3":{"4":2330000}},{"1":50050,"2":23500,"3":{"4":2350000}},{"1":50070,"2":23500,"3":{"4":2350000}},{"1":50135,"2":23500,"3":{"4":2350000}},{"1":50140,"2":23500,"3":{"4":2350000}},{"1":50085,"2":23500,"3":{"4":2350000}},{"1":50015,"2":23300,"3":{"4":2330000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50200,"2":19300,"3":{"5":1930000}},{"1":50095,"2":19900,"3":{"5":1990000}},{"1":50145,"2":20200,"3":{"5":2020000}},{"1":50020,"2":20100,"3":{"5":2010000}},{"1":50020,"2":19800,"3":{"5":1980000}},{"1":50020,"2":20100,"3":{"5":2010000}},{"1":50220,"2":20100,"3":{"5":2010000}},{"1":50015,"2":20100,"3":{"5":2010000}},{"1":50175,"2":20100,"3":{"5":2010000}},{"1":50180,"2":20100,"3":{"5":2010000}},{"1":50005,"2":19900,"3":{"5":1990000}},{"1":50215,"2":20100,"3":{"5":2010000}},{"1":50210,"2":20100,"3":{"5":2010000}},{"1":50140,"2":19800,"3":{"5":1980000}},{"1":50145,"2":20100,"3":{"5":2010000}},{"1":50185,"2":20100,"3":{"5":2010000}},{"1":50090,"2":16100,"3":{"5":1610000}},{"1":50170,"2":20000,"3":{"5":2000000}},{"1":50045,"2":19800,"3":{"5":1980000}},{"1":50015,"2":20200,"3":{"5":2020000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50215,"2":20200,"3":{"5":2020000}},{"1":50030,"2":20100,"3":{"5":2010000}},{"1":50150,"2":20200,"3":{"5":2020000}},{"1":50225,"2":20200,"3":{"5":2020000}},{"1":50090,"2":19900,"3":{"5":1990000}},{"1":50230,"2":20100,"3":{"5":2010000}},{"1":50125,"2":20000,"3":{"5":2000000}},{"1":50020,"2":20100,"3":{"5":2010000}},{"1":50085,"2":20100,"3":{"5":2010000}},{"1":50090,"2":20100,"3":{"5":2010000}},{"1":50105,"2":20100,"3":{"5":2010000}},{"1":50130,"2":20100,"3":{"5":2010000}},{"1":50145,"2":20000,"3":{"5":2000000}},{"1":50130,"2":19900,"3":{"5":1990000}},{"1":50080,"2":20000,"3":{"5":2000000}},{"1":50095,"2":20100,"3":{"5":2010000}},{"1":50055,"2":20200,"3":{"5":2020000}},{"1":50025,"2":20100,"3":{"5":2010000}},{"1":50075,"2":19600,"3":{"5":1960000}},{"1":50030,"2":20200,"3":{"5":2020000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50000,"2":24700,"3":{"4":2470000}},{"1":50185,"2":25900,"3":{"4":2590000}},{"1":50025,"2":25900,"3":{"4":2590000}},{"1":50080,"2":25900,"3":{"4":2590000}},{"1":50175,"2":25800,"3":{"4":2580000}},{"1":50080,"2":25700,"3":{"4":2570000}},{"1":50140,"2":25300,"3":{"4":2530000}},{"1":50070,"2":25800,"3":{"4":2580000}},{"1":50085,"2":25900,"3":{"4":2590000}},{"1":50130,"2":25900,"3":{"4":2590000}},{"1":50145,"2":25900,"3":{"4":2590000}},{"1":50020,"2":25900,"3":{"4":2590000}},{"1":50190,"2":25900,"3":{"4":2590000}},{"1":50015,"2":25800,"3":{"4":2580000}},{"1":50060,"2":25900,"3":{"4":2590000}},{"1":50050,"2":25400,"3":{"4":2540000}},{"1":50045,"2":25900,"3":{"4":2590000}},{"1":50135,"2":25800,"3":{"4":2580000}},{"1":50155,"2":25900,"3":{"4":2590000}},{"1":50000,"2":25500,"3":{"4":2550000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50025,"2":24000,"3":{"4":2400000}},{"1":50050,"2":25100,"3":{"4":2510000}},{"1":50030,"2":25100,"3":{"4":2510000}},{"1":50075,"2":25000,"3":{"4":2500000}},{"1":50135,"2":25000,"3":{"4":2500000}},{"1":50080,"2":24900,"3":{"4":2490000}},{"1":50040,"2":24600,"3":{"4":2460000}},{"1":50025,"2":24900,"3":{"4":2490000}},{"1":50000,"2":25000,"3":{"4":2500000}},{"1":50020,"2":24700,"3":{"4":2470000}},{"1":50000,"2":24900,"3":{"4":2490000}},{"1":50060,"2":24900,"3":{"4":2490000}},{"1":50050,"2":25000,"3":{"4":2500000}},{"1":50060,"2":25000,"3":{"4":2500000}},{"1":50045,"2":25000,"3":{"4":2500000}},{"1":50030,"2":24600,"3":{"4":2460000}},{"1":50015,"2":25100,"3":{"4":2510000}},{"1":50190,"2":24900,"3":{"4":2490000}},{"1":50110,"2":25100,"3":{"4":2510000}},{"1":50145,"2":24800,"3":{"4":2480000}}]}
- ]
-}
diff --git a/benchmark/data/skybrian5/head/props_vm.pb.json b/benchmark/data/skybrian5/head/props_vm.pb.json
deleted file mode 100644
index bfd5d68..0000000
--- a/benchmark/data/skybrian5/head/props_vm.pb.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "1": 2,
- "2": "Done",
- "3": {
- "1": "props_vm.dart",
- "10": {
- "1": "skybrian5",
- "2": 1,
- "3": "1.12.0 (Mon Aug 31 03:24:52 2015) on \"linux_x64\"",
- "20": false,
- "21": true
- },
- "11": {
- "1": "0.4.2",
- "2": [
- {"1":"analyzer","2":"hosted","3":"0.26.1+6"},
- {"1":"args","2":"hosted","3":"0.13.2"},
- {"1":"async","2":"hosted","3":"1.3.0"},
- {"1":"barback","2":"hosted","3":"0.15.2+7"},
- {"1":"browser","2":"hosted","3":"0.10.0+2"},
- {"1":"charcode","2":"hosted","3":"1.1.0"},
- {"1":"collection","2":"hosted","3":"1.1.3"},
- {"1":"crypto","2":"hosted","3":"0.9.1"},
- {"1":"csslib","2":"hosted","3":"0.12.1"},
- {"1":"fixnum","2":"hosted","3":"0.9.1+2"},
- {"1":"glob","2":"hosted","3":"1.0.5"},
- {"1":"html","2":"hosted","3":"0.12.2"},
- {"1":"http_multi_server","2":"hosted","3":"1.3.2"},
- {"1":"http_parser","2":"hosted","3":"1.0.0"},
- {"1":"logging","2":"hosted","3":"0.11.1+1"},
- {"1":"matcher","2":"hosted","3":"0.12.0+1"},
- {"1":"mime","2":"hosted","3":"0.9.3"},
- {"1":"package_config","2":"hosted","3":"0.1.3"},
- {"1":"path","2":"hosted","3":"1.3.6"},
- {"1":"plugin","2":"hosted","3":"0.1.0"},
- {"1":"pool","2":"hosted","3":"1.1.0"},
- {"1":"protobuf"},
- {"1":"description","2":"path","3":"0.4.2","4":"../dart-protobuf"},
- {"1":"pub_semver","2":"hosted","3":"1.2.2"},
- {"1":"shelf","2":"hosted","3":"0.6.3"},
- {"1":"shelf_static","2":"hosted","3":"0.2.3+1"},
- {"1":"shelf_web_socket","2":"hosted","3":"0.0.1+4"},
- {"1":"source_map_stack_trace","2":"hosted","3":"1.0.4"},
- {"1":"source_maps","2":"hosted","3":"0.10.1"},
- {"1":"source_span","2":"hosted","3":"1.2.0"},
- {"1":"stack_trace","2":"hosted","3":"1.4.2"},
- {"1":"string_scanner","2":"hosted","3":"0.1.4"},
- {"1":"test","2":"hosted","3":"0.12.4+9"},
- {"1":"utf","2":"hosted","3":"0.9.0+2"},
- {"1":"watcher","2":"hosted","3":"0.9.7"}
- ]
- }
- },
- "4": [
- {"1":{"1":20,"2":{"1":10},"3":20,"4":50},"2":[{"1":50131,"2":14500,"3":{"4":1450000}},{"1":50300,"2":14700,"3":{"4":1470000}},{"1":50297,"2":14700,"3":{"4":1470000}},{"1":50118,"2":14600,"3":{"4":1460000}},{"1":50249,"2":14700,"3":{"4":1470000}},{"1":50255,"2":14700,"3":{"4":1470000}},{"1":50266,"2":14700,"3":{"4":1470000}},{"1":50276,"2":14700,"3":{"4":1470000}},{"1":50275,"2":14700,"3":{"4":1470000}},{"1":50302,"2":14700,"3":{"4":1470000}},{"1":50019,"2":14500,"3":{"4":1450000}},{"1":50100,"2":14500,"3":{"4":1450000}},{"1":50035,"2":14500,"3":{"4":1450000}},{"1":50025,"2":14500,"3":{"4":1450000}},{"1":50342,"2":14600,"3":{"4":1460000}},{"1":50005,"2":14500,"3":{"4":1450000}},{"1":50001,"2":14500,"3":{"4":1450000}},{"1":50003,"2":14500,"3":{"4":1450000}},{"1":50043,"2":14500,"3":{"4":1450000}},{"1":50002,"2":14500,"3":{"4":1450000}}]},
- {"1":{"1":20,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50021,"2":179700,"3":{"4":17970000}},{"1":50014,"2":178000,"3":{"4":17800000}},{"1":50002,"2":181900,"3":{"4":18190000}},{"1":50000,"2":181400,"3":{"4":18140000}},{"1":50003,"2":181900,"3":{"4":18190000}},{"1":50005,"2":181900,"3":{"4":18190000}},{"1":50015,"2":181700,"3":{"4":18170000}},{"1":50020,"2":182000,"3":{"4":18200000}},{"1":50026,"2":181900,"3":{"4":18190000}},{"1":50011,"2":181600,"3":{"4":18160000}},{"1":50025,"2":181500,"3":{"4":18150000}},{"1":50020,"2":181800,"3":{"4":18180000}},{"1":50017,"2":182600,"3":{"4":18260000}},{"1":50008,"2":182600,"3":{"4":18260000}},{"1":50003,"2":182400,"3":{"4":18240000}},{"1":50024,"2":182600,"3":{"4":18260000}},{"1":50011,"2":182600,"3":{"4":18260000}},{"1":50025,"2":182000,"3":{"4":18200000}},{"1":50017,"2":182600,"3":{"4":18260000}},{"1":50016,"2":182400,"3":{"4":18240000}}]},
- {"1":{"1":21,"2":{"1":10},"3":20,"4":50},"2":[{"1":50022,"2":67700,"3":{"5":6770000}},{"1":50061,"2":68300,"3":{"5":6830000}},{"1":50044,"2":68300,"3":{"5":6830000}},{"1":50035,"2":68500,"3":{"5":6850000}},{"1":50016,"2":68400,"3":{"5":6840000}},{"1":50024,"2":68500,"3":{"5":6850000}},{"1":50012,"2":67800,"3":{"5":6780000}},{"1":50073,"2":68600,"3":{"5":6860000}},{"1":50040,"2":68500,"3":{"5":6850000}},{"1":50019,"2":68500,"3":{"5":6850000}},{"1":50045,"2":68500,"3":{"5":6850000}},{"1":50053,"2":68500,"3":{"5":6850000}},{"1":50036,"2":68200,"3":{"5":6820000}},{"1":50030,"2":68200,"3":{"5":6820000}},{"1":50032,"2":68200,"3":{"5":6820000}},{"1":50032,"2":67900,"3":{"5":6790000}},{"1":50011,"2":68000,"3":{"5":6800000}},{"1":50056,"2":68100,"3":{"5":6810000}},{"1":50072,"2":68100,"3":{"5":6810000}},{"1":50070,"2":68100,"3":{"5":6810000}}]},
- {"1":{"1":21,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50013,"2":68400,"3":{"5":6840000}},{"1":50029,"2":68400,"3":{"5":6840000}},{"1":50050,"2":68400,"3":{"5":6840000}},{"1":50029,"2":68000,"3":{"5":6800000}},{"1":50002,"2":68300,"3":{"5":6830000}},{"1":50013,"2":68300,"3":{"5":6830000}},{"1":50013,"2":68300,"3":{"5":6830000}},{"1":50072,"2":68400,"3":{"5":6840000}},{"1":50032,"2":68300,"3":{"5":6830000}},{"1":50013,"2":68300,"3":{"5":6830000}},{"1":50028,"2":67900,"3":{"5":6790000}},{"1":50040,"2":67900,"3":{"5":6790000}},{"1":50020,"2":68100,"3":{"5":6810000}},{"1":50041,"2":68300,"3":{"5":6830000}},{"1":50004,"2":68300,"3":{"5":6830000}},{"1":50018,"2":68300,"3":{"5":6830000}},{"1":50018,"2":68100,"3":{"5":6810000}},{"1":50042,"2":68000,"3":{"5":6800000}},{"1":50023,"2":68100,"3":{"5":6810000}},{"1":50065,"2":68000,"3":{"5":6800000}}]},
- {"1":{"1":22,"2":{"1":10},"3":20,"4":50},"2":[{"1":50008,"2":223900,"3":{"4":22390000}},{"1":50219,"2":226200,"3":{"4":22620000}},{"1":50018,"2":227100,"3":{"4":22710000}},{"1":50008,"2":227100,"3":{"4":22710000}},{"1":50016,"2":227600,"3":{"4":22760000}},{"1":50001,"2":227500,"3":{"4":22750000}},{"1":50001,"2":227600,"3":{"4":22760000}},{"1":50000,"2":227500,"3":{"4":22750000}},{"1":50017,"2":227200,"3":{"4":22720000}},{"1":50006,"2":227100,"3":{"4":22710000}},{"1":50020,"2":227400,"3":{"4":22740000}},{"1":50007,"2":227300,"3":{"4":22730000}},{"1":50000,"2":227200,"3":{"4":22720000}},{"1":50011,"2":227700,"3":{"4":22770000}},{"1":50000,"2":227200,"3":{"4":22720000}},{"1":50007,"2":227100,"3":{"4":22710000}},{"1":50010,"2":227900,"3":{"4":22790000}},{"1":50015,"2":227600,"3":{"4":22760000}},{"1":50009,"2":228000,"3":{"4":22800000}},{"1":50021,"2":227900,"3":{"4":22790000}}]},
- {"1":{"1":22,"2":{"1":10,"9":"x"},"3":20,"4":50},"2":[{"1":50020,"2":209400,"3":{"4":20940000}},{"1":50005,"2":211800,"3":{"4":21180000}},{"1":50019,"2":211500,"3":{"4":21150000}},{"1":50006,"2":197000,"3":{"4":19700000}},{"1":50013,"2":211500,"3":{"4":21150000}},{"1":50018,"2":211500,"3":{"4":21150000}},{"1":50005,"2":211500,"3":{"4":21150000}},{"1":50013,"2":211600,"3":{"4":21160000}},{"1":50009,"2":211000,"3":{"4":21100000}},{"1":50006,"2":211400,"3":{"4":21140000}},{"1":50018,"2":211500,"3":{"4":21150000}},{"1":50017,"2":210800,"3":{"4":21080000}},{"1":50017,"2":209600,"3":{"4":20960000}},{"1":50004,"2":209600,"3":{"4":20960000}},{"1":50021,"2":209600,"3":{"4":20960000}},{"1":50018,"2":209300,"3":{"4":20930000}},{"1":50023,"2":209800,"3":{"4":20980000}},{"1":50002,"2":209600,"3":{"4":20960000}},{"1":50023,"2":209700,"3":{"4":20970000}},{"1":50019,"2":209800,"3":{"4":20980000}}]}
- ]
-}
diff --git a/benchmark/lib/benchmark.dart b/benchmark/lib/benchmark.dart
deleted file mode 100644
index 81e249c..0000000
--- a/benchmark/lib/benchmark.dart
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark;
-
-import 'generated/benchmark.pb.dart' as pb;
-
-typedef Benchmark CreateBenchmarkFunc(pb.Request request);
-
-// Describes how to construct a benchmark.
-class BenchmarkType {
- final pb.BenchmarkID id;
- final CreateBenchmarkFunc create;
- const BenchmarkType(this.id, this.create);
-}
-
-abstract class Profiler {
- void startProfile(pb.Request request);
- void endProfile(pb.Sample s);
-}
-
-/// A benchmark that also reports the counts for various operations.
-/// (A modification of BenchmarkBase from the benchmark_harness library.)
-abstract class Benchmark {
- static const int _DEFAULT_REPS = 10;
-
- final pb.BenchmarkID id;
- Benchmark(this.id);
-
- String get summary => id.name;
-
- pb.Request makeRequest(
- [Duration duration = const Duration(milliseconds: 50),
- int samples = 20]) =>
- new pb.Request()
- ..id = id
- ..params = makeParams()
- ..duration = duration.inMilliseconds
- ..samples = samples;
-
- pb.Params makeParams();
-
- /// Runs a benchmark for the requested number of times.
- ///
- /// The length of each iterator is the number of [samples]
- /// requested. If you create more than one iterator, each
- /// iterator runs benchmarks independently and will return
- /// different samples.
- ///
- /// If a [profiler] is provided, it will be used for one extra sample.
- /// (Not included in results.)
- Iterable<pb.Sample> measure(pb.Request r, int samples,
- {Profiler profiler}) sync* {
- checkRequest(r);
-
- int sampleMillis = r.duration;
- setup();
-
- for (int i = 0; i < samples; i++) {
- yield _measureOnce(sampleMillis);
- }
-
- if (profiler != null) {
- profiler.startProfile(r);
- var s = _measureOnce(sampleMillis);
- profiler.endProfile(s);
- }
-
- teardown();
- }
-
- void checkRequest(pb.Request r) {
- if (r.id != id) {
- throw new ArgumentError("invalid benchmark id: ${r.id}");
- }
- if (r.params != makeParams()) {
- throw new ArgumentError("parameters don't match: ${r.params}");
- }
- }
-
- pb.Sample _measureOnce(int sampleMillis) {
- // Warmup for at least 100ms. Discard result.
- _measureFor(() {
- warmup();
- return 1;
- }, 100);
-
- var sample = _measureFor(exercise, sampleMillis);
- setCounts(sample);
- return sample;
- }
-
- // Lifecycle methods
-
- /// Called before the benchmark runs. (Not measured.)
- void setup() {}
-
- /// Runs a short version of the benchmark. By default invokes [run] once.
- /// (Not measured.)
- void warmup() {
- run();
- }
-
- /// Exercises the code and returns the number of repetitions.
- int exercise() {
- for (int i = 0; i < _DEFAULT_REPS; i++) {
- run();
- }
- return _DEFAULT_REPS;
- }
-
- /// The code being measured.
- void run();
-
- /// Sets any counters in the sample.
- /// (Clears them for the next run if necessary.)
- void setCounts(pb.Sample m) {}
-
- /// Called after the benchmark finishes.
- void teardown() {}
-
- String summarizeResponse(pb.Response r) {
- checkRequest(r.request);
-
- var prefix = summary.padRight(39);
- var sampleCount = r.samples.length.toStringAsFixed(0).padLeft(2);
- var median = measureSample(medianSample(r)).toStringAsFixed(0).padLeft(4);
- var max = measureSample(maxSample(r)).toStringAsFixed(0).padLeft(4);
-
- return "$prefix samples: $sampleCount"
- " median: $median max: $max $measureSampleUnits";
- }
-
- /// Returns the sample with the median measurement.
- pb.Sample medianSample(pb.Response response) {
- if (response == null || response.samples.isEmpty) return null;
- var samples = []..addAll(response.samples);
- samples.sort((a, b) {
- return measureSample(a).compareTo(measureSample(b));
- });
- int index = samples.length ~/ 2;
- return samples[index];
- }
-
- /// Returns the sample with the highest measurement.
- pb.Sample maxSample(pb.Response response) {
- if (response == null) return null;
- pb.Sample best;
- for (var s in response.samples) {
- if (best == null) best = s;
- if (measureSample(best) < measureSample(s)) {
- best = s;
- }
- }
- return best;
- }
-
- double measureSample(pb.Sample s);
-
- String get measureSampleUnits;
-
- @override
- toString() => summary;
-
- /// Measures the average time spent per repetition.
- ///
- /// Executes [runner] repeatedly until [minimumMillis] has been reached.
- /// [runner] should return the number of times it ran the benchmark.
- static pb.Sample _measureFor(Function runner, int minimumMillis) {
- int minimumMicros = minimumMillis * 1000;
- int reps = 0;
- int elapsed = 0;
- Stopwatch watch = new Stopwatch()..start();
- while (elapsed < minimumMicros) {
- reps += runner();
- elapsed = watch.elapsedMicroseconds;
- }
- return new pb.Sample()
- ..duration = elapsed
- ..loopCount = reps
- ..counts = new pb.Counts();
- }
-}
-
-double int32ReadsPerMillisecond(pb.Sample s) {
- if (s == null || !s.counts.hasInt32Reads() || !s.hasDuration()) return 0.0;
- return s.counts.int32Reads * 1000 / s.duration;
-}
-
-double int64ReadsPerMillisecond(pb.Sample s) {
- if (s == null || !s.counts.hasInt64Reads() || !s.hasDuration()) return 0.0;
- return s.counts.int64Reads * 1000 / s.duration;
-}
-
-double stringReadsPerMillisecond(pb.Sample s) {
- if (s == null || !s.counts.hasStringReads() || !s.hasDuration()) return 0.0;
- return s.counts.stringReads * 1000 / s.duration;
-}
-
-double stringWritesPerMillisecond(pb.Sample s) {
- if (s == null || !s.counts.hasStringWrites() || !s.hasDuration()) return 0.0;
- return s.counts.stringWrites * 1000 / s.duration;
-}
diff --git a/benchmark/lib/benchmarks/get_strings.dart b/benchmark/lib/benchmarks/get_strings.dart
deleted file mode 100644
index 94017e4..0000000
--- a/benchmark/lib/benchmarks/get_strings.dart
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.get_strings;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/string_grid.pb.dart' as pb;
-
-/// A benchmark that accesses each value in a grid of string fields.
-class GetStringsBenchmark extends Benchmark {
- static const width = 10;
- final int height;
- final String fillValue; // null means start uninitialized.
- pb.Grid10 grid;
-
- GetStringsBenchmark(this.height, this.fillValue) : super($id);
-
- @override
- get summary {
- var fill = fillValue == null ? "null" : "'$fillValue'";
- return "${id.name}($height x $fill)";
- }
-
- @override
- Params makeParams() {
- var p = new Params()..messageCount = height;
- if (fillValue != null) p.stringValue = fillValue;
- return p;
- }
-
- @override
- void setup() {
- grid = _makeGrid(height, fillValue);
- }
-
- // makes a rectangle where every cell has the same value.
- static pb.Grid10 _makeGrid(int height, String fillValue) {
- var grid = new pb.Grid10();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- if (fillValue != null) {
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- line.setField(tag, fillValue);
- }
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- int exercise() {
- const reps = 100;
- for (int i = 0; i < reps; i++) {
- run();
- }
- return reps;
- }
-
- @override
- void run() {
- if (fillValue == null) {
- _getDefaults();
- } else {
- _getStrings();
- }
- }
-
- void _getDefaults() {
- bool ok = true;
- for (var line in grid.lines) {
- ok = ok && line.cell1.isEmpty;
- ok = ok && line.cell2.isEmpty;
- ok = ok && line.cell3.isEmpty;
- ok = ok && line.cell4.isEmpty;
- ok = ok && line.cell5.isEmpty;
- ok = ok && line.cell6.isEmpty;
- ok = ok && line.cell7.isEmpty;
- ok = ok && line.cell8.isEmpty;
- ok = ok && line.cell9.isEmpty;
- ok = ok && line.cell10.isEmpty;
- }
- if (!ok) throw "failed";
- }
-
- void _getStrings() {
- bool ok = true;
- for (var line in grid.lines) {
- ok = ok && line.cell1.isNotEmpty;
- ok = ok && line.cell2.isNotEmpty;
- ok = ok && line.cell3.isNotEmpty;
- ok = ok && line.cell4.isNotEmpty;
- ok = ok && line.cell5.isNotEmpty;
- ok = ok && line.cell6.isNotEmpty;
- ok = ok && line.cell7.isNotEmpty;
- ok = ok && line.cell8.isNotEmpty;
- ok = ok && line.cell9.isNotEmpty;
- ok = ok && line.cell10.isNotEmpty;
- }
- if (!ok) throw "failed";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.stringReads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => stringReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "string reads/ms";
-
- static const $id = BenchmarkID.GET_STRINGS;
- static final $type = new BenchmarkType($id, $create);
-
- static GetStringsBenchmark $create(Request r) {
- assert(r.params.hasMessageCount());
- var value = null;
- if (r.params.hasStringValue()) value = r.params.stringValue;
- return new GetStringsBenchmark(r.params.messageCount, value);
- }
-}
diff --git a/benchmark/lib/benchmarks/has_strings.dart b/benchmark/lib/benchmarks/has_strings.dart
deleted file mode 100644
index 3b46eee..0000000
--- a/benchmark/lib/benchmarks/has_strings.dart
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.has_strings;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/string_grid.pb.dart' as pb;
-
-/// A benchmark that checks the existence of each item in a grid of strings.
-class HasStringsBenchmark extends Benchmark {
- static const width = 10;
- final int height;
- final String fillValue;
- pb.Grid10 grid;
-
- HasStringsBenchmark(this.height, this.fillValue) : super($id);
-
- @override
- get summary {
- var fill = fillValue == null ? "null" : "'$fillValue'";
- return "${id.name}($height x $fill)";
- }
-
- @override
- Params makeParams() {
- var p = new Params()..messageCount = height;
- if (fillValue != null) p.stringValue = fillValue;
- return p;
- }
-
- @override
- void setup() {
- grid = _makeGrid(width, height, fillValue);
- }
-
- // makes a rectangle where no fields have been set.
- static pb.Grid10 _makeGrid(int width, int height, String fillValue) {
- var grid = new pb.Grid10();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- if (fillValue != null) {
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- line.setField(tag, fillValue);
- }
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- int exercise() {
- const reps = 100;
- for (int i = 0; i < reps; i++) {
- run();
- }
- return reps;
- }
-
- @override
- void run() {
- if (fillValue == null) {
- runEmpty();
- } else {
- runFilled();
- }
- }
-
- void runFilled() {
- var allPresent = true;
- for (var line in grid.lines) {
- allPresent = allPresent && line.hasCell1();
- allPresent = allPresent && line.hasCell2();
- allPresent = allPresent && line.hasCell3();
- allPresent = allPresent && line.hasCell4();
- allPresent = allPresent && line.hasCell5();
- allPresent = allPresent && line.hasCell6();
- allPresent = allPresent && line.hasCell7();
- allPresent = allPresent && line.hasCell8();
- allPresent = allPresent && line.hasCell9();
- allPresent = allPresent && line.hasCell10();
- }
- if (!allPresent) throw "failed";
- }
-
- void runEmpty() {
- var allEmpty = true;
- for (var line in grid.lines) {
- allEmpty = allEmpty && !line.hasCell1();
- allEmpty = allEmpty && !line.hasCell2();
- allEmpty = allEmpty && !line.hasCell3();
- allEmpty = allEmpty && !line.hasCell4();
- allEmpty = allEmpty && !line.hasCell5();
- allEmpty = allEmpty && !line.hasCell6();
- allEmpty = allEmpty && !line.hasCell7();
- allEmpty = allEmpty && !line.hasCell8();
- allEmpty = allEmpty && !line.hasCell9();
- allEmpty = allEmpty && !line.hasCell10();
- }
- if (!allEmpty) throw "failed";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.stringReads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => stringReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "string reads/ms";
-
- static const $id = BenchmarkID.HAS_STRINGS;
- static final $type = new BenchmarkType($id, $create);
-
- static HasStringsBenchmark $create(Request r) {
- assert(r.params.hasMessageCount());
- var value = null;
- if (r.params.hasStringValue()) value = r.params.stringValue;
- return new HasStringsBenchmark(r.params.messageCount, value);
- }
-}
diff --git a/benchmark/lib/benchmarks/index.dart b/benchmark/lib/benchmarks/index.dart
deleted file mode 100644
index ad011ff..0000000
--- a/benchmark/lib/benchmarks/index.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.index;
-
-import "../benchmark.dart";
-
-import "int32_json.dart";
-import "int64_json.dart";
-import "string_json.dart";
-
-import "repeated_int32_json.dart";
-import "repeated_int64_json.dart";
-import "repeated_string_json.dart";
-
-import "get_strings.dart";
-import "set_strings.dart";
-import "has_strings.dart";
-
-import '../generated/benchmark.pb.dart' as pb;
-
-/// Creates the appropriate Benchmark instance for a protobuf.
-Benchmark createBenchmark(pb.Request r) {
- var type = allBenchmarks[r.id];
- if (type == null) {
- throw new ArgumentError("unknown benchmark: ${r.id.name}");
- }
- return type.create(r);
-}
-
-final Map<pb.BenchmarkID, BenchmarkType> allBenchmarks = _makeTypeMap([
- Int32Benchmark.$type,
- Int64Benchmark.$type,
- StringBenchmark.$type,
- RepeatedInt32Benchmark.$type,
- RepeatedInt64Benchmark.$type,
- RepeatedStringBenchmark.$type,
- GetStringsBenchmark.$type,
- SetStringsBenchmark.$type,
- HasStringsBenchmark.$type,
-]);
-
-Map<pb.BenchmarkID, BenchmarkType> _makeTypeMap(List<BenchmarkType> types) {
- var out = <pb.BenchmarkID, BenchmarkType>{};
- for (var type in types) {
- if (out.containsKey(type.id)) {
- throw "already added: $type.id.name";
- }
- out[type.id] = type;
- }
- return new Map.unmodifiable(out);
-}
diff --git a/benchmark/lib/benchmarks/int32_json.dart b/benchmark/lib/benchmarks/int32_json.dart
deleted file mode 100644
index 5efb61e..0000000
--- a/benchmark/lib/benchmarks/int32_json.dart
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.int32_json;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/int32grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of int fields.
-class Int32Benchmark extends Benchmark {
- final int width;
- final int height;
- String json;
- int lastFieldTag;
-
- Int32Benchmark(this.width, this.height) : super($id);
-
- @override
- get summary => "${id.name}($width x $height int32s)";
-
- @override
- Params makeParams() => new Params()
- ..int32FieldCount = width
- ..messageCount = height;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height);
- json = grid.writeToJson();
- lastFieldTag = getTagForColumn(new pb.Line10(), width - 1);
- }
-
- // makes a rectangle of the of the form:
- // 0 1 2 3
- // 1 2 3 4
- // 2 3 4 5
- static pb.Grid10 _makeGrid(int width, int height) {
- if (width > 10) throw new ArgumentError("width out of range: ${width}");
- var grid = new pb.Grid10();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- line.setField(tag, x + y);
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- void run() {
- pb.Grid10 grid = new pb.Grid10.fromJson(json);
- var actual = grid.lines[height - 1].getField(lastFieldTag);
- if (actual != width + height - 2) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.int32Reads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => int32ReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "int32 reads/ms";
-
- static const $id = BenchmarkID.READ_INT32_FIELDS_JSON;
- static final $type = new BenchmarkType($id, $create);
-
- static Int32Benchmark $create(Request r) {
- assert(r.params.hasInt32FieldCount());
- assert(r.params.hasMessageCount());
- return new Int32Benchmark(r.params.int32FieldCount, r.params.messageCount);
- }
-}
diff --git a/benchmark/lib/benchmarks/int64_json.dart b/benchmark/lib/benchmarks/int64_json.dart
deleted file mode 100644
index c691749..0000000
--- a/benchmark/lib/benchmarks/int64_json.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.int64_json;
-
-import 'package:fixnum/fixnum.dart' show Int64;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/int64grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of int fields.
-class Int64Benchmark extends Benchmark {
- final int width;
- final int height;
- String json;
- int lastFieldTag;
-
- Int64Benchmark(this.width, this.height) : super($id);
-
- @override
- get summary => "${id.name}($width x $height int64s)";
-
- @override
- Params makeParams() => new Params()
- ..int64FieldCount = width
- ..messageCount = height;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height);
- json = grid.writeToJson();
- lastFieldTag = getTagForColumn(new pb.Line10(), width - 1);
- }
-
- // makes a rectangle of the of the form:
- // 0 1 2 3
- // 1 2 3 4
- // 2 3 4 5
- static pb.Grid10 _makeGrid(int width, int height) {
- if (width > 10) throw new ArgumentError("width out of range: ${width}");
- var grid = new pb.Grid10();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- line.setField(tag, new Int64(x + y));
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- void run() {
- pb.Grid10 grid = new pb.Grid10.fromJson(json);
- var actual = grid.lines[height - 1].getField(lastFieldTag);
- if (actual != width + height - 2) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.int64Reads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => int64ReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "int64 reads/ms";
-
- static const $id = BenchmarkID.READ_INT64_FIELDS_JSON;
- static final $type = new BenchmarkType($id, $create);
-
- static Int64Benchmark $create(Request r) {
- assert(r.params.hasInt64FieldCount());
- assert(r.params.hasMessageCount());
- return new Int64Benchmark(r.params.int64FieldCount, r.params.messageCount);
- }
-}
diff --git a/benchmark/lib/benchmarks/repeated_int32_json.dart b/benchmark/lib/benchmarks/repeated_int32_json.dart
deleted file mode 100644
index cd9fc0d..0000000
--- a/benchmark/lib/benchmarks/repeated_int32_json.dart
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.repeated_int32_json;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/int32grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of repeated ints.
-class RepeatedInt32Benchmark extends Benchmark {
- final int width;
- final int height;
- String json;
-
- RepeatedInt32Benchmark(this.width, this.height) : super($id);
-
- @override
- get summary => "${id.name}($width x $height ints)";
-
- @override
- Params makeParams() => new Params()
- ..int32RepeatCount = width
- ..messageCount = height;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height);
- json = grid.writeToJson();
- }
-
- // makes a rectangle of the of the form:
- // 0 1 2 3
- // 1 2 3 4
- // 2 3 4 5
- static pb.Grid _makeGrid(int width, int height) {
- var grid = new pb.Grid();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line();
- for (int x = 0; x < width; x++) {
- line.cells.add(x + y);
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- @override
- void run() {
- pb.Grid grid = new pb.Grid.fromJson(json);
- var actual = grid.lines[height - 1].cells[width - 1];
- if (actual != width + height - 2) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.int32Reads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => int32ReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "int32 reads/ms";
-
- static const $id = BenchmarkID.READ_INT32_REPEATED_JSON;
- static final $type = new BenchmarkType($id, $create);
- static RepeatedInt32Benchmark $create(Request r) {
- assert(r.params.hasInt32RepeatCount());
- assert(r.params.hasMessageCount());
- return new RepeatedInt32Benchmark(
- r.params.int32RepeatCount, r.params.messageCount);
- }
-}
diff --git a/benchmark/lib/benchmarks/repeated_int64_json.dart b/benchmark/lib/benchmarks/repeated_int64_json.dart
deleted file mode 100644
index 3ad18cd..0000000
--- a/benchmark/lib/benchmarks/repeated_int64_json.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.repeated_int64_json;
-
-import 'package:fixnum/fixnum.dart';
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/int64grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of repeated ints.
-class RepeatedInt64Benchmark extends Benchmark {
- final int width;
- final int height;
- String json;
-
- RepeatedInt64Benchmark(this.width, this.height) : super($id);
-
- @override
- get summary => "${id.name}($width x $height ints)";
-
- @override
- Params makeParams() => new Params()
- ..int64RepeatCount = width
- ..messageCount = height;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height);
- json = grid.writeToJson();
- }
-
- // makes a rectangle of the of the form:
- // 0 1 2 3
- // 1 2 3 4
- // 2 3 4 5
- static pb.Grid _makeGrid(int width, int height) {
- var grid = new pb.Grid();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line();
- for (int x = 0; x < width; x++) {
- line.cells.add(new Int64(x + y));
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- @override
- void run() {
- pb.Grid grid = new pb.Grid.fromJson(json);
- var actual = grid.lines[height - 1].cells[width - 1];
- if (actual != width + height - 2) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.int64Reads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => int64ReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "int64 reads/ms";
-
- static const $id = BenchmarkID.READ_INT64_REPEATED_JSON;
- static final $type = new BenchmarkType($id, $create);
- static RepeatedInt64Benchmark $create(Request r) {
- assert(r.params.hasInt64RepeatCount());
- assert(r.params.hasMessageCount());
- return new RepeatedInt64Benchmark(
- r.params.int64RepeatCount, r.params.messageCount);
- }
-}
diff --git a/benchmark/lib/benchmarks/repeated_string_json.dart b/benchmark/lib/benchmarks/repeated_string_json.dart
deleted file mode 100644
index fbbc4e3..0000000
--- a/benchmark/lib/benchmarks/repeated_string_json.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.repeated_string_json;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/string_grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of string fields.
-class RepeatedStringBenchmark extends Benchmark {
- final int width;
- final int height;
- final int stringSize;
- String json;
- int lastFieldTag;
-
- RepeatedStringBenchmark(this.width, this.height, this.stringSize)
- : super($id);
-
- @override
- get summary => "${id.name}($width x $height x $stringSize)";
-
- @override
- Params makeParams() => new Params()
- ..stringFieldCount = width
- ..messageCount = height
- ..stringSize = stringSize;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height, stringSize);
- json = grid.writeToJson();
- }
-
- // makes a rectangle of the of the form:
- // "01" "12" "23" "34"
- // "12" "23" "34" "45"
- // "23" "34" "45" "56"
- static pb.Grid _makeGrid(int width, int height, int stringSize) {
- if (width > 10) throw new ArgumentError("width out of range: ${width}");
- var grid = new pb.Grid();
-
- int zero = "0".codeUnits[0];
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line();
- for (int x = 0; x < width; x++) {
- var charCodes = <int>[];
- for (var i = 0; i < stringSize; i++) {
- charCodes.add(zero + ((x + y + i) % 10));
- }
- line.cells.add(new String.fromCharCodes(charCodes));
- }
- grid.lines.add(line);
- }
- return grid;
- }
-
- @override
- void run() {
- pb.Grid grid = new pb.Grid.fromJson(json);
- var actual = grid.lines[height - 1].cells[width - 1];
- if (actual.length != stringSize) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.stringReads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => stringReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "string reads/ms";
-
- static const $id = BenchmarkID.READ_STRING_REPEATED_JSON;
- static final $type = new BenchmarkType($id, $create);
-
- static RepeatedStringBenchmark $create(Request r) {
- assert(r.params.hasStringFieldCount());
- assert(r.params.hasMessageCount());
- assert(r.params.hasStringSize());
- return new RepeatedStringBenchmark(
- r.params.stringFieldCount, r.params.messageCount, r.params.stringSize);
- }
-}
diff --git a/benchmark/lib/benchmarks/set_strings.dart b/benchmark/lib/benchmarks/set_strings.dart
deleted file mode 100644
index bf9d349..0000000
--- a/benchmark/lib/benchmarks/set_strings.dart
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.set_strings;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/string_grid.pb.dart' as pb;
-
-/// A benchmark that sets each value in a grid of string fields.
-class SetStringsBenchmark extends Benchmark {
- static const width = 10;
- final int height;
- final String fillValue;
- pb.Grid10 grid;
-
- SetStringsBenchmark(this.height, this.fillValue) : super($id);
-
- @override
- get summary {
- var fill = fillValue == null ? "null" : "'$fillValue'";
- return "${id.name}($height x $fill)";
- }
-
- @override
- Params makeParams() {
- var p = new Params()..messageCount = height;
- if (fillValue != null) p.stringValue = fillValue;
- return p;
- }
-
- @override
- void setup() {
- grid = _makeGrid(width, height, fillValue);
- }
-
- // makes a rectangle where no fields have been set.
- static pb.Grid10 _makeGrid(int width, int height, String fillValue) {
- var grid = new pb.Grid10();
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- if (fillValue != null) {
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- line.setField(tag, fillValue);
- }
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- int exercise() {
- const reps = 100;
- for (int i = 0; i < reps; i++) {
- run();
- }
- return reps;
- }
-
- @override
- void run() {
- var newValue = "";
- for (var line in grid.lines) {
- line.cell1 = newValue;
- line.cell2 = newValue;
- line.cell3 = newValue;
- line.cell4 = newValue;
- line.cell5 = newValue;
- line.cell6 = newValue;
- line.cell7 = newValue;
- line.cell8 = newValue;
- line.cell9 = newValue;
- line.cell10 = newValue;
- }
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.stringWrites = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => stringWritesPerMillisecond(s);
-
- @override
- get measureSampleUnits => "string writes/ms";
-
- static const $id = BenchmarkID.SET_STRINGS;
- static final $type = new BenchmarkType($id, $create);
-
- static SetStringsBenchmark $create(Request r) {
- assert(r.params.hasMessageCount());
- var value = null;
- if (r.params.hasStringValue()) value = r.params.stringValue;
- return new SetStringsBenchmark(r.params.messageCount, value);
- }
-}
diff --git a/benchmark/lib/benchmarks/string_json.dart b/benchmark/lib/benchmarks/string_json.dart
deleted file mode 100644
index acd88d6..0000000
--- a/benchmark/lib/benchmarks/string_json.dart
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.string_json;
-
-import '../benchmark.dart';
-import '../generated/benchmark.pb.dart'
- show BenchmarkID, Request, Params, Sample;
-import '../generated/string_grid.pb.dart' as pb;
-
-/// A benchmark that deserializes a grid of string fields.
-class StringBenchmark extends Benchmark {
- final int width;
- final int height;
- final int stringSize;
- String json;
- int lastFieldTag;
-
- StringBenchmark(this.width, this.height, this.stringSize) : super($id);
-
- @override
- get summary => "${id.name}($width x $height x $stringSize)";
-
- @override
- Params makeParams() => new Params()
- ..stringFieldCount = width
- ..messageCount = height
- ..stringSize = stringSize;
-
- @override
- void setup() {
- var grid = _makeGrid(width, height, stringSize);
- json = grid.writeToJson();
- lastFieldTag = getTagForColumn(new pb.Line10(), width - 1);
- }
-
- // makes a rectangle of the of the form:
- // "01" "12" "23" "34"
- // "12" "23" "34" "45"
- // "23" "34" "45" "56"
- static pb.Grid10 _makeGrid(int width, int height, int stringSize) {
- if (width > 10) throw new ArgumentError("width out of range: ${width}");
- var grid = new pb.Grid10();
-
- int zero = "0".codeUnits[0];
-
- for (int y = 0; y < height; y++) {
- var line = new pb.Line10();
- for (int x = 0; x < width; x++) {
- int tag = getTagForColumn(line, x);
- var charCodes = <int>[];
- for (var i = 0; i < stringSize; i++) {
- charCodes.add(zero + ((x + y + i) % 10));
- }
- line.setField(tag, new String.fromCharCodes(charCodes));
- }
- grid.lines.add(line);
- }
-
- return grid;
- }
-
- static int getTagForColumn(pb.Line10 line, int x) {
- return line.getTagNumber('cell${x + 1}'); // assume x start from 1
- }
-
- @override
- void run() {
- pb.Grid10 grid = new pb.Grid10.fromJson(json);
- var actual = grid.lines[height - 1].getField(lastFieldTag);
- if (actual.length != stringSize) throw "failed; got ${actual}";
- }
-
- @override
- void setCounts(Sample s) {
- s.counts.stringReads = width * height * s.loopCount;
- }
-
- @override
- measureSample(Sample s) => stringReadsPerMillisecond(s);
-
- @override
- get measureSampleUnits => "string reads/ms";
-
- static const $id = BenchmarkID.READ_STRING_FIELDS_JSON;
- static final $type = new BenchmarkType($id, $create);
-
- static StringBenchmark $create(Request r) {
- assert(r.params.hasStringFieldCount());
- assert(r.params.hasMessageCount());
- assert(r.params.hasStringSize());
- return new StringBenchmark(
- r.params.stringFieldCount, r.params.messageCount, r.params.stringSize);
- }
-}
diff --git a/benchmark/lib/dashboard.dart b/benchmark/lib/dashboard.dart
deleted file mode 100644
index 08d2fa7..0000000
--- a/benchmark/lib/dashboard.dart
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.html_runner;
-
-import 'dart:async' show Future;
-import 'dart:convert';
-import 'dart:html';
-import 'dart:js' show context, JsObject;
-
-import 'generated/benchmark.pb.dart' as pb;
-
-import 'benchmark.dart' show Profiler;
-import 'dashboard_model.dart' show DashboardModel, Table, SelectEvent;
-import 'dashboard_view.dart' show DashboardView;
-import 'report.dart' show createPlatform, createPackages;
-import 'suite.dart' show runSuite;
-
-import '../data/index.dart' as data;
-
-/// Displays a dashboard that can be used to run benchmarks.
-Future showDashboard(pb.Suite suite, Element container) async {
- // set up model
-
- var env = await loadBrowserEnv();
- var reports = await loadReports(suite);
-
- var defaultReport = new pb.Report()..env = env;
- var model = new DashboardModel(reports, new Table(suite), defaultReport);
-
- var baseline = chooseBaseline(env, reports);
- if (baseline != null) {
- model = model.withBaseline(baseline);
- }
-
- var view = new DashboardView();
-
- Future render(pb.Report report) async {
- report.env = env;
- model = model.withReport(report);
- await window.animationFrame;
- view.render(model);
- await new Future(() => null); // exit to regular timer task
- }
-
- // Set up the main loop that runs the suite.
-
- bool running = false;
- void runBenchmarks() {
- if (running) return;
- var profiler = new JsProfiler();
- running = true;
- () async {
- var requests = model.table.selections.toList();
- for (pb.Report report in runSuite(requests, profiler: profiler)) {
- await render(report);
- }
- }()
- .whenComplete(() {
- running = false;
- });
- }
-
- // set up event handlers
-
- view.onRunButtonClick.listen((_) => runBenchmarks());
- view.onSelectAllClick.listen((_) {
- model = model.withTable(model.table.withAllSelected());
- view.render(model);
- });
- view.onSelectNoneClick.listen((_) {
- model = model.withTable(model.table.withNoneSelected());
- view.render(model);
- });
-
- view.onMenuChange.listen((String item) {
- model = model.withBaseline(item);
- view.render(model);
- });
-
- view.onSelectionChange.listen((SelectEvent e) {
- model = model.withTable(model.table.withSelection(e.item, e.selected));
- view.render(model);
- });
-
- // show the view
-
- view.render(model);
- container.children.clear();
- container.append(view.elt);
-}
-
-/// Starts and stops the DevTools profiler.
-class JsProfiler implements Profiler {
- static JsObject console = context["console"];
-
- int count = 1;
-
- startProfile(pb.Request request) {
- var label = "$count-${request.id.name}";
- count++;
- console.callMethod("profile", [label]);
- }
-
- endProfile(pb.Sample s) {
- console.callMethod("profileEnd");
- print("profile: $s");
- }
-}
-
-Future<pb.Env> loadBrowserEnv() async {
- const advice = "Run a VM benchmark to create this file.";
- var pubspecYaml = await _loadDataFile(data.pubspecYamlName, advice: advice);
- var pubspecLock = await _loadDataFile(data.pubspecLockName, advice: advice);
- var hostname = await _loadDataFile(data.hostfileName, advice: advice);
-
- var platform = createPlatform()
- ..hostname = hostname
- ..userAgent = window.navigator.userAgent;
-
- return new pb.Env()
- ..page = window.location.pathname
- ..platform = platform
- ..packages = createPackages(pubspecYaml, pubspecLock);
-}
-
-/// Loads all the reports saved to benchmark/data.
-Future<Map<String, pb.Report>> loadReports(pb.Suite suite) async {
- var out = <String, pb.Report>{};
-
- var dataJsonContent = await _loadDataFile('data.json');
- var dataJson = jsonDecode(dataJsonContent) as Map<String, dynamic>;
-
- for (var entry in dataJson.entries) {
- var report = new pb.Report.fromJson(entry.value);
- if (isCompatibleBaseline(suite, report)) {
- out[entry.key] = report;
- }
- }
- print("loaded ${out.length} reports");
- return out;
-}
-
-/// Choose the report to display on the left side for comparison.
-/// Returns null if no comparable report is found.
-String chooseBaseline(pb.Env env, Map<String, pb.Report> reports) {
- for (var name in reports.keys) {
- var candidate = reports[name];
- if (candidate.env.platform == env.platform) {
- return name;
- }
- }
- return null;
-}
-
-/// Returns true if the baseline report used the same benchmarks.
-bool isCompatibleBaseline(pb.Suite suite, pb.Report report) {
- for (int i = 0; i < suite.requests.length; i++) {
- if (i >= report.responses.length) {
- return true; // additional benchmarks ok
- }
- var request = suite.requests[i];
- var response = report.responses[i];
- if (request != response.request) return false;
- }
- return true;
-}
-
-Future<String> _loadDataFile(String name,
- {bool optional = false, String advice}) async {
- try {
- return await HttpRequest.getString("/data/$name");
- } catch (e) {
- if (optional) return null;
- String error = "File is missing in benchmark/data: $name";
- if (advice != null) {
- error += ". $advice";
- }
- throw error;
- }
-}
diff --git a/benchmark/lib/dashboard_model.dart b/benchmark/lib/dashboard_model.dart
deleted file mode 100644
index 289379f..0000000
--- a/benchmark/lib/dashboard_model.dart
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.dashboard_model;
-
-import 'generated/benchmark.pb.dart' as pb;
-
-import 'benchmark.dart' show Benchmark;
-import 'benchmarks/index.dart' show createBenchmark;
-
-/// Contains the viewable state of the dashboard. (Immutable.)
-class DashboardModel {
- final Map<String, pb.Report> savedReports;
- final Table table;
- final pb.Report latest;
-
- DashboardModel(this.savedReports, this.table, this.latest);
-
- DashboardModel withBaseline(String name) {
- var nextTable = table.withBaseline(name, savedReports[name]);
- return new DashboardModel(savedReports, nextTable, latest);
- }
-
- DashboardModel withReport(pb.Report right) =>
- new DashboardModel(savedReports, table, right);
-
- DashboardModel withTable(Table table) =>
- new DashboardModel(savedReports, table, latest);
-
- /// Returns true if the Run button should be enabled.
- bool get canRun => !latest.hasStatus() || latest.status != pb.Status.RUNNING;
-}
-
-/// The parts of the benchmark results table that don't change often.
-class Table {
- final pb.Suite suite;
- final String baseline;
- final pb.Report report;
- final Set<pb.Request> selections;
- final rows = <Row>[];
-
- factory Table(pb.Suite suite) => new Table._raw(
- suite, null, null, new Set<pb.Request>.from(suite.requests));
-
- Table._raw(this.suite, this.baseline, this.report, this.selections) {
- Iterator it = report == null ? [].iterator : report.responses.iterator;
- for (var r in suite.requests) {
- var b = createBenchmark(r);
- pb.Sample baseline;
- if (it.moveNext()) {
- b.checkRequest(it.current.request);
- baseline = b.medianSample(it.current);
- }
- rows.add(new Row(r, b, baseline, selected: this.selections.contains(r)));
- }
- }
-
- Table withBaseline(String baseline, pb.Report report) =>
- new Table._raw(suite, baseline, report, selections);
-
- Table withAllSelected() {
- return new Table._raw(
- suite, baseline, report, new Set<pb.Request>.from(suite.requests));
- }
-
- Table withNoneSelected() {
- return new Table._raw(suite, baseline, report, new Set<pb.Request>());
- }
-
- Table withSelection(pb.Request request, bool selected) {
- var s = new Set<pb.Request>.from(selections);
- if (selected) {
- s.add(request);
- } else {
- s.remove(request);
- }
- return new Table._raw(suite, baseline, report, s);
- }
-}
-
-/// The parts of a row in the benchmark results table that don't change often.
-class Row {
- final pb.Request request;
- final Benchmark benchmark;
- final pb.Sample baseline;
- final bool selected;
- Row(this.request, this.benchmark, this.baseline, {this.selected = true});
-
- /// Returns the response that should be displayed in this row.
- pb.Response findResponse(pb.Report r) {
- for (var candidate in r.responses) {
- if (candidate.request == request) return candidate;
- }
- return null;
- }
-}
-
-// Indicates that the given item was added or removed from a selection.
-class SelectEvent<T> {
- final bool selected;
- final T item;
- SelectEvent(this.selected, [this.item]);
- toString() => "SelectEvent($selected, $item)";
-}
diff --git a/benchmark/lib/dashboard_view.dart b/benchmark/lib/dashboard_view.dart
deleted file mode 100644
index 9b56e64..0000000
--- a/benchmark/lib/dashboard_view.dart
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.html_view;
-
-import 'dart:async' show Stream, StreamController, EventSink;
-import 'dart:html';
-
-import 'generated/benchmark.pb.dart' as pb;
-import 'dashboard_model.dart';
-import 'report.dart' show encodeReport;
-
-/// A dashboard allowing the user to run a benchmark suite and compare the
-/// results to any saved report.
-class DashboardView {
- static const noBaseline = "<none>";
-
- static final _template = new DivElement()
- ..innerHtml = '''
-<div>
- <button class="dv-run"></button>
- <button class="dv-select-all"></button>
- <button class="dv-select-none"></button>
- <span class="dv-status"></span>
-</div>
-<pre class="dv-env"></pre>
-Choose baseline: <select class="dv-menu"></select>
-<table class="dv-table">
-<tr>
- <th></th>
- <th>Benchmark</th>
- <th colspan=5>Samples</th>
-</tr>
-<tr>
- <th colspan=2></th>
- <th>Baseline</th>
- <th>Median</th>
- <th>Max</th>
- <th>Count</th>
- <th>Units</th>
-<tr>
-</table>
-<div class="dv-json"></div>
-''';
-
- final DivElement elt;
-
- final _Button _runButton;
- final _Button _selectAllButton;
- final _Button _selectNoneButton;
- final _Label _status;
- final PreElement _envElt;
- final _Menu _menu;
- final TableElement _responseTable;
- final _JsonView _jsonView;
-
- String _renderedPlatform;
- final rowViews = <_ResponseView>[];
-
- final _selectionChanges =
- new StreamController<SelectEvent<pb.Request>>.broadcast();
-
- DashboardView._raw(
- this.elt,
- this._runButton,
- this._selectAllButton,
- this._selectNoneButton,
- this._status,
- this._envElt,
- this._menu,
- this._responseTable,
- this._jsonView);
-
- factory DashboardView() {
- Element elt = _template.clone(true);
- find(String q) => elt.querySelector(q);
- _Button button(q) => new _Button(find(q));
- label(q) => new _Label(find(q));
- menu(q) => new _Menu(find(q));
- json(q) => new _JsonView(find(q));
- return new DashboardView._raw(
- elt,
- button('.dv-run')
- ..elt.style.color = "#FFFFFF"
- ..elt.style.backgroundColor = "rgb(209, 72, 64)",
- button('.dv-select-all'),
- button('.dv-select-none'),
- label('.dv-status'),
- find('.dv-env'),
- menu('.dv-menu'),
- find('.dv-table'),
- json('.dv-json'));
- }
-
- Stream get onRunButtonClick => _runButton.onClick;
- Stream get onSelectAllClick => _selectAllButton.onClick;
- Stream get onSelectNoneClick => _selectNoneButton.onClick;
- Stream<String> get onMenuChange =>
- _menu.onChange.map((item) => item == noBaseline ? null : item);
- Stream<SelectEvent<pb.Request>> get onSelectionChange =>
- _selectionChanges.stream;
-
- void render(DashboardModel model) {
- _runButton.render("Run", model.canRun);
- _selectAllButton.render("Select All", true);
- _selectNoneButton.render("Select None", true);
- if (!model.latest.hasStatus() || model.latest.status == pb.Status.DONE) {
- _status.render("");
- } else {
- _status.render(model.latest.status.name);
- }
-
- _renderEnv(model.latest);
-
- var items = [noBaseline]..addAll(model.savedReports.keys);
- var selected = model.table.baseline;
- if (selected == null) selected = noBaseline;
- _menu.render(items, model.table.baseline);
-
- _renderResponses(model.table, model.latest);
- _jsonView.render(model.latest);
- }
-
- void _renderEnv(pb.Report r) {
- String newPlatform = r.env.platform.toString();
- if (newPlatform == _renderedPlatform) return;
- _envElt.text = newPlatform;
- _renderedPlatform = newPlatform;
- }
-
- /// Renders a table with one row for each benchmark.
- void _renderResponses(Table table, pb.Report r) {
- var rowIt = table.rows.iterator;
-
- // Update existing rows (we assume the table never shrinks)
- for (var view in rowViews) {
- var hasNext = rowIt.moveNext();
- assert(hasNext);
- view.render(rowIt.current, r, _selectionChanges);
- }
-
- // Add any new rows
- while (rowIt.moveNext()) {
- var row = new _ResponseView()
- ..render(rowIt.current, r, _selectionChanges);
- _responseTable.append(row.elt);
- rowViews.add(row);
- }
- }
-}
-
-/// A single row in the benchmark table.
-///
-/// Displays how many samples were collected and the median and max samples.
-/// Also displays a baseline sample for comparison.
-class _ResponseView {
- final elt = new TableRowElement();
- final _selected = new _Checkbox<pb.Request>();
- final _summary = new _Label(new TableCellElement());
- final _baseline = new _SampleView();
- final _median = new _SampleView();
- final _max = new _SampleView();
- final _count = new _Label(new TableCellElement()..style.textAlign = "right");
- final _units = new _Label(new TableCellElement());
-
- _ResponseView() {
- elt.children.addAll([
- _selected.elt,
- _summary.elt,
- _baseline.elt,
- _median.elt,
- _max.elt,
- _count.elt,
- _units.elt
- ]);
- }
-
- void render(
- Row row, pb.Report r, EventSink<SelectEvent<pb.Request>> rowSelected) {
- var b = row.benchmark;
- var response = row.findResponse(r);
- _selected.render(row.selected, item: row.request, sink: rowSelected);
- _summary.render(b.summary);
- _baseline.render(b.measureSample(row.baseline));
- _median.render(b.measureSample(b.medianSample(response)));
- _max.render(b.measureSample(b.maxSample(response)));
- _count.render(response == null ? "0" : "${response.samples.length}");
- _units.render(row.benchmark.measureSampleUnits);
- }
-}
-
-/// A table cell holding the measurement for one sample.
-class _SampleView {
- final elt = new TableCellElement()..style.textAlign = "right";
- double _rendered;
-
- void render(double value) {
- if (_rendered == value) return;
- elt.text = _render(value);
- _rendered = value;
- }
-
- static String _render(double value) {
- if (value == 0.0) return "*";
- return value.toStringAsFixed(0);
- }
-}
-
-/// Renders the benchmark report as JSON so it can be copied to a file.
-class _JsonView {
- final DivElement elt;
- String _rendered;
- _JsonView(this.elt);
-
- void render(pb.Report r) {
- // Don't show JSON while benchmarks are in progress.
- String json = "";
- if (r.status == pb.Status.DONE) {
- json = encodeReport(r);
- }
-
- if (json == _rendered) return;
-
- elt.children.clear();
- if (json == "") return;
- elt.children.addAll([
- new HeadingElement.h2()..text = "Report data as JSON:",
- new PreElement()..text = json
- ]);
- _rendered = json;
- }
-}
-
-/// A menu of selectable text items.
-class _Menu {
- final SelectElement elt;
- final _changes = new StreamController<String>.broadcast();
- final _options = new List<_MenuOption>();
-
- _Menu(this.elt) {
- elt.onChange.listen((e) => _changes.add(elt.value));
- }
-
- Stream<String> get onChange => _changes.stream;
-
- void render(List<String> items, String selected) {
- var it = items.iterator;
-
- // Update existing items
- for (var opt in _options) {
- var hasNext = it.moveNext();
- assert(hasNext); // assume menu never shrinks
- opt.render(it.current, it.current == selected);
- }
-
- // Add any new items
- while (it.moveNext()) {
- var opt = new _MenuOption();
- opt.render(it.current, it.current == selected);
- elt.append(opt.elt);
- _options.add(opt);
- }
- }
-}
-
-class _MenuOption {
- final elt = new OptionElement();
- String _renderedItem;
- bool _renderedSelected;
-
- void render(String item, selected) {
- if (_renderedItem != item) {
- elt.text = item;
- elt.value = item;
- _renderedItem = item;
- }
- if (_renderedSelected != selected) {
- elt.selected = selected;
- _renderedSelected = selected;
- }
- }
-}
-
-class _Label {
- final HtmlElement elt;
- String _rendered;
- _Label(this.elt);
-
- void render(String text) {
- if (_rendered == text) return;
- elt.text = text;
- _rendered = text;
- }
-}
-
-class _Button {
- final ButtonElement elt;
- final _clicks = new StreamController.broadcast();
- String _renderedLabel;
- bool _renderedEnabled;
-
- _Button(this.elt) {
- elt.onClick.listen((e) => _clicks.add(true));
- }
-
- Stream get onClick => _clicks.stream;
-
- void render(String label, bool enabled) {
- if (label != _renderedLabel) {
- elt.text = label;
- _renderedLabel = label;
- }
- if (_renderedEnabled != enabled) {
- elt.disabled = !enabled;
- _renderedEnabled = enabled;
- }
- }
-}
-
-class _Checkbox<T> {
- final elt = new CheckboxInputElement();
-
- bool _renderedChecked;
- EventSink<SelectEvent<T>> _sink;
- T _item;
-
- _Checkbox() {
- elt.onChange.listen((e) {
- if (_sink != null) {
- _sink.add(new SelectEvent<T>(elt.checked, _item));
- }
- });
- }
-
- void render(bool checked, {EventSink<SelectEvent<T>> sink, T item}) {
- if (_renderedChecked != checked) {
- elt.checked = checked;
- _renderedChecked = checked;
- }
- _item = item;
- _sink = sink;
- }
-}
diff --git a/benchmark/lib/report.dart b/benchmark/lib/report.dart
deleted file mode 100644
index bd6ecf2..0000000
--- a/benchmark/lib/report.dart
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.report;
-
-import 'dart:convert' show jsonEncode;
-
-import 'package:yaml/yaml.dart';
-
-import 'generated/benchmark.pb.dart' as pb;
-
-pb.Response findUpdatedResponse(pb.Report beforeRep, pb.Report afterRep) {
- if (beforeRep == null) return afterRep.responses[0];
- assert(afterRep != null);
- assert(beforeRep.responses.length == afterRep.responses.length);
- for (var i = 0; i < afterRep.responses.length; i++) {
- var before = beforeRep.responses[i];
- var after = afterRep.responses[i];
- assert(before.request.id == after.request.id);
- assert(before.request.params == after.request.params);
- if (before.samples.length != after.samples.length) {
- return after;
- }
- }
- return null; // not found
-}
-
-/// Returns a partially filled in pb.Platform.
-///
-/// It only includes the values we can determine without dart:html or dart:io.
-pb.Platform createPlatform() {
- return new pb.Platform()
- ..dartVM = _isDartVM
- ..checkedMode = _implicitChecksEnabled;
-}
-
-get _isDartVM => !identical(1, 1.0);
-
-/// Returns `false` if running via dart2js and `--omit-implicit-checks` is set
-final bool _implicitChecksEnabled = () {
- // ignore: unused_local_variable
- bool x = true;
- try {
- // Trigger an exception if we're in checked mode.
- x = "" as dynamic;
- return false;
- } catch (e) {
- return true;
- }
-}();
-
-/// Given the contents of the pubspec.yaml and pubspec.lock files,
-/// create a pb.Packages object.
-pb.Packages createPackages(String pubspecYaml, String pubspecLock) {
- var out = new pb.Packages();
-
- for (var line in pubspecYaml.split("\n")) {
- line = line.trim();
- if (line.startsWith("version:")) {
- out.version = line.substring("version:".length).trim();
- }
- }
-
- out.packages.addAll(_parseLockFile(pubspecLock));
-
- return out;
-}
-
-/// Quick and dirty lock file parser.
-/// - ignores indentation
-/// - assumes one top-level key "packages:"
-/// - assumes all other lines without a value except 'description'
-/// start a new package
-/// - only allows known keys within a package
-Iterable<pb.PackageVersion> _parseLockFile(String contents) sync* {
- var yaml = loadYaml(contents) as YamlMap;
- var packages = yaml['packages'] as YamlMap;
-
- for (var entry in packages.entries) {
- var map = entry.value as YamlMap;
- var pkgVersion = new pb.PackageVersion()
- ..name = entry.key as String
- ..source = map['source']
- ..version = map['version'];
-
- var path = (map['description'] as YamlMap)['path'];
- if (path != null) {
- pkgVersion.path = path;
- }
- yield pkgVersion;
- }
-}
-
-/// Encodes a report as nicely-formatted JSON.
-String encodeReport(pb.Report report) {
- var json = report.writeToJsonMap();
- var out = new StringBuffer();
- _stringifyMap(out, json, "");
- out.writeln();
- return out.toString();
-}
-
-String _stringifyMap(StringBuffer out, Map json, String indent) {
- var childIndent = indent + " ";
- out.writeln("{");
- var first = true;
- for (var key in json.keys) {
- if (!first) out.writeln(",");
- first = false;
-
- var value = json[key];
- out.write(childIndent);
- out.write(jsonEncode(key));
- out.write(": ");
-
- if (value is List) {
- _stringifyList(out, value, childIndent);
- } else if (value is Map && indent.length < 4) {
- _stringifyMap(out, value, childIndent);
- } else {
- out.write(jsonEncode(value));
- }
- }
- out.write("\n$indent}");
- return out.toString();
-}
-
-void _stringifyList(StringBuffer out, List json, String indent) {
- var childIndent = indent + " ";
- out.write("[\n");
- bool first = true;
- for (var item in json) {
- if (!first) out.write(",\n");
- first = false;
- out.write(childIndent);
- out.write(jsonEncode(item));
- }
- out.write("\n$indent]");
-}
diff --git a/benchmark/lib/suite.dart b/benchmark/lib/suite.dart
deleted file mode 100644
index 76a80fb..0000000
--- a/benchmark/lib/suite.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.suite;
-
-import 'benchmark.dart';
-import 'benchmarks/index.dart' show createBenchmark;
-import 'generated/benchmark.pb.dart' as pb;
-
-/// Runs a benchmark suite, returning progress until done.
-///
-/// [samplesPerBatch] is the number of times a benchmark will be run
-/// before going on to the next one. They will be executed round-robin
-/// until they're all done.
-/// [profiler] if supplied, each request will be profiled once.
-Iterable<pb.Report> runSuite(List<pb.Request> requests,
- {samplesPerBatch = 1, Profiler profiler}) sync* {
- // Create a blank report with one response per request.
- var report = new pb.Report()..status = pb.Status.RUNNING;
- for (var request in requests) {
- var r = new pb.Response()..request = request;
- report.responses.add(r);
- }
-
- // Set up progress reports.
- int sampleCount = 0;
- int totalSamples = 0;
- for (var request in requests) {
- totalSamples += request.samples;
- }
- pb.Report progress() {
- report.message = "Running ($sampleCount/$totalSamples)";
- return report.clone();
- }
-
- // Send first progress message before starting.
- yield progress();
-
- var benchmarks = <Benchmark>[];
- for (var r in report.responses) {
- benchmarks.add(createBenchmark(r.request));
- }
-
- // Collect the requested number of samples.
- while (sampleCount < totalSamples) {
- for (var i = 0; i < benchmarks.length; i++) {
- var b = benchmarks[i];
- var r = report.responses[i];
- int batchSize = r.request.samples - r.samples.length;
- if (batchSize == 0) continue;
- if (batchSize > samplesPerBatch) batchSize = samplesPerBatch;
- var p = r.samples.isEmpty ? profiler : null;
- for (pb.Sample s in b.measure(r.request, batchSize, profiler: p)) {
- r.samples.add(s);
- sampleCount++;
- yield progress();
- }
- }
- }
-
- // Send final report.
- report.status = pb.Status.DONE;
- report.message = "Done";
- yield report;
-}
diff --git a/benchmark/lib/suites/json.dart b/benchmark/lib/suites/json.dart
deleted file mode 100644
index 690855c..0000000
--- a/benchmark/lib/suites/json.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.suite.json;
-
-import '../benchmarks/int32_json.dart';
-import '../benchmarks/repeated_int32_json.dart';
-import '../benchmarks/int64_json.dart';
-import '../benchmarks/repeated_int64_json.dart';
-import '../benchmarks/string_json.dart';
-import '../benchmarks/repeated_string_json.dart';
-import '../generated/benchmark.pb.dart' show Suite;
-
-final Suite jsonSuite = () {
- var suite = new Suite();
- suite.requests.addAll([
- _int32(1, 100),
- _int32(2, 100),
- _int32(10, 100),
- _int32(10, 200),
- _repeatedInt32(1, 100),
- _repeatedInt32(2, 100),
- _repeatedInt32(10, 100),
- _repeatedInt32(10, 200),
- _int64(1, 100),
- _int64(2, 100),
- _int64(10, 100),
- _int64(10, 200),
- _repeatedInt64(1, 100),
- _repeatedInt64(2, 100),
- _repeatedInt64(10, 100),
- _repeatedInt64(10, 200),
- _string(1, 100, 10),
- _string(2, 100, 10),
- _string(10, 100, 10),
- _string(10, 200, 10),
- _string(10, 100, 100),
- _repeatedString(1, 100, 10),
- _repeatedString(2, 100, 10),
- _repeatedString(10, 100, 10),
- _repeatedString(10, 200, 10),
- _repeatedString(10, 100, 100),
- ]);
-
- return suite;
-}();
-
-_int32(int width, int height) =>
- new Int32Benchmark(width, height).makeRequest();
-
-_repeatedInt32(int width, int height) =>
- new RepeatedInt32Benchmark(width, height).makeRequest();
-
-_int64(int width, int height) =>
- new Int64Benchmark(width, height).makeRequest();
-
-_repeatedInt64(int width, int height) =>
- new RepeatedInt64Benchmark(width, height).makeRequest();
-
-_string(int width, int height, int size) =>
- new StringBenchmark(width, height, size).makeRequest();
-
-_repeatedString(int width, int height, int size) =>
- new RepeatedStringBenchmark(width, height, size).makeRequest();
diff --git a/benchmark/lib/suites/props.dart b/benchmark/lib/suites/props.dart
deleted file mode 100644
index 54914bf..0000000
--- a/benchmark/lib/suites/props.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.suite.json;
-
-import '../benchmarks/get_strings.dart';
-import '../benchmarks/set_strings.dart';
-import '../benchmarks/has_strings.dart';
-import '../generated/benchmark.pb.dart' show Suite;
-
-final Suite propsSuite = () {
- var suite = new Suite();
- suite.requests.addAll([
- _getStrings(10, null),
- _getStrings(10, "x"),
- _setStrings(10, null),
- _setStrings(10, "x"),
- _hasStrings(10, null),
- _hasStrings(10, "x"),
- ]);
-
- return suite;
-}();
-
-_getStrings(int height, String fill) =>
- new GetStringsBenchmark(height, fill).makeRequest();
-_setStrings(int height, String fill) =>
- new SetStringsBenchmark(height, fill).makeRequest();
-_hasStrings(int height, String fill) =>
- new HasStringsBenchmark(height, fill).makeRequest();
diff --git a/benchmark/lib/vm.dart b/benchmark/lib/vm.dart
deleted file mode 100644
index 19c6e6c..0000000
--- a/benchmark/lib/vm.dart
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.benchmark.vm;
-
-import 'dart:async' show Future;
-import 'dart:io' show File, Directory, Link, Platform, stdout;
-
-import '../data/index.dart'
- show latestVMReportName, pubspecYamlName, pubspecLockName, hostfileName;
-import 'benchmarks/index.dart' show createBenchmark;
-import 'generated/benchmark.pb.dart' as pb;
-import 'report.dart'
- show createPlatform, createPackages, encodeReport, findUpdatedResponse;
-import 'suite.dart' show runSuite;
-
-/// Runs a benchmark suite.
-/// Writes a report to latest_vm.pb.json after every change,
-/// to make progress available to the browser.
-runSuiteInVM(pb.Suite suite) async {
- var env = await _loadEnv();
-
- pb.Report lastReport;
- pb.Response lastUpdate;
- for (var report in runSuite(suite.requests, samplesPerBatch: 10)) {
- report.env = env;
-
- // show progress
- var update = findUpdatedResponse(lastReport, report);
- if (update != null) {
- var summary = _summarize(update);
- if (lastUpdate == null || update.request != lastUpdate.request) {
- stdout.write("\n$summary");
- } else {
- _overwrite(summary);
- }
- }
-
- lastReport = report;
- lastUpdate = update;
- }
-
- // save the report to a file
- var outFile = "${dataDir.path}/$latestVMReportName";
- var tmpFile = new File("$outFile.tmp");
- await tmpFile.writeAsString(encodeReport(lastReport));
- await tmpFile.rename(outFile);
- print("\nWrote result to benchmark/data/${latestVMReportName}");
-}
-
-String _summarize(pb.Response r) {
- assert(r != null);
- var b = createBenchmark(r.request);
- return b.summarizeResponse(r);
-}
-
-final _escapeChar = new String.fromCharCode(27);
-final _clearLine = "\r$_escapeChar[2K";
-
-/// Overwrite the last line printed to the terminal.
-void _overwrite(String line) {
- stdout.write("$_clearLine$line");
-}
-
-Future<pb.Env> _loadEnv() async {
- await _ensureDataDir();
-
- var platform = createPlatform()
- ..hostname = _hostname
- ..osType = _osType
- ..dartVersion = Platform.version;
-
- var pubspec = await (new File(pubspecYaml.path).readAsString());
- var lock = await (new File(pubspecLock.path).readAsString());
-
- return new pb.Env()
- ..script = _script
- ..platform = platform
- ..packages = createPackages(pubspec, lock);
-}
-
-/// Create files and symlinks in the data directory.
-///
-/// This is so they can be accessed in browser benchmarks.
-_ensureDataDir() async {
- await hostnameFile.writeAsString(_hostname);
-
- if (!await pubspecYaml.exists()) {
- await pubspecYaml.create("${pubspecDir.path}/pubspec.yaml");
- }
-
- if (!await pubspecLock.exists()) {
- await pubspecLock.create("${pubspecDir.path}/pubspec.lock");
- }
-}
-
-String get _script {
- // Only including the last part of the script name.
- return Platform.script.pathSegments.last;
-}
-
-String get _hostname {
- // Only including the first part of the hostname.
- var h = Platform.localHostname;
- int firstDot = h.indexOf(".");
- if (firstDot == -1) return h;
- return h.substring(0, firstDot);
-}
-
-pb.OSType get _osType {
- if (Platform.isLinux) return pb.OSType.LINUX;
- if (Platform.isMacOS) return pb.OSType.MAC;
- if (Platform.isWindows) return pb.OSType.WINDOWS;
- if (Platform.isAndroid) return pb.OSType.ANDROID;
-
- // What is this?
- throw "unknown OS type";
-}
-
-final File hostnameFile = new File("${dataDir.path}/$hostfileName");
-final Link pubspecYaml = new Link("${dataDir.path}/$pubspecYamlName");
-final Link pubspecLock = new Link("${dataDir.path}/$pubspecLockName");
-
-final Directory dataDir = () {
- var d = new Directory("${pubspecDir.path}/benchmark/data");
- if (!d.existsSync()) {
- throw "data dir doesn't exist at ${d.path}";
- }
- return d;
-}();
-
-/// Returns the drectory containing the pubspec.yaml file.
-final Directory pubspecDir = () {
- for (var d = Directory.current; d.parent != d; d = d.parent) {
- if (new File("${d.path}/pubspec.yaml").existsSync()) {
- return d;
- }
- }
- throw "can't find pubspec.yaml above ${Directory.current}";
-}();
diff --git a/benchmark/props.html b/benchmark/props.html
deleted file mode 100644
index 82020e4..0000000
--- a/benchmark/props.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
- <title>Property Benchmark</title>
-</head>
-
-<body>
-<div id="dashboard">
-Loading...
-</div>
-
-<script defer src="props_browser.dart.js"></script>
-</body>
-</html>
diff --git a/benchmark/props_browser.dart b/benchmark/props_browser.dart
deleted file mode 100644
index 556e779..0000000
--- a/benchmark/props_browser.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "dart:html" show querySelector;
-
-import 'lib/suites/props.dart' show propsSuite;
-import 'lib/dashboard.dart' show showDashboard;
-
-main() => showDashboard(propsSuite, querySelector("#dashboard"));
diff --git a/benchmark/props_vm.dart b/benchmark/props_vm.dart
deleted file mode 100644
index 7011cbd..0000000
--- a/benchmark/props_vm.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'lib/suites/props.dart' show propsSuite;
-import 'lib/vm.dart' show runSuiteInVM;
-
-main() => runSuiteInVM(propsSuite);
diff --git a/benchmark/protos/benchmark.proto b/benchmark/protos/benchmark.proto
deleted file mode 100644
index 9118f79..0000000
--- a/benchmark/protos/benchmark.proto
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package benchmark;
-
-// A Suite requests that some benchmarks should be run.
-message Suite {
- repeated Request requests = 1;
-}
-
-// A Request asks for samples for one benchmark.
-message Request {
- // The id of the benchmark to run.
- optional BenchmarkID id = 1;
-
- // The parameters to pass to the benchmark.
- optional Params params = 2;
-
- // The number of samples to collect.
- optional int32 samples = 3;
-
- // The duration of each sample in milliseconds.
- optional int32 duration = 4;
-}
-
-enum BenchmarkID {
- READ_INT32_FIELDS_JSON = 1;
- READ_INT32_REPEATED_JSON = 2;
- READ_INT64_FIELDS_JSON = 3;
- READ_INT64_REPEATED_JSON = 4;
- READ_STRING_FIELDS_JSON = 5;
- READ_STRING_REPEATED_JSON = 6;
-
- GET_STRINGS = 20;
- SET_STRINGS = 21;
- HAS_STRINGS = 22;
-}
-
-// Parameters to a particular benchmark.
-// (See the class for the ones it actually uses.)
-message Params {
- // The number of (leaf) messages to use.
- optional int32 message_count = 1;
-
- // The number of int32 fields to set in each leaf.
- optional int32 int32_field_count = 2;
-
- // For repeated int32 fields, the number of values each should have.
- optional int32 int32_repeat_count = 3;
-
- // The number of int64 fields to set in each leaf.
- optional int32 int64_field_count = 4;
-
- // For repeated int64 fields, the number of values each should have.
- optional int32 int64_repeat_count = 5;
-
- // The number of string fields to set in each leaf.
- optional int32 string_field_count = 6;
-
- // For repeated string fields, the number of values each should have.
- optional int32 string_repeat_count = 7;
-
- // The size of the strings used in the benchmark.
- optional int32 string_size = 8;
-
- // An initial string value for filling the grid.
- optional string string_value = 9;
-}
-
-// A Report records what is happening while a suite is being run.
-message Report {
- // status code.
- optional Status status = 1;
- // Top-level summary of what is happening.
- // (May provide an error if there are no responses).
- optional string message = 2;
- // Describes the experimental setup.
- optional Env env = 3;
- // The result of each request.
- repeated Response responses = 4;
-}
-
-enum Status {
- RUNNING = 1;
- DONE = 2;
- FAILED = 3;
-}
-
-// An Env describes the environment in which the benchmark ran.
-message Env {
- // The script that was run, relative to "benchmarks" directory (VM only).
- optional string script = 1;
-
- // The path to the HTML page. (Browser tests only.)
- optional string page = 2;
-
- // The platform the benchmark was run on.
- optional Platform platform = 10;
- // The Dart package versions being exercised.
- optional Packages packages = 11;
-}
-
-// A Platform describes the hardware, OS, and perhaps browser.
-message Platform {
-
- // values we can get from dart:io Platform
- optional string hostname = 1;
- optional OSType os_type = 2;
- optional string dart_version = 3;
-
- // values we can get from dart:html Navigator
- optional string user_agent = 10;
-
- // values we can get on any platform
- optional bool checked_mode = 20;
- optional bool dart_VM = 21;
-}
-
-enum OSType {
- LINUX = 1;
- MAC = 2;
- WINDOWS = 3;
- ANDROID = 4;
-}
-
-// Packages contains the Dart packages used.
-message Packages {
- // The dart-protoc-plugin version (from pubspec.yaml)
- optional string version = 1;
-
- // Package versions from pubspec.lock
- repeated PackageVersion packages = 2;
-}
-
-// One entry in pubspec.lock, describing a Dart package.
-message PackageVersion {
- optional string name = 1;
- optional string source = 2;
- optional string version = 3;
- optional string path = 4; // if set, this is a path dependency
-}
-
-// The result of running one Request.
-message Response {
- optional Request request = 1;
- repeated Sample samples = 2;
-}
-
-// The output of running the benchmark in a loop.
-message Sample {
-
- // The wall-clock duration of the entire loop in microseconds.
- optional int32 duration = 1;
- // The number of times the loop iterated.
- optional int32 loop_count = 2;
- // Various other counters.
- optional Counts counts = 3;
-}
-
-// Various counts measured for one sample in a benchmark run.
-message Counts {
- // The number of times an int32 was read during one sample.
- optional int32 int32Reads = 1;
-
- // The number of times an int64 was read during one sample.
- optional int32 int64Reads = 2;
-
- // The number of strings read during a sample.
- optional int32 stringReads = 4;
-
- // The number of strings written during a sample.
- optional int32 stringWrites = 5;
-}
diff --git a/benchmark/protos/int32grid.proto b/benchmark/protos/int32grid.proto
deleted file mode 100644
index 2b4d300..0000000
--- a/benchmark/protos/int32grid.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package int32_grid;
-
-// A grid of variable-length rows,
-// to test repeated fields.
-message Grid {
- repeated Line lines = 1;
-}
-
-message Line {
- repeated int32 cells = 1;
-}
-
-// A grid where each line contains 10 fields,
-// to test non-repeated fields.
-message Grid10 {
- repeated Line10 lines = 1;
-}
-
-message Line10 {
- optional int32 cell1 = 1;
- optional int32 cell2 = 2;
- optional int32 cell3 = 3;
- optional int32 cell4 = 4;
- optional int32 cell5 = 5;
- optional int32 cell6 = 6;
- optional int32 cell7 = 7;
- optional int32 cell8 = 8;
- optional int32 cell9 = 9;
- optional int32 cell10 = 10;
-}
diff --git a/benchmark/protos/int64grid.proto b/benchmark/protos/int64grid.proto
deleted file mode 100644
index 6c594ae..0000000
--- a/benchmark/protos/int64grid.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package int64_grid;
-
-// A grid of variable-length rows,
-// to test repeated fields.
-message Grid {
- repeated Line lines = 1;
-}
-
-message Line {
- repeated int64 cells = 1;
-}
-
-// A grid where each line contains 10 fields,
-// to test non-repeated fields.
-message Grid10 {
- repeated Line10 lines = 1;
-}
-
-message Line10 {
- optional int64 cell1 = 1;
- optional int64 cell2 = 2;
- optional int64 cell3 = 3;
- optional int64 cell4 = 4;
- optional int64 cell5 = 5;
- optional int64 cell6 = 6;
- optional int64 cell7 = 7;
- optional int64 cell8 = 8;
- optional int64 cell9 = 9;
- optional int64 cell10 = 10;
-}
diff --git a/benchmark/protos/string_grid.proto b/benchmark/protos/string_grid.proto
deleted file mode 100644
index ef361b6..0000000
--- a/benchmark/protos/string_grid.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package string_grid;
-
-// A grid of variable-length rows,
-// to test repeated fields.
-message Grid {
- repeated Line lines = 1;
-}
-
-message Line {
- repeated string cells = 1;
-}
-
-// A grid where each line contains 10 fields,
-// to test non-repeated fields.
-message Grid10 {
- repeated Line10 lines = 1;
-}
-
-message Line10 {
- optional string cell1 = 1;
- optional string cell2 = 2;
- optional string cell3 = 3;
- optional string cell4 = 4;
- optional string cell5 = 5;
- optional string cell6 = 6;
- optional string cell7 = 7;
- optional string cell8 = 8;
- optional string cell9 = 9;
- optional string cell10 = 10;
-}
diff --git a/benchmark/readjson.html b/benchmark/readjson.html
deleted file mode 100644
index 67a9b16..0000000
--- a/benchmark/readjson.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
- <title>JSON Benchmark</title>
-</head>
-
-<body>
-<div id="dashboard">
-Loading...
-</div>
-
-<script defer src="readjson_browser.dart.js"></script>
-</body>
-</html>
diff --git a/benchmark/readjson_browser.dart b/benchmark/readjson_browser.dart
deleted file mode 100644
index 04e244b..0000000
--- a/benchmark/readjson_browser.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "dart:html" show querySelector;
-
-import 'lib/suites/json.dart' show jsonSuite;
-import 'lib/dashboard.dart' show showDashboard;
-
-main() => showDashboard(jsonSuite, querySelector("#dashboard"));
diff --git a/benchmark/readjson_vm.dart b/benchmark/readjson_vm.dart
deleted file mode 100644
index 3167289..0000000
--- a/benchmark/readjson_vm.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'lib/suites/json.dart' show jsonSuite;
-import 'lib/vm.dart' show runSuiteInVM;
-
-main() => runSuiteInVM(jsonSuite);
diff --git a/bin/protoc-gen-dart b/bin/protoc-gen-dart
deleted file mode 100755
index b1f8169..0000000
--- a/bin/protoc-gen-dart
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-BINDIR=$(dirname "$0")
-dart "$BINDIR/protoc_plugin.dart" -c "$@"
diff --git a/bin/protoc_plugin.dart b/bin/protoc_plugin.dart
deleted file mode 100755
index 3e5990d..0000000
--- a/bin/protoc_plugin.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-import 'package:protoc_plugin/protoc.dart';
-
-void main() {
- new CodeGenerator(stdin, stdout).generate();
-}
diff --git a/bin/protoc_plugin_bazel.dart b/bin/protoc_plugin_bazel.dart
deleted file mode 100755
index 86d9987..0000000
--- a/bin/protoc_plugin_bazel.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-import 'package:protoc_plugin/bazel.dart';
-import 'package:protoc_plugin/protoc.dart';
-
-void main() {
- var packages = <String, BazelPackage>{};
- new CodeGenerator(stdin, stdout).generate(
- optionParsers: {bazelOptionId: new BazelOptionParser(packages)},
- config: new BazelOutputConfiguration(packages));
-}
diff --git a/build.yaml b/build.yaml
deleted file mode 100644
index 0221297..0000000
--- a/build.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config
-# Enables running benchmarks via browser: `pub run build_runner serve`
-targets:
- $default:
- builders:
- build_web_compilers|entrypoint:
- generate_for:
- - benchmark/*_browser.dart
- options:
- dart2js_args:
- - --minify
- #- --trust-primitives
- #- --omit-implicit-checks
-
-builders:
- benchmarkBuilder:
- import: "tool/builder.dart"
- builder_factories: ["benchmarkBuilder"]
- build_extensions: {"lib/$lib$": ["benchmark/data/data.json"]}
- auto_apply: root_package
diff --git a/lib/base_type.dart b/lib/base_type.dart
deleted file mode 100644
index 028543c..0000000
--- a/lib/base_type.dart
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-/// Represents the base type of a particular field in a proto definition.
-/// (Doesn't include List<> for repeated fields.)
-class BaseType {
- final FieldDescriptorProto_Type descriptor;
-
- /// The name of the Dart type when in the same package.
- final String unprefixed;
-
- /// The suffix of the constant for this type in PbFieldType.
- /// (For example, 'B' for boolean or '3' for int32.)
- final String typeConstantSuffix;
-
- // Method name of the setter method for this type.
- final String setter;
-
- // The generator corresponding to this type.
- // (Null for primitive types.)
- final ProtobufContainer generator;
-
- const BaseType._raw(this.descriptor, this.typeConstantSuffix, this.unprefixed,
- this.setter, this.generator);
-
- bool get isGroup => descriptor == FieldDescriptorProto_Type.TYPE_GROUP;
- bool get isMessage => descriptor == FieldDescriptorProto_Type.TYPE_MESSAGE;
- bool get isEnum => descriptor == FieldDescriptorProto_Type.TYPE_ENUM;
- bool get isString => descriptor == FieldDescriptorProto_Type.TYPE_STRING;
- bool get isBytes => descriptor == FieldDescriptorProto_Type.TYPE_BYTES;
- bool get isPackable => (generator == null && !isString && !isBytes) || isEnum;
-
- /// The package where this type is declared.
- /// (Always the empty string for primitive types.)
- String get package => generator == null ? "" : generator.package;
-
- /// The Dart expression to use for this type when in a different file.
- String get prefixed => generator == null
- ? unprefixed
- : generator.fileImportPrefix + "." + unprefixed;
-
- /// Returns the name to use in generated code for this Dart type.
- ///
- /// Doesn't include the List type for repeated fields.
- /// [protoFileUri] represents the current proto file where we are generating
- /// code. The Dart class might be imported from a different proto file.
- String getDartType(FileGenerator fileGen) =>
- (fileGen.protoFileUri == generator?.fileGen?.protoFileUri)
- ? unprefixed
- : prefixed;
-
- String getRepeatedDartType(FileGenerator fileGen) =>
- "List<${getDartType(fileGen)}>";
-
- factory BaseType(FieldDescriptorProto field, GenerationContext ctx) {
- String constSuffix;
-
- switch (field.type) {
- case FieldDescriptorProto_Type.TYPE_BOOL:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_BOOL, "B",
- "bool", r"$_setBool", null);
- case FieldDescriptorProto_Type.TYPE_FLOAT:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_FLOAT, "F",
- "double", r"$_setFloat", null);
- case FieldDescriptorProto_Type.TYPE_DOUBLE:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_DOUBLE, "D",
- "double", r"$_setDouble", null);
- case FieldDescriptorProto_Type.TYPE_INT32:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_INT32, "3",
- "int", r"$_setSignedInt32", null);
- case FieldDescriptorProto_Type.TYPE_UINT32:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_UINT32, "U3",
- "int", r"$_setUnsignedInt32", null);
- case FieldDescriptorProto_Type.TYPE_SINT32:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SINT32, "S3",
- "int", r"$_setSignedInt32", null);
- case FieldDescriptorProto_Type.TYPE_FIXED32:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_FIXED32, "F3",
- "int", r"$_setUnsignedInt32", null);
- case FieldDescriptorProto_Type.TYPE_SFIXED32:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SFIXED32,
- "SF3", "int", r"$_setSignedInt32", null);
- case FieldDescriptorProto_Type.TYPE_INT64:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_INT64, "6",
- "Int64", r"$_setInt64", null);
- case FieldDescriptorProto_Type.TYPE_UINT64:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_UINT64, "U6",
- "Int64", r"$_setInt64", null);
- case FieldDescriptorProto_Type.TYPE_SINT64:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SINT64, "S6",
- "Int64", r"$_setInt64", null);
- case FieldDescriptorProto_Type.TYPE_FIXED64:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_FIXED64, "F6",
- "Int64", r"$_setInt64", null);
- case FieldDescriptorProto_Type.TYPE_SFIXED64:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_SFIXED64,
- "SF6", "Int64", r"$_setInt64", null);
- case FieldDescriptorProto_Type.TYPE_STRING:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_STRING, "S",
- "String", r"$_setString", null);
- case FieldDescriptorProto_Type.TYPE_BYTES:
- return const BaseType._raw(FieldDescriptorProto_Type.TYPE_BYTES, "Y",
- "List<int>", r"$_setBytes", null);
-
- case FieldDescriptorProto_Type.TYPE_GROUP:
- constSuffix = "G";
- break;
- case FieldDescriptorProto_Type.TYPE_MESSAGE:
- constSuffix = "M";
- break;
- case FieldDescriptorProto_Type.TYPE_ENUM:
- constSuffix = "E";
- break;
-
- default:
- throw new ArgumentError("unimplemented type: ${field.type.name}");
- }
-
- ProtobufContainer generator = ctx.getFieldType(field.typeName);
- if (generator == null) {
- throw 'FAILURE: Unknown type reference ${field.typeName}';
- }
-
- return new BaseType._raw(
- field.type, constSuffix, generator.classname, null, generator);
- }
-}
diff --git a/lib/bazel.dart b/lib/bazel.dart
deleted file mode 100644
index f66cb65..0000000
--- a/lib/bazel.dart
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Bazel support for protoc_plugin.
-library protoc_bazel;
-
-import 'package:path/path.dart' as p;
-import 'protoc.dart' show SingleOptionParser, DefaultOutputConfiguration;
-
-/// Dart protoc plugin option for Bazel packages.
-///
-/// This option takes a semicolon-separated list of Bazel package metadata in
-/// `package_name|input_root|output_root` form. `input_root` designates the
-/// directory relative to which input protos are located -- typically the root
-/// of the Bazel package, where the `BUILD` file is located. `output_root`
-/// designates the directory relative to which generated `.pb.dart` outputs are
-/// emitted -- typically the package's `lib/` directory under the genfiles
-/// directory specified by `genfiles_dir` in the Bazel configuration. Generated
-/// outputs are emitted at the same path relative to `output_root` as the input
-/// proto is found relative to `input_root`.
-///
-/// For example, using `foo.bar|foo/bar|foo/bar/lib`:
-/// * `foo/bar/baz.proto` will generate `foo/bar/lib/baz.pb.dart`
-/// * `foo/bar/a/b/baz.proto` will generate `foo/bar/lib/a/b/baz.pb.dart`
-const bazelOptionId = 'BazelPackages';
-
-class BazelPackage {
- final String name;
- final String input_root;
- final String output_root;
-
- BazelPackage(this.name, String input_root, String output_root)
- : input_root = p.normalize(input_root),
- output_root = p.normalize(output_root);
-}
-
-/// Parser for the `BazelPackages` option.
-class BazelOptionParser implements SingleOptionParser {
- /// Output map of package input_root to package.
- final Map<String, BazelPackage> output;
-
- BazelOptionParser(this.output);
-
- @override
- void parse(String name, String value, onError(String message)) {
- if (value == null) {
- onError('Invalid $bazelOptionId option. Expected a non-empty value.');
- return;
- }
-
- for (var entry in value.split(';')) {
- var fields = entry.split('|');
- if (fields.length != 3) {
- onError(
- 'ERROR: expected package_name|input_root|output_root. Got: $entry');
- continue;
- }
- var pkg = new BazelPackage(fields[0], fields[1], fields[2]);
- if (!output.containsKey(pkg.input_root)) {
- output[pkg.input_root] = pkg;
- } else {
- var prev = output[pkg.input_root];
- if (pkg.name != prev.name) {
- onError('ERROR: multiple packages with input_root ${pkg.input_root}: '
- '${prev.name} and ${pkg.name}');
- continue;
- }
- if (pkg.output_root != prev.output_root) {
- onError('ERROR: conflicting output_roots for package ${pkg.name}: '
- '${prev.output_root} and ${pkg.output_root}');
- continue;
- }
- }
- }
- }
-}
-
-/// A Dart `package:` URI with package name and path components.
-class _PackageUri {
- final String packageName;
- final String path;
- Uri get uri => Uri.parse('package:$packageName/$path');
-
- _PackageUri(this.packageName, this.path);
-}
-
-/// [OutputConfiguration] that uses Bazel layout information to resolve output
-/// locations and imports.
-class BazelOutputConfiguration extends DefaultOutputConfiguration {
- final Map<String, BazelPackage> packages;
-
- BazelOutputConfiguration(this.packages);
-
- /// Search for the most specific Bazel package above [searchPath].
- BazelPackage _findPackage(String searchPath) {
- var index = searchPath.lastIndexOf('/');
- while (index > 0) {
- searchPath = searchPath.substring(0, index);
- var pkg = packages[searchPath];
- if (pkg != null) return pkg;
- index = searchPath.lastIndexOf('/');
- }
- return null;
- }
-
- @override
- Uri outputPathFor(Uri input, String extension) {
- var pkg = _findPackage(input.path);
- if (pkg == null) {
- throw new ArgumentError('Unable to locate package for input $input.');
- }
-
- // Bazel package-relative paths.
- var relativeInput = input.path.substring('${pkg.input_root}/'.length);
- var base = p.withoutExtension(relativeInput);
- var outputPath = p.join(pkg.output_root, "$base$extension");
- return new Uri.file(outputPath);
- }
-
- @override
- Uri resolveImport(Uri target, Uri source, String extension) {
- var targetBase = p.withoutExtension(target.path);
- var targetUri = _packageUriFor("$targetBase$extension");
- var sourceUri = _packageUriFor(source.path);
-
- if (targetUri == null && sourceUri != null) {
- // We can't reach outside of the lib/ directory of a package without
- // using a package: import. Using a relative import for [target] could
- // break anyone who uses a package: import to load [source].
- throw 'ERROR: cannot generate import for $target from $source.';
- }
-
- if (targetUri != null && sourceUri?.packageName != targetUri.packageName) {
- return targetUri.uri;
- }
-
- return super.resolveImport(target, source, extension);
- }
-
- _PackageUri _packageUriFor(String target) {
- var pkg = _findPackage(target);
- if (pkg == null) return null;
- var relPath = target.substring(pkg.input_root.length + 1);
- return new _PackageUri(pkg.name, relPath);
- }
-}
diff --git a/lib/client_generator.dart b/lib/client_generator.dart
deleted file mode 100644
index 309b121..0000000
--- a/lib/client_generator.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class ClientApiGenerator {
- // The service that this Client API connects to.
- final ServiceGenerator service;
- final String className;
- final Set<String> usedMethodNames = new Set<String>()
- ..addAll(reservedMemberNames);
-
- ClientApiGenerator(this.service, Set<String> usedNames)
- : className = disambiguateName(
- avoidInitialUnderscore(service._descriptor.name),
- usedNames,
- defaultSuffixes());
-
- // Subclasses can override this.
- String get _clientType => '$_protobufImportPrefix.RpcClient';
-
- void generate(IndentingWriter out) {
- out.addBlock('class ${className}Api {', '}', () {
- out.println('$_clientType _client;');
- out.println('${className}Api(this._client);');
- out.println();
-
- for (MethodDescriptorProto m in service._descriptor.method) {
- generateMethod(out, m);
- }
- });
- out.println();
- }
-
- // Subclasses can override this.
- void generateMethod(IndentingWriter out, MethodDescriptorProto m) {
- var methodName = disambiguateName(
- avoidInitialUnderscore(service._methodName(m.name)),
- usedMethodNames,
- defaultSuffixes());
- var inputType = service._getDartClassName(m.inputType);
- var outputType = service._getDartClassName(m.outputType);
- out.addBlock(
- '\$async.Future<$outputType> $methodName('
- '$_protobufImportPrefix.ClientContext ctx, $inputType request) {',
- '}', () {
- out.println('var emptyResponse = new $outputType();');
- out.println('return _client.invoke<$outputType>(ctx, \'${className}\', '
- '\'${m.name}\', request, emptyResponse);');
- });
- }
-}
diff --git a/lib/code_generator.dart b/lib/code_generator.dart
deleted file mode 100644
index d5080c9..0000000
--- a/lib/code_generator.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-abstract class ProtobufContainer {
- // Internal map of proto file URIs to prefix aliases to resolve name conflicts
- static final importPrefixes = <String, String>{};
- static var idx = 0;
-
- String get package;
- String get classname;
- String get fullName;
-
- /// The fully qualified name with a leading '.'.
- ///
- /// This exists because names from protoc come like this.
- String get dottedName => '.$fullName';
-
- String get fileImportPrefix => _getFileImportPrefix();
-
- String _getFileImportPrefix() {
- String path = fileGen.protoFileUri.toString();
- if (importPrefixes.containsKey(path)) {
- return importPrefixes[path];
- }
- final alias = '\$$idx';
- importPrefixes[path] = alias;
- idx++;
- return alias;
- }
-
- /// The generator of the .pb.dart file defining this entity.
- ///
- /// (Represents the .pb.dart file that we need to import in order to use it.)
- FileGenerator get fileGen;
-}
-
-class CodeGenerator extends ProtobufContainer {
- final Stream<List<int>> _streamIn;
- final IOSink _streamOut;
-
- CodeGenerator(this._streamIn, this._streamOut);
-
- /// Runs the code generator. The optional [optionParsers] can be used to
- /// change how command line options are parsed (see [parseGenerationOptions]
- /// for details), and [outputConfiguration] can be used to override where
- /// generated files are created and how imports between generated files are
- /// constructed (see [OutputConfiguration] for details).
- void generate(
- {Map<String, SingleOptionParser> optionParsers,
- OutputConfiguration config}) {
- if (config == null) {
- config = new DefaultOutputConfiguration();
- }
-
- var extensions = new ExtensionRegistry();
- Dart_options.registerAllExtensions(extensions);
-
- _streamIn
- .fold(new BytesBuilder(),
- (BytesBuilder builder, data) => builder..add(data))
- .then((builder) => builder.takeBytes())
- .then((List<int> bytes) {
- var request = new CodeGeneratorRequest.fromBuffer(bytes, extensions);
- var response = new CodeGeneratorResponse();
-
- // Parse the options in the request. Return the errors is any.
- var options = parseGenerationOptions(request, response, optionParsers);
- if (options == null) {
- _streamOut.add(response.writeToBuffer());
- return;
- }
-
- // Create a syntax tree for each .proto file given to us.
- // (We may import it even if we don't generate the .pb.dart file.)
- List<FileGenerator> generators = <FileGenerator>[];
- for (FileDescriptorProto file in request.protoFile) {
- generators.add(new FileGenerator(file, options));
- }
-
- // Collect field types and importable files.
- link(options, generators);
-
- // Generate the .pb.dart file if requested.
- for (var gen in generators) {
- var name = gen.descriptor.name;
- if (request.fileToGenerate.contains(name)) {
- response.file.addAll(gen.generateFiles(config));
- }
- }
- _streamOut.add(response.writeToBuffer());
- });
- }
-
- String get package => '';
- String get classname => null;
- String get fullName => '';
- get fileGen => null;
-}
diff --git a/lib/const_generator.dart b/lib/const_generator.dart
deleted file mode 100644
index 62b831b..0000000
--- a/lib/const_generator.dart
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.const_generator;
-
-import "indenting_writer.dart";
-
-/// Writes JSON data as a Dart constant expression.
-/// Accepts null, bool, num, String, and maps and lists.
-void writeJsonConst(IndentingWriter out, val) {
- if (val is Map) {
- if (val.values.any(_nonEmptyListOrMap)) {
- out.addBlock(
- "const {", "}", () => _writeMapItems(out, val, vertical: true),
- endWithNewline: false);
- } else {
- out.print("const {");
- _writeMapItems(out, val);
- out.print("}");
- }
- } else if (val is List) {
- if (val.any(_nonEmptyListOrMap)) {
- out.addBlock(
- "const [", "]", () => _writeListItems(out, val, vertical: true),
- endWithNewline: false);
- } else {
- out.print("const [");
- _writeListItems(out, val);
- out.print("]");
- }
- } else if (val is String) {
- _writeString(out, val);
- } else if (val is num || val is bool) {
- out.print(val.toString());
- } else if (val == null) {
- out.print("null");
- } else {
- throw "not JSON: $val";
- }
-}
-
-bool _nonEmptyListOrMap(x) {
- if (x is List && x.isNotEmpty) return true;
- if (x is Map && x.isNotEmpty) return true;
- return false;
-}
-
-void _writeString(IndentingWriter out, String val) {
- if (_maybeWriteSingleLineString(out, val)) return;
- // handle the general case
- var quote = "'''";
- out.addUnindentedBlock("r$quote", "$quote", () {
- out.print(val.replaceAll(quote, '$quote "$quote" r$quote'));
- }, endWithNewline: false);
-}
-
-bool _maybeWriteSingleLineString(IndentingWriter out, String val) {
- if (val.contains("\n")) return false;
- var prefix = '';
- if (val.contains(r'$') || val.contains(r'\')) {
- prefix = 'r';
- }
- if (!val.contains("'")) {
- out.print("$prefix'$val'");
- return true;
- } else if (!val.contains('"')) {
- out.print('$prefix"$val"');
- return true;
- } else if (!val.contains("'''")) {
- out.print("$prefix'''$val'''");
- return true;
- } else if (!val.contains('"""')) {
- out.print('$prefix"""$val"""');
- return true;
- } else {
- return false;
- }
-}
-
-void _writeListItems(IndentingWriter out, List val, {bool vertical = false}) {
- bool first = true;
- for (var item in val) {
- if (!first && !vertical) {
- out.print(", ");
- }
- writeJsonConst(out, item);
- if (vertical) {
- out.println(",");
- }
- first = false;
- }
-}
-
-void _writeMapItems(IndentingWriter out, Map<dynamic, dynamic> val,
- {bool vertical = false}) {
- bool first = true;
- for (var key in val.keys) {
- if (!first && !vertical) out.print(", ");
- _writeString(out, key);
- out.print(": ");
- writeJsonConst(out, val[key]);
- if (vertical) {
- out.println(",");
- }
- first = false;
- }
-}
diff --git a/lib/enum_generator.dart b/lib/enum_generator.dart
deleted file mode 100644
index 2ff355c..0000000
--- a/lib/enum_generator.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class EnumAlias {
- final EnumValueDescriptorProto value;
- final EnumValueDescriptorProto canonicalValue;
- EnumAlias(this.value, this.canonicalValue);
-}
-
-class EnumGenerator extends ProtobufContainer {
- final ProtobufContainer _parent;
- final String classname;
- final String fullName;
- final EnumDescriptorProto _descriptor;
- final List<EnumValueDescriptorProto> _canonicalValues =
- <EnumValueDescriptorProto>[];
- final List<EnumAlias> _aliases = <EnumAlias>[];
-
- /// Maps the name of an enum value to the Dart name we will use for it.
- final Map<String, String> dartNames = <String, String>{};
-
- EnumGenerator(EnumDescriptorProto descriptor, ProtobufContainer parent,
- Set<String> usedClassNames)
- : assert(parent != null),
- _parent = parent,
- classname = messageOrEnumClassName(descriptor.name, usedClassNames,
- parent: parent?.classname ?? ''),
- fullName = parent.fullName == ''
- ? descriptor.name
- : '${parent.fullName}.${descriptor.name}',
- _descriptor = descriptor {
- final usedNames = reservedEnumNames;
- for (EnumValueDescriptorProto value in descriptor.value) {
- EnumValueDescriptorProto canonicalValue =
- descriptor.value.firstWhere((v) => v.number == value.number);
- if (value == canonicalValue) {
- _canonicalValues.add(value);
- } else {
- _aliases.add(new EnumAlias(value, canonicalValue));
- }
- dartNames[value.name] = disambiguateName(
- avoidInitialUnderscore(value.name), usedNames, enumSuffixes());
- }
- }
-
- String get package => _parent.package;
- FileGenerator get fileGen => _parent.fileGen;
-
- /// Make this enum available as a field type.
- void register(GenerationContext ctx) {
- ctx.registerFieldType(this);
- }
-
- /// Returns a const expression that evaluates to the JSON for this message.
- /// [usage] represents the .pb.dart file where the expression will be used.
- String getJsonConstant(FileGenerator usage) {
- var name = "$classname\$json";
- if (usage.protoFileUri == fileGen.protoFileUri) {
- return name;
- }
- return "$fileImportPrefix.$name";
- }
-
- void generate(IndentingWriter out) {
- out.addBlock(
- 'class ${classname} extends $_protobufImportPrefix.ProtobufEnum {',
- '}\n', () {
- // -----------------------------------------------------------------
- // Define enum types.
- for (EnumValueDescriptorProto val in _canonicalValues) {
- final name = dartNames[val.name];
- out.println('static const ${classname} $name = '
- "const ${classname}._(${val.number}, ${singleQuote(name)});");
- }
- if (_aliases.isNotEmpty) {
- out.println();
- for (EnumAlias alias in _aliases) {
- final name = dartNames[alias.value.name];
- out.println('static const ${classname} $name ='
- ' ${dartNames[alias.canonicalValue.name]};');
- }
- }
- out.println();
-
- out.println('static const List<${classname}> values ='
- ' const <${classname}> [');
- for (EnumValueDescriptorProto val in _canonicalValues) {
- final name = dartNames[val.name];
- out.println(' $name,');
- }
- out.println('];');
- out.println();
-
- out.println('static final Map<int, $classname> _byValue ='
- ' $_protobufImportPrefix.ProtobufEnum.initByValue(values);');
- out.println('static ${classname} valueOf(int value) =>'
- ' _byValue[value];');
- out.addBlock('static void $checkItem($classname v) {', '}', () {
- out.println('if (v is! $classname)'
- " $_protobufImportPrefix.checkItemFailed(v, ${singleQuote(classname)});");
- });
- out.println();
-
- out.println('const ${classname}._(int v, String n) '
- ': super(v, n);');
- });
- }
-
- /// Writes a Dart constant containing the JSON for the EnumProtoDescriptor.
- void generateConstants(IndentingWriter out) {
- var name = getJsonConstant(fileGen);
- var json = _descriptor.writeToJsonMap();
-
- out.print("const $name = ");
- writeJsonConst(out, json);
- out.println(";");
- out.println();
- }
-}
diff --git a/lib/extension_generator.dart b/lib/extension_generator.dart
deleted file mode 100644
index aca8255..0000000
--- a/lib/extension_generator.dart
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class ExtensionGenerator {
- final FieldDescriptorProto _descriptor;
- final ProtobufContainer _parent;
-
- // populated by resolve()
- ProtobufField _field;
- final String _extensionName;
- String _extendedFullName = "";
-
- ExtensionGenerator(this._descriptor, this._parent, Set<String> usedNames)
- : _extensionName = extensionName(_descriptor, usedNames);
-
- void resolve(GenerationContext ctx) {
- _field = new ProtobufField.extension(_descriptor, _parent, ctx);
-
- ProtobufContainer extendedType = ctx.getFieldType(_descriptor.extendee);
- // TODO(skybrian) When would this be null?
- if (extendedType != null) {
- _extendedFullName = extendedType.fullName;
- }
- }
-
- String get package => _parent.package;
-
- /// The generator of the .pb.dart file where this extension will be defined.
- FileGenerator get fileGen => _parent.fileGen;
-
- String get name {
- if (_field == null) throw new StateError("resolve not called");
- String name = _extensionName;
- return _parent is MessageGenerator ? '${_parent.classname}.$name' : name;
- }
-
- bool get needsFixnumImport {
- if (_field == null) throw new StateError("resolve not called");
- return _field.needsFixnumImport;
- }
-
- /// Adds dependencies of [generate] to [imports].
- ///
- /// For each .pb.dart file that the generated code needs to import,
- /// add its generator.
- void addImportsTo(
- Set<FileGenerator> imports, Set<FileGenerator> enumImports) {
- if (_field == null) throw new StateError("resolve not called");
- var typeGen = _field.baseType.generator;
- if (typeGen != null) {
- // The type of this extension is defined in a different file,
- // so we need to import it.
- if (typeGen is EnumGenerator) {
- // Enums are always in a different file.
- enumImports.add(typeGen.fileGen);
- } else if (typeGen.fileGen != fileGen) {
- imports.add(typeGen.fileGen);
- }
- }
- }
-
- /// Adds dependencies of [generateConstants] to [imports].
- ///
- /// For each .pb.dart file that the generated code needs to import,
- /// add its generator.
- void addConstantImportsTo(Set<FileGenerator> imports) {
- if (_field == null) throw new StateError("resolve not called");
- // No dependencies - nothing to do.
- }
-
- void generate(IndentingWriter out) {
- if (_field == null) throw new StateError("resolve not called");
-
- String name = _extensionName;
- var type = _field.baseType;
- var dartType = type.getDartType(fileGen);
-
- if (_field.isRepeated) {
- out.print('static final $_protobufImportPrefix.Extension $name = '
- 'new $_protobufImportPrefix.Extension<$dartType>.repeated(\'$_extendedFullName\','
- ' \'$name\', ${_field.number}, ${_field.typeConstant}');
- if (type.isMessage || type.isGroup) {
- out.println(', $dartType.$checkItem, $dartType.create);');
- } else if (type.isEnum) {
- out.println(', $dartType.$checkItem, null, '
- '$dartType.valueOf, $dartType.values);');
- } else {
- out.println(
- ", $_protobufImportPrefix.getCheckFunction(${_field.typeConstant}));");
- }
- return;
- }
-
- out.print('static final $_protobufImportPrefix.Extension $name = '
- 'new $_protobufImportPrefix.Extension<$dartType>(\'$_extendedFullName\', \'$name\', '
- '${_field.number}, ${_field.typeConstant}');
-
- String initializer = _field.generateDefaultFunction(fileGen);
-
- if (type.isMessage || type.isGroup) {
- out.println(', $initializer, $dartType.create);');
- } else if (type.isEnum) {
- var dartEnum = type.getDartType(fileGen);
- String enumParams = '(var v) => $dartEnum.valueOf(v), $dartEnum.values';
- out.println(", $initializer, null, $enumParams);");
- } else if (initializer != null) {
- out.println(", $initializer);");
- } else {
- out.println(");");
- }
- }
-}
diff --git a/lib/file_generator.dart b/lib/file_generator.dart
deleted file mode 100644
index c9940c6..0000000
--- a/lib/file_generator.dart
+++ /dev/null
@@ -1,547 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-final _dartIdentifier = new RegExp(r'^\w+$');
-final _formatter = new DartFormatter();
-final String _protobufImportPrefix = r'$pb';
-
-/// Generates the Dart output files for one .proto input file.
-///
-/// Outputs include .pb.dart, pbenum.dart, and .pbjson.dart.
-class FileGenerator extends ProtobufContainer {
- /// Reads and the declared mixins in the file, keyed by name.
- ///
- /// Performs some basic validation on declared mixins, e.g. whether names
- /// are valid dart identifiers and whether there are cycles in the `parent`
- /// hierarchy.
- /// Does not check for existence of import files or classes.
- static Map<String, PbMixin> _getDeclaredMixins(FileDescriptorProto desc) {
- String mixinError(String error) =>
- 'Option "mixins" in ${desc.name}: $error';
-
- if (!desc.hasOptions() ||
- !desc.options.hasExtension(Dart_options.imports)) {
- return <String, PbMixin>{};
- }
- var dartMixins = <String, DartMixin>{};
- Imports importedMixins = desc.options.getExtension(Dart_options.imports);
- for (DartMixin mixin in importedMixins.mixins) {
- if (dartMixins.containsKey(mixin.name)) {
- throw mixinError('Duplicate mixin name: "${mixin.name}"');
- }
- if (!mixin.name.startsWith(_dartIdentifier)) {
- throw mixinError(
- '"${mixin.name}" is not a valid dart class identifier');
- }
- if (mixin.hasParent() && !mixin.parent.startsWith(_dartIdentifier)) {
- throw mixinError('Mixin parent "${mixin.parent}" of "${mixin.name}" is '
- 'not a valid dart class identifier');
- }
- dartMixins[mixin.name] = mixin;
- }
-
- // Detect cycles and unknown parents.
- for (var mixin in dartMixins.values) {
- if (!mixin.hasParent()) continue;
- var currentMixin = mixin;
- var parentChain = <String>[];
- while (currentMixin.hasParent()) {
- var parentName = currentMixin.parent;
-
- bool declaredMixin = dartMixins.containsKey(parentName);
- bool internalMixin = !declaredMixin && findMixin(parentName) != null;
-
- if (internalMixin) break; // No further validation of parent chain.
-
- if (!declaredMixin) {
- throw mixinError('Unknown mixin parent "${mixin.parent}" of '
- '"${currentMixin.name}"');
- }
-
- if (parentChain.contains(parentName)) {
- var cycle = parentChain.join('->') + '->$parentName';
- throw mixinError('Cycle in parent chain: $cycle');
- }
- parentChain.add(parentName);
- currentMixin = dartMixins[parentName];
- }
- }
-
- // Turn DartMixins into PbMixins.
- final pbMixins = <String, PbMixin>{};
- PbMixin resolveMixin(String name) {
- if (pbMixins.containsKey(name)) return pbMixins[name];
- if (dartMixins.containsKey(name)) {
- var dartMixin = dartMixins[name];
- var pbMixin = new PbMixin(dartMixin.name,
- importFrom: dartMixin.importFrom,
- parent: resolveMixin(dartMixin.parent));
- pbMixins[name] = pbMixin;
- return pbMixin;
- }
- return findMixin(name);
- }
-
- for (var mixin in dartMixins.values) {
- resolveMixin(mixin.name);
- }
- return pbMixins;
- }
-
- final FileDescriptorProto descriptor;
- final GenerationOptions options;
-
- // The relative path used to import the .proto file, as a URI.
- final Uri protoFileUri;
-
- final enumGenerators = <EnumGenerator>[];
- final messageGenerators = <MessageGenerator>[];
- final extensionGenerators = <ExtensionGenerator>[];
- final clientApiGenerators = <ClientApiGenerator>[];
- final serviceGenerators = <ServiceGenerator>[];
- final grpcGenerators = <GrpcServiceGenerator>[];
-
- /// Used to avoid collisions after names have been mangled to match the Dart
- /// style.
- final Set<String> usedTopLevelNames = Set<String>()
- ..addAll(toplevelReservedCapitalizedNames);
-
- /// Used to avoid collisions in the service file after names have been mangled
- /// to match the dart style.
- final Set<String> usedTopLevelServiceNames = Set<String>()
- ..addAll(toplevelReservedCapitalizedNames);
-
- final Set<String> usedExtensionNames = Set<String>()
- ..addAll(forbiddenExtensionNames);
-
- /// True if cross-references have been resolved.
- bool _linked = false;
-
- FileGenerator(this.descriptor, this.options)
- : protoFileUri = new Uri.file(descriptor.name) {
- if (protoFileUri.isAbsolute) {
- // protoc should never generate an import with an absolute path.
- throw "FAILURE: Import with absolute path is not supported";
- }
-
- var declaredMixins = _getDeclaredMixins(descriptor);
- var defaultMixinName =
- descriptor.options?.getExtension(Dart_options.defaultMixin) ?? '';
- var defaultMixin =
- declaredMixins[defaultMixinName] ?? findMixin(defaultMixinName);
- if (defaultMixin == null && defaultMixinName.isNotEmpty) {
- throw ('Option default_mixin on file ${descriptor.name}: Unknown mixin '
- '$defaultMixinName');
- }
-
- // Load and register all enum and message types.
- for (EnumDescriptorProto enumType in descriptor.enumType) {
- enumGenerators.add(new EnumGenerator(enumType, this, usedTopLevelNames));
- }
- for (DescriptorProto messageType in descriptor.messageType) {
- messageGenerators.add(new MessageGenerator(
- messageType, this, declaredMixins, defaultMixin, usedTopLevelNames));
- }
- for (FieldDescriptorProto extension in descriptor.extension) {
- extensionGenerators
- .add(new ExtensionGenerator(extension, this, usedExtensionNames));
- }
- for (ServiceDescriptorProto service in descriptor.service) {
- if (options.useGrpc) {
- grpcGenerators.add(new GrpcServiceGenerator(service, this));
- } else {
- var serviceGen =
- new ServiceGenerator(service, this, usedTopLevelServiceNames);
- serviceGenerators.add(serviceGen);
- clientApiGenerators
- .add(new ClientApiGenerator(serviceGen, usedTopLevelNames));
- }
- }
- }
-
- /// Creates the fields in each message.
- /// Resolves field types and extension targets using the supplied context.
- void resolve(GenerationContext ctx) {
- if (_linked) throw new StateError("cross references already resolved");
-
- for (var m in messageGenerators) {
- m.resolve(ctx);
- }
- for (var x in extensionGenerators) {
- x.resolve(ctx);
- }
-
- _linked = true;
- }
-
- String get package => descriptor.package;
- String get classname => '';
- String get fullName => descriptor.package;
- FileGenerator get fileGen => this;
-
- /// Generates all the Dart files for this .proto file.
- List<CodeGeneratorResponse_File> generateFiles(OutputConfiguration config) {
- if (!_linked) throw new StateError("not linked");
-
- makeFile(String extension, String content) {
- Uri protoUrl = new Uri.file(descriptor.name);
- Uri dartUrl = config.outputPathFor(protoUrl, extension);
- return new CodeGeneratorResponse_File()
- ..name = dartUrl.path
- ..content = content;
- }
-
- final files = [
- makeFile(".pb.dart", generateMainFile(config)),
- makeFile(".pbenum.dart", generateEnumFile(config)),
- makeFile(".pbjson.dart", generateJsonFile(config)),
- ];
- if (options.useGrpc) {
- if (grpcGenerators.isNotEmpty) {
- files.add(makeFile(".pbgrpc.dart", generateGrpcFile(config)));
- }
- } else {
- files.add(makeFile(".pbserver.dart", generateServerFile(config)));
- }
- return files;
- }
-
- /// Returns the contents of the .pb.dart file for this .proto file.
- String generateMainFile(
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- if (!_linked) throw new StateError("not linked");
- IndentingWriter out = new IndentingWriter();
-
- writeMainHeader(out, config);
-
- // Generate code.
- for (MessageGenerator m in messageGenerators) {
- m.generate(out);
- }
-
- // Generate code for extensions defined at top-level using a class
- // name derived from the file name.
- if (extensionGenerators.isNotEmpty) {
- // TODO(antonm): do not generate a class.
- String className = extensionClassName(descriptor, usedTopLevelNames);
- out.addBlock('class $className {', '}\n', () {
- for (ExtensionGenerator x in extensionGenerators) {
- x.generate(out);
- }
- out.println(
- 'static void registerAllExtensions($_protobufImportPrefix.ExtensionRegistry '
- 'registry) {');
- for (ExtensionGenerator x in extensionGenerators) {
- out.println(' registry.add(${x.name});');
- }
- out.println('}');
- });
- }
-
- for (ClientApiGenerator c in clientApiGenerators) {
- c.generate(out);
- }
- return out.toString();
- }
-
- /// Writes the header and imports for the .pb.dart file.
- void writeMainHeader(IndentingWriter out,
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- _writeHeading(out);
-
- // We only add the dart:async import if there are generic client API
- // generators for services in the FileDescriptorProto.
- if (clientApiGenerators.isNotEmpty) {
- out.println(r"import 'dart:async' as $async;");
- }
-
- // Make sure any other symbols in dart:core don't cause name conflicts with
- // protobuf classes that have the same name.
- out.println("// ignore: UNUSED_SHOWN_NAME\n"
- "import 'dart:core' show int, bool, double, String, List, Map, override;\n");
-
- if (_needsFixnumImport) {
- out.println("import 'package:fixnum/fixnum.dart';");
- }
-
- if (_needsProtobufImport) {
- out.println(
- "import 'package:protobuf/protobuf.dart' as $_protobufImportPrefix;");
- out.println();
- }
-
- var mixinImports = findMixinsToImport();
- var importNames = mixinImports.keys.toList();
- importNames.sort();
- for (var imp in importNames) {
- var symbols = mixinImports[imp];
- out.println("import '${imp}' show ${symbols.join(', ')};");
- }
- if (mixinImports.isNotEmpty) out.println();
-
- // Import the .pb.dart files we depend on.
- var imports = new Set<FileGenerator>.identity();
- var enumImports = new Set<FileGenerator>.identity();
- _findProtosToImport(imports, enumImports);
-
- for (var target in imports) {
- _writeImport(out, config, target, ".pb.dart");
- }
- if (imports.isNotEmpty) out.println();
-
- for (var target in enumImports) {
- _writeImport(out, config, target, ".pbenum.dart");
- }
- if (enumImports.isNotEmpty) out.println();
-
- // Export enums in main file for backward compatibility.
- if (enumCount > 0) {
- Uri resolvedImport =
- config.resolveImport(protoFileUri, protoFileUri, ".pbenum.dart");
- out.println("export '$resolvedImport';");
- out.println();
- }
- }
-
- bool get _needsFixnumImport {
- for (var m in messageGenerators) {
- if (m.needsFixnumImport) return true;
- }
- for (var x in extensionGenerators) {
- if (x.needsFixnumImport) return true;
- }
- return false;
- }
-
- bool get _needsProtobufImport =>
- messageGenerators.isNotEmpty ||
- extensionGenerators.isNotEmpty ||
- clientApiGenerators.isNotEmpty;
-
- /// Returns the generator for each .pb.dart file we need to import.
- void _findProtosToImport(
- Set<FileGenerator> imports, Set<FileGenerator> enumImports) {
- for (var m in messageGenerators) {
- m.addImportsTo(imports, enumImports);
- }
- for (var x in extensionGenerators) {
- x.addImportsTo(imports, enumImports);
- }
- // Add imports needed for client-side services.
- for (var x in serviceGenerators) {
- x.addImportsTo(imports);
- }
- // Don't need to import self. (But we may need to import the enums.)
- imports.remove(this);
- }
-
- /// Returns a map from import names to the Dart symbols to be imported.
- Map<String, List<String>> findMixinsToImport() {
- var mixins = new Set<PbMixin>();
- for (MessageGenerator m in messageGenerators) {
- m.addMixinsTo(mixins);
- }
-
- var imports = <String, List<String>>{};
- for (var m in mixins) {
- var imp = m.importFrom;
- List<String> symbols = imports[imp];
- if (symbols == null) {
- symbols = [];
- imports[imp] = symbols;
- }
- symbols.add(m.name);
- }
-
- for (var imp in imports.keys) {
- imports[imp].sort();
- }
-
- return imports;
- }
-
- /// Returns the contents of the .pbenum.dart file for this .proto file.
- String generateEnumFile(
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- if (!_linked) throw new StateError("not linked");
-
- var out = new IndentingWriter();
- _writeHeading(out);
-
- if (enumCount > 0) {
- // Make sure any other symbols in dart:core don't cause name conflicts
- // with enums that have the same name.
- out.println("// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME\n"
- "import 'dart:core' show int, dynamic, String, List, Map;");
- out.println(
- "import 'package:protobuf/protobuf.dart' as $_protobufImportPrefix;");
- out.println();
- }
-
- for (EnumGenerator e in enumGenerators) {
- e.generate(out);
- }
-
- for (MessageGenerator m in messageGenerators) {
- m.generateEnums(out);
- }
-
- return out.toString();
- }
-
- /// Returns the number of enum types generated in the .pbenum.dart file.
- int get enumCount {
- var count = enumGenerators.length;
- for (MessageGenerator m in messageGenerators) {
- count += m.enumCount;
- }
- return count;
- }
-
- /// Returns the contents of the .pbserver.dart file for this .proto file.
- String generateServerFile(
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- if (!_linked) throw new StateError("not linked");
- var out = new IndentingWriter();
- _writeHeading(out);
-
- if (serviceGenerators.isNotEmpty) {
- out.println(r'''
-import 'dart:async' as $async;
-
-import 'package:protobuf/protobuf.dart';
-''');
- }
-
- // Import .pb.dart files needed for requests and responses.
- var imports = new Set<FileGenerator>();
- for (var x in serviceGenerators) {
- x.addImportsTo(imports);
- }
- for (var target in imports) {
- _writeImport(out, config, target, ".pb.dart");
- }
-
- // Import .pbjson.dart file needed for $json and $messageJson.
- if (serviceGenerators.isNotEmpty) {
- _writeImport(out, config, this, ".pbjson.dart");
- out.println();
- }
-
- Uri resolvedImport =
- config.resolveImport(protoFileUri, protoFileUri, ".pb.dart");
- out.println("export '$resolvedImport';");
- out.println();
-
- for (ServiceGenerator s in serviceGenerators) {
- s.generate(out);
- }
-
- return out.toString();
- }
-
- /// Returns the contents of the .pbgrpc.dart file for this .proto file.
- String generateGrpcFile(
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- if (!_linked) throw new StateError("not linked");
- var out = new IndentingWriter();
- _writeHeading(out);
-
- out.println(r'''
-import 'dart:async' as $async;
-
-import 'package:grpc/grpc.dart';
-''');
-
- // Import .pb.dart files needed for requests and responses.
- var imports = new Set<FileGenerator>();
- for (var generator in grpcGenerators) {
- generator.addImportsTo(imports);
- }
- for (var target in imports) {
- _writeImport(out, config, target, ".pb.dart");
- }
-
- var resolvedImport =
- config.resolveImport(protoFileUri, protoFileUri, ".pb.dart");
- out.println("export '$resolvedImport';");
- out.println();
-
- for (var generator in grpcGenerators) {
- generator.generate(out);
- }
-
- return _formatter.format(out.toString());
- }
-
- /// Returns the contents of the .pbjson.dart file for this .proto file.
- String generateJsonFile(
- [OutputConfiguration config = const DefaultOutputConfiguration()]) {
- if (!_linked) throw new StateError("not linked");
- var out = new IndentingWriter();
- _writeHeading(out);
-
- // Import the .pbjson.dart files we depend on.
- var imports = _findJsonProtosToImport();
- for (var target in imports) {
- _writeImport(out, config, target, ".pbjson.dart");
- }
- if (imports.isNotEmpty) out.println();
-
- for (var e in enumGenerators) {
- e.generateConstants(out);
- }
- for (MessageGenerator m in messageGenerators) {
- m.generateConstants(out);
- }
- for (ServiceGenerator s in serviceGenerators) {
- s.generateConstants(out);
- }
-
- return out.toString();
- }
-
- /// Returns the generator for each .pbjson.dart file the generated
- /// .pbjson.dart needs to import.
- Set<FileGenerator> _findJsonProtosToImport() {
- var imports = new Set<FileGenerator>.identity();
- for (var m in messageGenerators) {
- m.addConstantImportsTo(imports);
- }
- for (var x in extensionGenerators) {
- x.addConstantImportsTo(imports);
- }
- for (var x in serviceGenerators) {
- x.addConstantImportsTo(imports);
- }
- imports.remove(this); // Don't need to import self.
- return imports;
- }
-
- /// Writes the header at the top of the dart file.
- void _writeHeading(IndentingWriter out) {
- out.println('''
-///
-// Generated code. Do not modify.
-// source: ${descriptor.name}
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-''');
- }
-
- /// Writes an import of a .dart file corresponding to a .proto file.
- /// (Possibly the same .proto file.)
- void _writeImport(IndentingWriter out, OutputConfiguration config,
- FileGenerator target, String extension) {
- Uri resolvedImport =
- config.resolveImport(target.protoFileUri, protoFileUri, extension);
- out.print("import '$resolvedImport'");
- if (protoFileUri != target.protoFileUri) {
- out.print(' as ${target.fileImportPrefix}');
- }
- out.println(';');
- }
-}
diff --git a/lib/grpc_generator.dart b/lib/grpc_generator.dart
deleted file mode 100644
index 79f3d78..0000000
--- a/lib/grpc_generator.dart
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class GrpcServiceGenerator {
- final ServiceDescriptorProto _descriptor;
-
- /// The generator of the .pb.dart file that will contain this service.
- final FileGenerator fileGen;
-
- /// The message types needed directly by this service.
- ///
- /// The key is the fully qualified name.
- /// Populated by [resolve].
- final _deps = <String, MessageGenerator>{};
-
- /// Maps each undefined type to a string describing its location.
- ///
- /// Populated by [resolve].
- final _undefinedDeps = <String, String>{};
-
- /// Fully-qualified gRPC service name.
- String _fullServiceName;
-
- /// Dart class name for client stub.
- String _clientClassname;
-
- /// Dart class name for server stub.
- String _serviceClassname;
-
- /// List of gRPC methods.
- final _methods = <_GrpcMethod>[];
-
- GrpcServiceGenerator(this._descriptor, this.fileGen) {
- final name = _descriptor.name;
- final package = fileGen.package;
-
- if (package != null && package.isNotEmpty) {
- _fullServiceName = '$package.$name';
- } else {
- _fullServiceName = name;
- }
-
- // avoid: ClientClient
- _clientClassname = name.endsWith('Client') ? name : name + 'Client';
- // avoid: ServiceServiceBase
- _serviceClassname =
- name.endsWith('Service') ? name + 'Base' : name + 'ServiceBase';
- }
-
- /// Finds all message types used by this service.
- ///
- /// Puts the types found in [_deps]. If a type name can't be resolved, puts it
- /// in [_undefinedDeps].
- /// Precondition: messages have been registered and resolved.
- void resolve(GenerationContext ctx) {
- for (var method in _descriptor.method) {
- _methods.add(new _GrpcMethod(this, ctx, method));
- }
- }
-
- /// Adds a dependency on the given message type.
- ///
- /// If the type name can't be resolved, adds it to [_undefinedDeps].
- void _addDependency(GenerationContext ctx, String fqname, String location) {
- if (_deps.containsKey(fqname)) return; // Already added.
-
- MessageGenerator mg = ctx.getFieldType(fqname);
- if (mg == null) {
- _undefinedDeps[fqname] = location;
- return;
- }
- mg.checkResolved();
- _deps[mg.dottedName] = mg;
- }
-
- /// Adds dependencies of [generate] to [imports].
- ///
- /// For each .pb.dart file that the generated code needs to import,
- /// add its generator.
- void addImportsTo(Set<FileGenerator> imports) {
- for (var mg in _deps.values) {
- imports.add(mg.fileGen);
- }
- }
-
- /// Returns the Dart class name to use for a message type.
- ///
- /// Throws an exception if it can't be resolved.
- String _getDartClassName(String fqname) {
- var mg = _deps[fqname];
- if (mg == null) {
- var location = _undefinedDeps[fqname];
- // TODO(jakobr): Throw more actionable error.
- throw 'FAILURE: Unknown type reference (${fqname}) for ${location}';
- }
- if (fileGen.protoFileUri == mg.fileGen.protoFileUri) {
- // If it's the same file, we import it without using "as".
- return mg.classname;
- }
- return mg.fileImportPrefix + '.' + mg.classname;
- }
-
- void generate(IndentingWriter out) {
- _generateClient(out);
- out.println();
- _generateService(out);
- }
-
- void _generateClient(IndentingWriter out) {
- out.addBlock('class $_clientClassname extends Client {', '}', () {
- for (final method in _methods) {
- method.generateClientMethodDescriptor(out);
- }
- out.println();
- out.println(
- '$_clientClassname(ClientChannel channel, {CallOptions options})');
- out.println(' : super(channel, options: options);');
- for (final method in _methods) {
- method.generateClientStub(out);
- }
- });
- }
-
- void _generateService(IndentingWriter out) {
- out.addBlock('abstract class $_serviceClassname extends Service {', '}',
- () {
- out.println('String get \$name => \'$_fullServiceName\';');
- out.println();
- out.addBlock('$_serviceClassname() {', '}', () {
- for (final method in _methods) {
- method.generateServiceMethodRegistration(out);
- }
- });
- out.println();
- for (final method in _methods) {
- method.generateServiceMethodPreamble(out);
- }
- for (final method in _methods) {
- method.generateServiceMethodStub(out);
- }
- });
- }
-}
-
-class _GrpcMethod {
- final String _grpcName;
- final String _dartName;
- final String _serviceName;
-
- final bool _clientStreaming;
- final bool _serverStreaming;
-
- final String _requestType;
- final String _responseType;
-
- final String _argumentType;
- final String _clientReturnType;
- final String _serverReturnType;
-
- _GrpcMethod._(
- this._grpcName,
- this._dartName,
- this._serviceName,
- this._clientStreaming,
- this._serverStreaming,
- this._requestType,
- this._responseType,
- this._argumentType,
- this._clientReturnType,
- this._serverReturnType);
-
- factory _GrpcMethod(GrpcServiceGenerator service, GenerationContext ctx,
- MethodDescriptorProto method) {
- final grpcName = method.name;
- final dartName =
- grpcName.substring(0, 1).toLowerCase() + grpcName.substring(1);
-
- final clientStreaming = method.clientStreaming;
- final serverStreaming = method.serverStreaming;
-
- service._addDependency(ctx, method.inputType, 'input type of $grpcName');
- service._addDependency(ctx, method.outputType, 'output type of $grpcName');
-
- final requestType = service._getDartClassName(method.inputType);
- final responseType = service._getDartClassName(method.outputType);
-
- final argumentType =
- clientStreaming ? '\$async.Stream<$requestType>' : requestType;
- final clientReturnType = serverStreaming
- ? 'ResponseStream<$responseType>'
- : 'ResponseFuture<$responseType>';
- final serverReturnType = serverStreaming
- ? '\$async.Stream<$responseType>'
- : '\$async.Future<$responseType>';
-
- return new _GrpcMethod._(
- grpcName,
- dartName,
- service._fullServiceName,
- clientStreaming,
- serverStreaming,
- requestType,
- responseType,
- argumentType,
- clientReturnType,
- serverReturnType);
- }
-
- void generateClientMethodDescriptor(IndentingWriter out) {
- out.println(
- 'static final _\$$_dartName = new ClientMethod<$_requestType, $_responseType>(');
- out.println(' \'/$_serviceName/$_grpcName\',');
- out.println(' ($_requestType value) => value.writeToBuffer(),');
- out.println(
- ' (List<int> value) => new $_responseType.fromBuffer(value));');
- }
-
- void generateClientStub(IndentingWriter out) {
- out.println();
- out.addBlock(
- '$_clientReturnType $_dartName($_argumentType request, {CallOptions options}) {',
- '}', () {
- final requestStream = _clientStreaming
- ? 'request'
- : r'new $async.Stream.fromIterable([request])';
- out.println(
- 'final call = \$createCall(_\$$_dartName, $requestStream, options: options);');
- if (_serverStreaming) {
- out.println('return new ResponseStream(call);');
- } else {
- out.println('return new ResponseFuture(call);');
- }
- });
- }
-
- void generateServiceMethodRegistration(IndentingWriter out) {
- out.println(
- '\$addMethod(new ServiceMethod<$_requestType, $_responseType>(');
- out.println(' \'$_grpcName\',');
- out.println(' $_dartName${_clientStreaming ? '' : '_Pre'},');
- out.println(' $_clientStreaming,');
- out.println(' $_serverStreaming,');
- out.println(
- ' (List<int> value) => new $_requestType.fromBuffer(value),');
- out.println(' ($_responseType value) => value.writeToBuffer()));');
- }
-
- void generateServiceMethodPreamble(IndentingWriter out) {
- if (_clientStreaming) return;
-
- out.addBlock(
- '$_serverReturnType ${_dartName}_Pre(ServiceCall call, \$async.Future request) async${_serverStreaming ? '*' : ''} {',
- '}', () {
- if (_serverStreaming) {
- out.println(
- 'yield* $_dartName(call, (await request) as $_requestType);');
- } else {
- out.println('return $_dartName(call, await request);');
- }
- });
- out.println();
- }
-
- void generateServiceMethodStub(IndentingWriter out) {
- out.println(
- '$_serverReturnType $_dartName(ServiceCall call, $_argumentType request);');
- }
-}
diff --git a/lib/indenting_writer.dart b/lib/indenting_writer.dart
deleted file mode 100644
index c71889a..0000000
--- a/lib/indenting_writer.dart
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc.indenting_writer;
-
-/// A buffer for writing indented source code.
-class IndentingWriter {
- final StringBuffer _buffer = new StringBuffer();
- String _indent = "";
- bool _needIndent = true;
-
- /// Appends a string indented to the current level.
- /// (Indentation will be added after newline characters where needed.)
- void print(String text) {
- var lastNewline = text.lastIndexOf('\n');
- if (lastNewline == -1) {
- _writeChunk(text);
- return;
- }
-
- for (String line in text.substring(0, lastNewline).split('\n')) {
- _writeChunk(line);
- _newline();
- }
- _writeChunk(text.substring(lastNewline + 1));
- }
-
- /// Same as print, but with a newline at the end.
- void println([String text = '']) {
- print(text);
- _newline();
- }
-
- /// Prints a block of text with the body indented one more level.
- void addBlock(String start, String end, void body(),
- {endWithNewline = true}) {
- _addBlock(start, end, body, endWithNewline, _indent + ' ');
- }
-
- /// Prints a block of text with an unindented body.
- /// (For example, for triple quotes.)
- void addUnindentedBlock(String start, String end, void body(),
- {endWithNewline = true}) {
- _addBlock(start, end, body, endWithNewline, '');
- }
-
- void _addBlock(
- String start, String end, void body(), endWithNewline, newIndent) {
- println(start);
- var oldIndent = _indent;
- _indent = newIndent;
- body();
- _indent = oldIndent;
- if (endWithNewline) {
- println(end);
- } else {
- print(end);
- }
- }
-
- String toString() => _buffer.toString();
-
- /// Writes part of a line of text.
- /// Adds indentation if we're at the start of a line.
- void _writeChunk(String chunk) {
- assert(!chunk.contains('\n'));
-
- if (chunk.isEmpty) return;
- if (_needIndent) {
- _buffer.write(_indent);
- _needIndent = false;
- }
- _buffer.write(chunk);
- }
-
- void _newline() {
- _buffer.writeln();
- _needIndent = true;
- }
-}
diff --git a/lib/linker.dart b/lib/linker.dart
deleted file mode 100644
index 717c6bb..0000000
--- a/lib/linker.dart
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-/// Resolves all cross-references in a set of proto files.
-void link(GenerationOptions options, Iterable<FileGenerator> files) {
- GenerationContext ctx = new GenerationContext(options);
-
- // Register the targets of cross-references.
- for (var f in files) {
- ctx.registerProtoFile(f);
-
- for (var m in f.messageGenerators) {
- m.register(ctx);
- }
- for (var e in f.enumGenerators) {
- e.register(ctx);
- }
- }
-
- for (var f in files) {
- f.resolve(ctx);
- }
-
- // Resolve service generators last.
- // (They depend on all messages being resolved.)
- for (var f in files) {
- for (var s in f.serviceGenerators) {
- s.resolve(ctx);
- }
- for (var s in f.grpcGenerators) {
- s.resolve(ctx);
- }
- }
-}
-
-class GenerationContext {
- final GenerationOptions options;
-
- /// The files available for import.
- final Map<String, FileGenerator> _files = <String, FileGenerator>{};
-
- /// The types available to proto fields.
- final Map<String, ProtobufContainer> _typeRegistry =
- <String, ProtobufContainer>{};
-
- GenerationContext(this.options);
-
- /// Makes info about a .pb.dart file available for reference,
- /// using the filename given to us by protoc.
- void registerProtoFile(FileGenerator f) {
- _files[f.descriptor.name] = f;
- }
-
- /// Makes a message, group, or enum available for reference.
- void registerFieldType(ProtobufContainer type) {
- // Register the name with a leading '.' to be compatible with input from
- // protoc.
- _typeRegistry[type.dottedName] = type;
- }
-
- /// Returns info about a .pb.dart being imported,
- /// based on the filename given to us by protoc.
- FileGenerator getImportedProtoFile(String name) => _files[name];
-
- /// Returns info about the type of a message, group, or enum field,
- /// based on the fully qualified name given to us by protoc.
- ProtobufContainer getFieldType(String name) => _typeRegistry[name];
-}
diff --git a/lib/message_generator.dart b/lib/message_generator.dart
deleted file mode 100644
index 5c9c072..0000000
--- a/lib/message_generator.dart
+++ /dev/null
@@ -1,506 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class MessageGenerator extends ProtobufContainer {
- /// Returns the mixin for this message, or null if none.
- ///
- /// First searches [declaredMixins], then internal mixins declared by
- /// [findMixin].
- static PbMixin _getMixin(DescriptorProto desc, FileDescriptorProto file,
- Map<String, PbMixin> declaredMixins, PbMixin defaultMixin) {
- if (!desc.hasOptions() || !desc.options.hasExtension(Dart_options.mixin)) {
- return defaultMixin;
- }
-
- String name = desc.options.getExtension(Dart_options.mixin);
- if (name.isEmpty) return null; // don't use any mixins (override default)
- var mixin = declaredMixins[name] ?? findMixin(name);
- if (mixin == null) {
- throw '${desc.name} in ${file.name}: mixin "$name" not found';
- }
- return mixin;
- }
-
- /// The name of the Dart class to generate.
- final String classname;
-
- /// The fully-qualified name of the message (without any leading '.').
- final String fullName;
-
- /// The part of the fully qualified name that comes after the package prefix.
- ///
- /// For nested messages this will include the names of the parents.
- ///
- /// For example:
- /// ```
- /// package foo;
- ///
- /// message Container {
- /// message Nested {
- /// int32 int32_value = 1;
- /// }
- /// }
- /// ```
- /// The nested message will have a `fullName` of 'foo.Container.Nested', and a
- /// `messageName` of 'Container.Nested'.
- String get messageName =>
- fullName.substring(package.length == 0 ? 0 : package.length + 1);
-
- final PbMixin mixin;
-
- final ProtobufContainer _parent;
- final DescriptorProto _descriptor;
- final List<EnumGenerator> _enumGenerators = <EnumGenerator>[];
- final List<MessageGenerator> _messageGenerators = <MessageGenerator>[];
- final List<ExtensionGenerator> _extensionGenerators = <ExtensionGenerator>[];
-
- // populated by resolve()
- List<ProtobufField> _fieldList;
-
- MessageGenerator(
- DescriptorProto descriptor,
- ProtobufContainer parent,
- Map<String, PbMixin> declaredMixins,
- PbMixin defaultMixin,
- Set<String> usedNames)
- : _descriptor = descriptor,
- _parent = parent,
- classname = messageOrEnumClassName(descriptor.name, usedNames,
- parent: parent?.classname ?? ''),
- assert(parent != null),
- fullName = parent.fullName == ''
- ? descriptor.name
- : '${parent.fullName}.${descriptor.name}',
- mixin = _getMixin(descriptor, parent.fileGen.descriptor, declaredMixins,
- defaultMixin) {
- for (EnumDescriptorProto e in _descriptor.enumType) {
- _enumGenerators.add(new EnumGenerator(e, this, usedNames));
- }
-
- for (DescriptorProto n in _descriptor.nestedType) {
- _messageGenerators.add(new MessageGenerator(
- n, this, declaredMixins, defaultMixin, usedNames));
- }
-
- for (FieldDescriptorProto x in _descriptor.extension) {
- _extensionGenerators.add(new ExtensionGenerator(x, this, usedNames));
- }
- }
-
- String get package => _parent.package;
-
- /// The generator of the .pb.dart file that will declare this type.
- FileGenerator get fileGen => _parent.fileGen;
-
- /// Throws an exception if [resolve] hasn't been called yet.
- void checkResolved() {
- if (_fieldList == null) {
- throw new StateError("message not resolved: ${fullName}");
- }
- }
-
- /// Returns a const expression that evaluates to the JSON for this message.
- /// [usage] represents the .pb.dart file where the expression will be used.
- String getJsonConstant(FileGenerator usage) {
- var name = "$classname\$json";
- if (usage.protoFileUri == fileGen.protoFileUri) {
- return name;
- }
- return "$fileImportPrefix.$name";
- }
-
- /// Adds all mixins used in this message and any submessages.
- void addMixinsTo(Set<PbMixin> output) {
- if (mixin != null) {
- output.addAll(mixin.findMixinsToApply());
- }
- for (var m in _messageGenerators) {
- m.addMixinsTo(output);
- }
- }
-
- // Registers message and enum types that can be used elsewhere.
- void register(GenerationContext ctx) {
- ctx.registerFieldType(this);
- for (var m in _messageGenerators) {
- m.register(ctx);
- }
- for (var e in _enumGenerators) {
- e.register(ctx);
- }
- }
-
- // Creates fields and resolves extension targets.
- void resolve(GenerationContext ctx) {
- if (_fieldList != null) throw new StateError("message already resolved");
-
- var reserved = mixin?.findReservedNames() ?? const <String>[];
- var fields = messageFieldNames(_descriptor, reserved: reserved);
-
- _fieldList = <ProtobufField>[];
- for (MemberNames names in fields.values) {
- _fieldList.add(new ProtobufField.message(names, this, ctx));
- }
-
- for (var m in _messageGenerators) {
- m.resolve(ctx);
- }
- for (var x in _extensionGenerators) {
- x.resolve(ctx);
- }
- }
-
- bool get needsFixnumImport {
- if (_fieldList == null) throw new StateError("message not resolved");
- for (var field in _fieldList) {
- if (field.needsFixnumImport) return true;
- }
- for (var m in _messageGenerators) {
- if (m.needsFixnumImport) return true;
- }
- for (var x in _extensionGenerators) {
- if (x.needsFixnumImport) return true;
- }
- return false;
- }
-
- /// Adds dependencies of [generate] to [imports].
- ///
- /// For each .pb.dart file that the generated code needs to import,
- /// add its generator.
- void addImportsTo(
- Set<FileGenerator> imports, Set<FileGenerator> enumImports) {
- if (_fieldList == null) throw new StateError("message not resolved");
- for (var field in _fieldList) {
- var typeGen = field.baseType.generator;
- if (typeGen is EnumGenerator) {
- enumImports.add(typeGen.fileGen);
- } else if (typeGen != null) {
- imports.add(typeGen.fileGen);
- }
- }
- for (var m in _messageGenerators) {
- m.addImportsTo(imports, enumImports);
- }
- for (var x in _extensionGenerators) {
- x.addImportsTo(imports, enumImports);
- }
- }
-
- // Returns the number of enums in this message and all nested messages.
- int get enumCount {
- var count = _enumGenerators.length;
- for (var m in _messageGenerators) {
- count += m.enumCount;
- }
- return count;
- }
-
- /// Adds dependencies of [generateConstants] to [imports].
- ///
- /// For each .pbjson.dart file that the generated code needs to import,
- /// add its generator.
- void addConstantImportsTo(Set<FileGenerator> imports) {
- if (_fieldList == null) throw new StateError("message not resolved");
- for (var m in _messageGenerators) {
- m.addConstantImportsTo(imports);
- }
- for (var x in _extensionGenerators) {
- x.addConstantImportsTo(imports);
- }
- }
-
- void generate(IndentingWriter out) {
- checkResolved();
-
- for (MessageGenerator m in _messageGenerators) {
- // Don't output the generated map entry type. Instead, the `PbMap` type
- // from the protobuf library is used to hold the keys and values.
- if (m._descriptor.options.hasMapEntry()) continue;
- m.generate(out);
- }
-
- var mixinClause = '';
- if (mixin != null) {
- var mixinNames = mixin.findMixinsToApply().map((m) => m.name);
- mixinClause = ' with ${mixinNames.join(", ")}';
- }
-
- String packageClause = package == ''
- ? ''
- : ', package: const $_protobufImportPrefix.PackageName(\'$package\')';
- out.addBlock(
- 'class ${classname} extends $_protobufImportPrefix.GeneratedMessage${mixinClause} {',
- '}', () {
- out.addBlock(
- 'static final $_protobufImportPrefix.BuilderInfo _i = '
- 'new $_protobufImportPrefix.BuilderInfo(\'${messageName}\'$packageClause)',
- ';', () {
- for (ProtobufField field in _fieldList) {
- var dartFieldName = field.memberNames.fieldName;
- out.println(field.generateBuilderInfoCall(fileGen, dartFieldName));
- }
-
- if (_descriptor.extensionRange.length > 0) {
- out.println('..hasExtensions = true');
- }
- if (!_hasRequiredFields(this, new Set())) {
- out.println('..hasRequiredFields = false');
- }
- });
-
- for (ExtensionGenerator x in _extensionGenerators) {
- x.generate(out);
- }
-
- out.println();
-
- out.println('${classname}() : super();');
- out.println('${classname}.fromBuffer(List<int> i,'
- ' [$_protobufImportPrefix.ExtensionRegistry r = $_protobufImportPrefix.ExtensionRegistry.EMPTY])'
- ' : super.fromBuffer(i, r);');
- out.println('${classname}.fromJson(String i,'
- ' [$_protobufImportPrefix.ExtensionRegistry r = $_protobufImportPrefix.ExtensionRegistry.EMPTY])'
- ' : super.fromJson(i, r);');
- out.println('${classname} clone() =>'
- ' new ${classname}()..mergeFromMessage(this);');
- out.println('$classname copyWith(void Function($classname) updates) =>'
- ' super.copyWith((message) => updates(message as $classname));');
-
- out.println('$_protobufImportPrefix.BuilderInfo get info_ => _i;');
-
- // Factory functions which can be used as default value closures.
- out.println('static ${classname} create() =>'
- ' new ${classname}();');
- out.println(
- 'static $_protobufImportPrefix.PbList<${classname}> createRepeated() =>'
- ' new $_protobufImportPrefix.PbList<${classname}>();');
- out.println(
- 'static ${classname} getDefault() => _defaultInstance ??= create()..freeze();');
- out.println('static ${classname} _defaultInstance;');
- out.addBlock('static void $checkItem($classname v) {', '}', () {
- out.println('if (v is! $classname)'
- " $_protobufImportPrefix.checkItemFailed(v, _i.qualifiedMessageName);");
- });
- generateFieldsAccessorsMutators(out);
- if (fullName == 'google.protobuf.Any') {
- generateAnyMethods(out);
- }
- });
- out.println();
- }
-
- // Returns true if the message type has any required fields. If it doesn't,
- // we can optimize out calls to its isInitialized()/_findInvalidFields()
- // methods.
- //
- // already_seen is used to avoid checking the same type multiple times
- // (and also to protect against unbounded recursion).
- bool _hasRequiredFields(MessageGenerator type, Set alreadySeen) {
- if (type._fieldList == null) throw new StateError("message not resolved");
-
- if (alreadySeen.contains(type.fullName)) {
- // The type is already in cache. This means that either:
- // a. The type has no required fields.
- // b. We are in the midst of checking if the type has required fields,
- // somewhere up the stack. In this case, we know that if the type
- // has any required fields, they'll be found when we return to it,
- // and the whole call to HasRequiredFields() will return true.
- // Therefore, we don't have to check if this type has required fields
- // here.
- return false;
- }
- alreadySeen.add(type.fullName);
- // If the type has extensions, an extension with message type could contain
- // required fields, so we have to be conservative and assume such an
- // extension exists.
- if (type._descriptor.extensionRange.length > 0) {
- return true;
- }
-
- for (ProtobufField field in type._fieldList) {
- if (field.isRequired) {
- return true;
- }
- if (field.baseType.isMessage) {
- MessageGenerator child = field.baseType.generator;
- if (_hasRequiredFields(child, alreadySeen)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /// Generates methods for the Any message class for packing and unpacking
- /// values.
- void generateAnyMethods(IndentingWriter out) {
- out.println('''
- /// Unpacks the message in [value] into [instance].
- ///
- /// Throws a [InvalidProtocolBufferException] if [typeUrl] does not correspond
- /// to the type of [instance].
- ///
- /// A typical usage would be `any.unpackInto(new Message())`.
- ///
- /// Returns [instance].
- T unpackInto<T extends $_protobufImportPrefix.GeneratedMessage>(T instance,
- {$_protobufImportPrefix.ExtensionRegistry extensionRegistry = $_protobufImportPrefix.ExtensionRegistry.EMPTY}) {
- $_protobufImportPrefix.unpackIntoHelper(value, instance, typeUrl,
- extensionRegistry: extensionRegistry);
- return instance;
- }
-
- /// Returns `true` if the encoded message matches the type of [instance].
- ///
- /// Can be used with a default instance:
- /// `any.canUnpackInto(Message.getDefault())`
- bool canUnpackInto($_protobufImportPrefix.GeneratedMessage instance) {
- return $_protobufImportPrefix.canUnpackIntoHelper(instance, typeUrl);
- }
-
- /// Creates a new [Any] encoding [message].
- ///
- /// The [typeUrl] will be [typeUrlPrefix]/`fullName` where `fullName` is
- /// the fully qualified name of the type of [message].
- static Any pack($_protobufImportPrefix.GeneratedMessage message,
- {String typeUrlPrefix = 'type.googleapis.com'}) {
- return new Any()
- ..value = message.writeToBuffer()
- ..typeUrl = '\${typeUrlPrefix}/\${message.info_.qualifiedMessageName}';
- }''');
- }
-
- void generateFieldsAccessorsMutators(IndentingWriter out) {
- for (ProtobufField field in _fieldList) {
- out.println();
- generateFieldAccessorsMutators(field, out);
- }
- }
-
- void generateFieldAccessorsMutators(
- ProtobufField field, IndentingWriter out) {
- var fieldTypeString = field.getDartType(fileGen);
- var defaultExpr = field.getDefaultExpr();
- var names = field.memberNames;
-
- _emitOverrideIf(field.overridesGetter, out);
- final getterExpr = _getterExpression(fieldTypeString, field.index,
- defaultExpr, field.isRepeated, field.isMapField);
- out.println('${fieldTypeString} get ${names.fieldName} => ${getterExpr};');
-
- if (field.isRepeated) {
- if (field.overridesSetter) {
- throw 'Field ${field.fullName} cannot override a setter for '
- '${names.fieldName} because it is repeated.';
- }
- if (field.overridesHasMethod) {
- throw 'Field ${field.fullName} cannot override '
- '${names.hasMethodName}() because it is repeated.';
- }
- if (field.overridesClearMethod) {
- throw 'Field ${field.fullName} cannot override '
- '${names.clearMethodName}() because it is repeated.';
- }
- } else {
- var fastSetter = field.baseType.setter;
- _emitOverrideIf(field.overridesSetter, out);
- if (fastSetter != null) {
- out.println('set ${names.fieldName}'
- '($fieldTypeString v) { '
- '$fastSetter(${field.index}, v);'
- ' }');
- } else {
- out.println('set ${names.fieldName}'
- '($fieldTypeString v) { '
- 'setField(${field.number}, v);'
- ' }');
- }
- _emitOverrideIf(field.overridesHasMethod, out);
- out.println('bool ${names.hasMethodName}() =>'
- ' \$_has(${field.index});');
- _emitOverrideIf(field.overridesClearMethod, out);
- out.println('void ${names.clearMethodName}() =>'
- ' clearField(${field.number});');
- }
- }
-
- String _getterExpression(String fieldType, int index, String defaultExpr,
- bool isRepeated, bool isMapField) {
- if (isMapField) {
- return '\$_getMap($index)';
- }
- if (fieldType == 'String') {
- return '\$_getS($index, $defaultExpr)';
- }
- if (fieldType == 'Int64' && defaultExpr == 'null') {
- return '\$_getI64($index)';
- }
- if (defaultExpr == 'null') {
- return isRepeated ? '\$_getList($index)' : '\$_getN($index)';
- }
- return '\$_get($index, $defaultExpr)';
- }
-
- void _emitOverrideIf(bool condition, IndentingWriter out) {
- if (condition) {
- out.println('@override');
- }
- }
-
- void generateEnums(IndentingWriter out) {
- for (EnumGenerator e in _enumGenerators) {
- e.generate(out);
- }
-
- for (MessageGenerator m in _messageGenerators) {
- m.generateEnums(out);
- }
- }
-
- /// Writes a Dart constant containing the JSON for the ProtoDescriptor.
- /// Also writes a separate constant for each nested message,
- /// to avoid duplication.
- void generateConstants(IndentingWriter out) {
- const nestedTypeTag = 3;
- const enumTypeTag = 4;
- assert(_descriptor.info_.fieldInfo[nestedTypeTag].name == "nestedType");
- assert(_descriptor.info_.fieldInfo[enumTypeTag].name == "enumType");
-
- var name = getJsonConstant(fileGen);
- var json = _descriptor.writeToJsonMap();
- var nestedTypeNames =
- _messageGenerators.map((m) => m.getJsonConstant(fileGen)).toList();
- var nestedEnumNames =
- _enumGenerators.map((e) => e.getJsonConstant(fileGen)).toList();
-
- out.addBlock("const $name = const {", "};", () {
- for (var key in json.keys) {
- out.print("'$key': ");
- if (key == "$nestedTypeTag") {
- // refer to message constants by name instead of repeating each value
- out.println("const [${nestedTypeNames.join(", ")}],");
- continue;
- } else if (key == "$enumTypeTag") {
- // refer to enum constants by name
- out.println("const [${nestedEnumNames.join(", ")}],");
- continue;
- }
- writeJsonConst(out, json[key]);
- out.println(",");
- }
- });
- out.println();
-
- for (var m in _messageGenerators) {
- m.generateConstants(out);
- }
-
- for (var e in _enumGenerators) {
- e.generateConstants(out);
- }
- }
-}
diff --git a/lib/names.dart b/lib/names.dart
deleted file mode 100644
index a974bec..0000000
--- a/lib/names.dart
+++ /dev/null
@@ -1,441 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:protobuf/meta.dart';
-import 'package:protoc_plugin/src/dart_options.pb.dart';
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-
-/// A Dart function called on each item added to a repeated list
-/// to check its type and range.
-const checkItem = '\$checkItem';
-
-/// The Dart member names in a GeneratedMessage subclass for one protobuf field.
-class MemberNames {
- /// The descriptor of the field these member names apply to.
- final FieldDescriptorProto descriptor;
-
- /// The index of this field in MessageGenerator.fieldList.
- /// The same index will be stored in FieldInfo.index.
- final int index;
-
- /// Identifier for generated getters/setters.
- final String fieldName;
-
- /// Identifier for the generated hasX() method, without braces.
- ///
- /// `null` for repeated fields.
- final String hasMethodName;
-
- /// Identifier for the generated clearX() method, without braces.
- ///
- /// `null` for repeated fields.
- final String clearMethodName;
-
- MemberNames(this.descriptor, this.index, this.fieldName,
- {this.hasMethodName, this.clearMethodName});
-}
-
-/// Move any initial underscores in [input] to the end.
-///
-/// According to the spec identifiers cannot start with _, but it seems to be
-/// accepted by protoc.
-///
-/// These identifiers are private in Dart, so they have to be transformed.
-String avoidInitialUnderscore(String input) {
- while (input.startsWith('_')) {
- input = '${input.substring(1)}_';
- }
- return input;
-}
-
-/// Returns [input] surrounded by single quotes and with all '$'s escaped.
-String singleQuote(String input) {
- return "'${input.replaceAll(r'$', r'\$')}'";
-}
-
-/// Chooses the Dart name of an extension.
-String extensionName(FieldDescriptorProto descriptor, Set<String> usedNames) {
- return _unusedMemberNames(descriptor, null, usedNames).fieldName;
-}
-
-Iterable<String> extensionSuffixes() sync* {
- yield "Ext";
- int i = 2;
- while (true) {
- yield '$i';
- i++;
- }
-}
-
-/// Replaces all characters in [imput] that are not valid in a dart identifier
-/// with _.
-///
-/// This function does not take care of leading underscores.
-String legalDartIdentifier(String imput) {
- return imput.replaceAll(new RegExp(r'[^a-zA-Z0-9$_]'), '_');
-}
-
-/// Chooses the name of the Dart class holding top-level extensions.
-String extensionClassName(
- FileDescriptorProto descriptor, Set<String> usedNames) {
- String s = avoidInitialUnderscore(
- legalDartIdentifier(_fileNameWithoutExtension(descriptor)));
- String candidate = '${s[0].toUpperCase()}${s.substring(1)}';
- return disambiguateName(candidate, usedNames, extensionSuffixes());
-}
-
-String _fileNameWithoutExtension(FileDescriptorProto descriptor) {
- Uri path = new Uri.file(descriptor.name);
- String fileName = path.pathSegments.last;
- int dot = fileName.lastIndexOf(".");
- return dot == -1 ? fileName : fileName.substring(0, dot);
-}
-
-// Exception thrown when a field has an invalid 'dart_name' option.
-class DartNameOptionException implements Exception {
- final String message;
- DartNameOptionException(this.message);
- String toString() => "$message";
-}
-
-/// Returns a [name] that is not contained in [usedNames] by suffixing it with
-/// the first possible suffix from [suffixes].
-///
-/// The chosen name is added to [usedNames].
-///
-/// If [variants] is given, all the variants of a name must be available before
-/// that name is chosen, and all the chosen variants will be added to
-/// [usedNames].
-/// The returned name is that, which will generate the accepted variants.
-String disambiguateName(
- String name, Set<String> usedNames, Iterable<String> suffixes,
- {List<String> Function(String candidate) generateVariants}) {
- generateVariants ??= (String name) => <String>[name];
-
- bool allVariantsAvailable(List<String> variants) {
- return variants.every((String variant) => !usedNames.contains(variant));
- }
-
- String usedSuffix = '';
- List<String> candidateVariants = generateVariants(name);
-
- if (!allVariantsAvailable(candidateVariants)) {
- for (String suffix in suffixes) {
- candidateVariants = generateVariants('$name$suffix');
- if (allVariantsAvailable(candidateVariants)) {
- usedSuffix = suffix;
- break;
- }
- }
- }
-
- usedNames.addAll(candidateVariants);
- return '$name$usedSuffix';
-}
-
-Iterable<String> defaultSuffixes() sync* {
- yield '_';
- int i = 0;
- while (true) {
- yield ('_$i');
- i++;
- }
-}
-
-/// Chooses the name of the Dart class to generate for a proto message or enum.
-///
-/// For a nested message or enum, [parent] should be provided
-/// with the name of the Dart class for the immediate parent.
-String messageOrEnumClassName(String descriptorName, Set<String> usedNames,
- {String parent = ''}) {
- if (parent != '') {
- descriptorName = '${parent}_${descriptorName}';
- }
- return disambiguateName(
- avoidInitialUnderscore(descriptorName), usedNames, defaultSuffixes());
-}
-
-/// Returns the set of names reserved by the ProtobufEnum class and its
-/// generated subclasses.
-Set<String> get reservedEnumNames => new Set<String>()
- ..addAll(ProtobufEnum_reservedNames)
- ..addAll(_protobufEnumNames);
-
-Iterable<String> enumSuffixes() sync* {
- String s = '_';
- while (true) {
- yield s;
- s += '_';
- }
-}
-
-/// Chooses the GeneratedMessage member names for each field.
-///
-/// Additional names to avoid can be supplied using [reserved].
-/// (This should only be used for mixins.)
-///
-/// Returns a map from the field name in the .proto file to its
-/// corresponding MemberNames.
-///
-/// Throws [DartNameOptionException] if a field has this option and
-/// it's set to an invalid name.
-Map<String, MemberNames> messageFieldNames(DescriptorProto descriptor,
- {Iterable<String> reserved = const []}) {
- var sorted = new List<FieldDescriptorProto>.from(descriptor.field)
- ..sort((FieldDescriptorProto a, FieldDescriptorProto b) {
- if (a.number < b.number) return -1;
- if (a.number > b.number) return 1;
- throw "multiple fields defined for tag ${a.number} in ${descriptor.name}";
- });
-
- // Choose indexes first, based on their position in the sorted list.
- var indexes = <String, int>{};
- for (var field in sorted) {
- var index = indexes.length;
- indexes[field.name] = index;
- }
-
- var existingNames = new Set<String>()
- ..addAll(reservedMemberNames)
- ..addAll(reserved);
-
- var memberNames = <String, MemberNames>{};
-
- void takeNames(MemberNames chosen) {
- memberNames[chosen.descriptor.name] = chosen;
-
- existingNames.add(chosen.fieldName);
- if (chosen.hasMethodName != null) {
- existingNames.add(chosen.hasMethodName);
- }
- if (chosen.clearMethodName != null) {
- existingNames.add(chosen.clearMethodName);
- }
- }
-
- // Handle fields with a dart_name option.
- // They have higher priority than automatically chosen names.
- // Explicitly setting a name that's already taken is a build error.
- for (var field in sorted) {
- if (_nameOption(field).isNotEmpty) {
- takeNames(_memberNamesFromOption(
- descriptor, field, indexes[field.name], existingNames));
- }
- }
-
- // Then do other fields.
- // They are automatically renamed until we find something unused.
- for (var field in sorted) {
- if (_nameOption(field).isEmpty) {
- var index = indexes[field.name];
- takeNames(_unusedMemberNames(field, index, existingNames));
- }
- }
-
- // Return a map with entries in sorted order.
- var result = <String, MemberNames>{};
- for (var field in sorted) {
- result[field.name] = memberNames[field.name];
- }
- return result;
-}
-
-/// Chooses the member names for a field that has the 'dart_name' option.
-///
-/// If the explicitly-set Dart name is already taken, throw an exception.
-/// (Fails the build.)
-MemberNames _memberNamesFromOption(DescriptorProto message,
- FieldDescriptorProto field, int index, Set<String> existingNames) {
- // TODO(skybrian): provide more context in errors (filename).
- var where = "${message.name}.${field.name}";
-
- void checkAvailable(String name) {
- if (existingNames.contains(name)) {
- throw new DartNameOptionException(
- "$where: dart_name option is invalid: '$name' is already used");
- }
- }
-
- var name = _nameOption(field);
- if (name.isEmpty) {
- throw new ArgumentError("field doesn't have dart_name option");
- }
- if (!_isDartFieldName(name)) {
- throw new DartNameOptionException("$where: dart_name option is invalid: "
- "'$name' is not a valid Dart field name");
- }
- checkAvailable(name);
-
- if (_isRepeated(field)) {
- return new MemberNames(field, index, name);
- }
-
- String hasMethod = "has${_capitalize(name)}";
- checkAvailable(hasMethod);
-
- String clearMethod = "clear${_capitalize(name)}";
- checkAvailable(clearMethod);
-
- return new MemberNames(field, index, name,
- hasMethodName: hasMethod, clearMethodName: clearMethod);
-}
-
-Iterable<String> _memberNamesSuffix(int number) sync* {
- String suffix = '_$number';
- while (true) {
- yield suffix;
- suffix = '${suffix}_$number';
- }
-}
-
-MemberNames _unusedMemberNames(
- FieldDescriptorProto field, int index, Set<String> existingNames) {
- if (_isRepeated(field)) {
- return new MemberNames(
- field,
- index,
- disambiguateName(_defaultFieldName(_fieldMethodSuffix(field)),
- existingNames, _memberNamesSuffix(field.number)));
- }
-
- List<String> generateNameVariants(String name) {
- return [
- _defaultFieldName(name),
- _defaultHasMethodName(name),
- _defaultClearMethodName(name)
- ];
- }
-
- String name = disambiguateName(_fieldMethodSuffix(field), existingNames,
- _memberNamesSuffix(field.number),
- generateVariants: generateNameVariants);
- return new MemberNames(field, index, _defaultFieldName(name),
- hasMethodName: _defaultHasMethodName(name),
- clearMethodName: _defaultClearMethodName(name));
-}
-
-/// The name to use by default for the Dart getter and setter.
-/// (A suffix will be added if there is a conflict.)
-String _defaultFieldName(String fieldMethodSuffix) {
- return '${fieldMethodSuffix[0].toLowerCase()}${fieldMethodSuffix.substring(1)}';
-}
-
-String _defaultHasMethodName(String fieldMethodSuffix) =>
- 'has$fieldMethodSuffix';
-
-String _defaultClearMethodName(String fieldMethodSuffix) =>
- 'clear$fieldMethodSuffix';
-
-/// The suffix to use for this field in Dart method names.
-/// (It should be camelcase and begin with an uppercase letter.)
-String _fieldMethodSuffix(FieldDescriptorProto field) {
- var name = _nameOption(field);
- if (name.isNotEmpty) return _capitalize(name);
-
- if (field.type != FieldDescriptorProto_Type.TYPE_GROUP) {
- return _underscoresToCamelCase(field.name);
- }
-
- // For groups, use capitalization of 'typeName' rather than 'name'.
- name = field.typeName;
- int index = name.lastIndexOf('.');
- if (index != -1) {
- name = name.substring(index + 1);
- }
- return _underscoresToCamelCase(name);
-}
-
-String _underscoresToCamelCase(s) => s.split('_').map(_capitalize).join('');
-
-String _capitalize(s) =>
- s.isEmpty ? s : '${s[0].toUpperCase()}${s.substring(1)}';
-
-bool _isRepeated(FieldDescriptorProto field) =>
- field.label == FieldDescriptorProto_Label.LABEL_REPEATED;
-
-String _nameOption(FieldDescriptorProto field) =>
- field.options.getExtension(Dart_options.dartName);
-
-bool _isDartFieldName(name) => name.startsWith(_dartFieldNameExpr);
-
-final _dartFieldNameExpr = new RegExp(r'^[a-z]\w+$');
-
-/// Names that would collide with capitalized core Dart names as top-level
-/// identifiers.
-final List<String> toplevelReservedCapitalizedNames = const <String>[
- 'List',
- 'Function',
- 'Map',
-];
-
-final List<String> reservedMemberNames = <String>[]
- ..addAll(_dartReservedWords)
- ..addAll(GeneratedMessage_reservedNames)
- ..addAll(_generatedMessageNames);
-
-final List<String> forbiddenExtensionNames = <String>[]
- ..addAll(_dartReservedWords)
- ..addAll(GeneratedMessage_reservedNames)
- ..addAll(_generatedMessageNames);
-
-// List of Dart language reserved words in names which cannot be used in a
-// subclass of GeneratedMessage.
-const List<String> _dartReservedWords = const [
- 'assert',
- 'break',
- 'case',
- 'catch',
- 'class',
- 'const',
- 'continue',
- 'default',
- 'do',
- 'else',
- 'enum',
- 'extends',
- 'false',
- 'final',
- 'finally',
- 'for',
- 'if',
- 'in',
- 'is',
- 'new',
- 'null',
- 'rethrow',
- 'return',
- 'super',
- 'switch',
- 'this',
- 'throw',
- 'true',
- 'try',
- 'var',
- 'void',
- 'while',
- 'with'
-];
-
-// List of names used in the generated message classes.
-//
-// This is in addition to GeneratedMessage_reservedNames, which are names from
-// the base GeneratedMessage class determined by reflection.
-const _generatedMessageNames = const <String>[
- 'create',
- 'createRepeated',
- 'getDefault',
- 'List',
- checkItem
-];
-
-// List of names used in the generated enum classes.
-//
-// This is in addition to ProtobufEnum_reservedNames, which are names from the
-// base ProtobufEnum class determined by reflection.
-const _protobufEnumNames = const <String>[
- 'List',
- 'valueOf',
- 'values',
- checkItem
-];
diff --git a/lib/options.dart b/lib/options.dart
deleted file mode 100644
index c8fc4a6..0000000
--- a/lib/options.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-/// Helper function implementing a generic option parser that reads
-/// `request.parameters` and treats each token as either a flag ("name") or a
-/// key-value pair ("name=value"). For each option "name", it looks up whether a
-/// [SingleOptionParser] exists in [parsers] and delegates the actual parsing of
-/// the option to it. Returns `true` if no errors were reported.
-bool genericOptionsParser(CodeGeneratorRequest request,
- CodeGeneratorResponse response, Map<String, SingleOptionParser> parsers) {
- var parameter = request.parameter != null ? request.parameter : '';
- var options = parameter.trim().split(',');
- var errors = [];
-
- for (var option in options) {
- option = option.trim();
- if (option.isEmpty) continue;
- void reportError(String details) {
- errors.add('Error found trying to parse the option: $option.\n$details');
- }
-
- var nameValue = option.split('=');
- if (nameValue.length != 1 && nameValue.length != 2) {
- reportError('Options should be a single token, or a name=value pair');
- continue;
- }
- var name = nameValue[0].trim();
- var parser = parsers[name];
- if (parser == null) {
- reportError('Unknown option ($name).');
- continue;
- }
-
- var value = nameValue.length > 1 ? nameValue[1].trim() : null;
- parser.parse(name, value, reportError);
- }
-
- if (errors.length == 0) return true;
-
- response.error = errors.join('\n');
- return false;
-}
-
-/// Options expected by the protoc code generation compiler.
-class GenerationOptions {
- final bool useGrpc;
-
- GenerationOptions({this.useGrpc = false});
-}
-
-/// A parser for a name-value pair option. Options parsed in
-/// [genericOptionsParser] delegate to instances of this class to
-/// parse the value of a specific option.
-abstract class SingleOptionParser {
- /// Parse the [name]=[value] value pair and report any errors to [onError]. If
- /// the option is a flag, [value] will be null. Note, [name] is commonly
- /// unused. It is provided because [SingleOptionParser] can be registered for
- /// multiple option names in [genericOptionsParser].
- void parse(String name, String value, onError(String details));
-}
-
-class GrpcOptionParser implements SingleOptionParser {
- bool grpcEnabled = false;
-
- @override
- void parse(String name, String value, onError(String details)) {
- if (value != null) {
- onError('Invalid grpc option. No value expected.');
- return;
- }
- grpcEnabled = true;
- }
-}
-
-/// Parser used by the compiler, which supports the `rpc` option (see
-/// [RpcOptionParser]) and any additional option added in [parsers]. If
-/// [parsers] has a key for `rpc`, it will be ignored.
-GenerationOptions parseGenerationOptions(
- CodeGeneratorRequest request, CodeGeneratorResponse response,
- [Map<String, SingleOptionParser> parsers]) {
- final newParsers = <String, SingleOptionParser>{};
- if (parsers != null) newParsers.addAll(parsers);
-
- final grpcOptionParser = new GrpcOptionParser();
- newParsers['grpc'] = grpcOptionParser;
-
- if (genericOptionsParser(request, response, newParsers)) {
- return new GenerationOptions(useGrpc: grpcOptionParser.grpcEnabled);
- }
- return null;
-}
diff --git a/lib/output_config.dart b/lib/output_config.dart
deleted file mode 100644
index 534f24e..0000000
--- a/lib/output_config.dart
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-/// Configures where output of the protoc compiler should be placed and how to
-/// import one generated file from another.
-abstract class OutputConfiguration {
- const OutputConfiguration();
-
- /// Resolves an import of a generated Dart file.
- ///
- /// Both [source] and [target] are .proto files, where [source] imports
- /// [target].
- ///
- /// The returned URI can be used within one of the source's dart files to
- /// import the target's generated file with the given extension.
- Uri resolveImport(Uri target, Uri source, String extension);
-
- /// Returns the path where the .pb.dart file will be placed.
- ///
- /// The input is a .proto file and the output is a path under the output
- /// folder.
- Uri outputPathFor(Uri inputPath, String extension);
-}
-
-/// Default [OutputConfiguration] that uses the same path as the input
-/// file for the output file (just replaces the extension), and that uses
-/// relative paths to resolve imports.
-class DefaultOutputConfiguration extends OutputConfiguration {
- const DefaultOutputConfiguration();
-
- @override
- Uri outputPathFor(Uri input, String extension) {
- var base = path.withoutExtension(path.url.fromUri(input));
- return path.url.toUri('$base$extension');
- }
-
- @override
- Uri resolveImport(Uri target, Uri source, String extension) {
- var targetPath = path.url.fromUri(target);
- var sourceDir = path.url.dirname(path.url.fromUri(source));
- var base =
- path.withoutExtension(path.url.relative(targetPath, from: sourceDir));
- return path.url.toUri('$base$extension');
- }
-}
diff --git a/lib/protobuf_field.dart b/lib/protobuf_field.dart
deleted file mode 100644
index 83eca16..0000000
--- a/lib/protobuf_field.dart
+++ /dev/null
@@ -1,335 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class ProtobufField {
- static final RegExp HEX_LITERAL_REGEX =
- new RegExp(r'^0x[0-9a-f]+$', multiLine: false, caseSensitive: false);
- static final RegExp INTEGER_LITERAL_REGEX = new RegExp(r'^[+-]?[0-9]+$');
- static final RegExp DECIMAL_LITERAL_REGEX_A = new RegExp(
- r'^[+-]?([0-9]*)\.[0-9]+(e[+-]?[0-9]+)?$',
- multiLine: false,
- caseSensitive: false);
- static final RegExp DECIMAL_LITERAL_REGEX_B = new RegExp(
- r'^[+-]?[0-9]+e[+-]?[0-9]+$',
- multiLine: false,
- caseSensitive: false);
-
- final FieldDescriptorProto descriptor;
-
- /// Dart names within a GeneratedMessage or `null` for an extension.
- final MemberNames memberNames;
-
- final String fullName;
- final BaseType baseType;
-
- ProtobufField.message(
- MemberNames names, ProtobufContainer parent, GenerationContext ctx)
- : this._(names.descriptor, names, parent, ctx);
-
- ProtobufField.extension(FieldDescriptorProto descriptor,
- ProtobufContainer parent, GenerationContext ctx)
- : this._(descriptor, null, parent, ctx);
-
- ProtobufField._(FieldDescriptorProto descriptor, MemberNames dartNames,
- ProtobufContainer parent, GenerationContext ctx)
- : this.descriptor = descriptor,
- this.memberNames = dartNames,
- fullName = '${parent.fullName}.${descriptor.name}',
- baseType = new BaseType(descriptor, ctx);
-
- /// The index of this field in MessageGenerator.fieldList.
- ///
- /// `null` for an extension.
- int get index => memberNames?.index;
-
- bool get isRequired =>
- descriptor.label == FieldDescriptorProto_Label.LABEL_REQUIRED;
-
- bool get isRepeated =>
- descriptor.label == FieldDescriptorProto_Label.LABEL_REPEATED;
-
- /// True if the field is to be encoded with [packed=true] encoding.
- bool get isPacked =>
- isRepeated && descriptor.options != null && descriptor.options.packed;
-
- /// Whether the field has the `overrideGetter` annotation set to true.
- bool get overridesGetter => _hasBooleanOption(Dart_options.overrideGetter);
-
- /// Whether the field has the `overrideSetter` annotation set to true.
- bool get overridesSetter => _hasBooleanOption(Dart_options.overrideSetter);
-
- /// Whether the field has the `overrideHasMethod` annotation set to true.
- bool get overridesHasMethod =>
- _hasBooleanOption(Dart_options.overrideHasMethod);
-
- /// Whether the field has the `overrideClearMethod` annotation set to true.
- bool get overridesClearMethod =>
- _hasBooleanOption(Dart_options.overrideClearMethod);
-
- /// True if this field uses the Int64 from the fixnum package.
- bool get needsFixnumImport => baseType.unprefixed == "Int64";
-
- /// True if this field is a map field definition: `map<key_type, value_type> map_field = N`.
- bool get isMapField {
- if (!isRepeated || !baseType.isMessage) return false;
- MessageGenerator generator = baseType.generator;
- return generator._descriptor.options.hasMapEntry();
- }
-
- /// Returns the expression to use for the Dart type.
- ///
- /// This will be a List for repeated types.
- /// [fileGen] represents the .proto file where we are generating code.
- String getDartType(FileGenerator fileGen) {
- if (isMapField) {
- MessageGenerator d = baseType.generator;
- String keyType = d._fieldList[0].baseType.getDartType(fileGen);
- String valueType = d._fieldList[1].baseType.getDartType(fileGen);
- return 'Map<$keyType, $valueType>';
- }
- if (isRepeated) return baseType.getRepeatedDartType(fileGen);
- return baseType.getDartType(fileGen);
- }
-
- /// Returns the tag number of the underlying proto field.
- int get number => descriptor.number;
-
- /// Returns the constant in PbFieldType corresponding to this type.
- String get typeConstant {
- String prefix = 'O';
- if (isRequired) {
- prefix = 'Q';
- } else if (isPacked) {
- prefix = 'K';
- } else if (isRepeated) {
- prefix = 'P';
- }
- return "$_protobufImportPrefix.PbFieldType." +
- prefix +
- baseType.typeConstantSuffix;
- }
-
- /// Returns Dart code adding this field to a BuilderInfo object.
- /// The call will start with ".." and a method name.
- /// [fileGen] represents the .proto file where the code will be evaluated.
- String generateBuilderInfoCall(FileGenerator fileGen, String dartFieldName) {
- String quotedName = "'$dartFieldName'";
- String type = baseType.getDartType(fileGen);
-
- if (isMapField) {
- MessageGenerator generator = baseType.generator;
- ProtobufField key = generator._fieldList[0];
- ProtobufField value = generator._fieldList[1];
- String keyType = key.baseType.getDartType(fileGen);
- String valueType = value.baseType.getDartType(fileGen);
- String keyTypeConstant = key.typeConstant;
- String valTypeConstant = value.typeConstant;
-
- if (value.baseType.isMessage || value.baseType.isGroup) {
- return '..m<$keyType, $valueType>($number, $quotedName, '
- '$keyTypeConstant, $valTypeConstant, $valueType.create)';
- }
- if (value.baseType.isEnum) {
- return '..m<$keyType, $valueType>($number, $quotedName, '
- '$keyTypeConstant, $valTypeConstant, null, $valueType.valueOf, '
- '$valueType.values)';
- }
- return '..m<$keyType, $valueType>($number, $quotedName, '
- '$keyTypeConstant, $valTypeConstant)';
- }
-
- if (isRepeated) {
- if (baseType.isMessage || baseType.isGroup) {
- return '..pp<$type>($number, $quotedName, $typeConstant,'
- ' $type.$checkItem, $type.create)';
- }
- if (baseType.isEnum) {
- return '..pp<$type>($number, $quotedName, $typeConstant,'
- ' $type.$checkItem, null, $type.valueOf, $type.values)';
- }
- if (typeConstant == '$_protobufImportPrefix.PbFieldType.PS') {
- return '..pPS($number, $quotedName)';
- }
- return '..p<$type>($number, $quotedName, $typeConstant)';
- }
-
- String makeDefault = generateDefaultFunction(fileGen);
- if (baseType.isEnum) {
- String enumParams = '$type.valueOf, $type.values';
- return '..e<$type>('
- '$number, $quotedName, $typeConstant, $makeDefault, $enumParams)';
- }
-
- String prefix = '..a<$type>($number, $quotedName, $typeConstant';
- if (makeDefault == null) {
- switch (type) {
- case 'String':
- if (typeConstant == '$_protobufImportPrefix.PbFieldType.OS') {
- return '..aOS($number, $quotedName)';
- } else if (typeConstant == '$_protobufImportPrefix.PbFieldType.QS') {
- return '..aQS($number, $quotedName)';
- }
- break;
- case 'bool':
- if (typeConstant == '$_protobufImportPrefix.PbFieldType.OB') {
- return '..aOB($number, $quotedName)';
- }
- break;
- default:
- break;
- }
- return prefix + ')';
- }
-
- if (makeDefault == 'Int64.ZERO' &&
- type == 'Int64' &&
- typeConstant == '$_protobufImportPrefix.PbFieldType.O6') {
- return '..aInt64($number, $quotedName)';
- }
-
- if (baseType.isMessage || baseType.isGroup) {
- return prefix + ', $makeDefault, $type.create)';
- }
-
- return prefix + ', $makeDefault)';
- }
-
- /// Returns a Dart expression that evaluates to this field's default value.
- ///
- /// Returns "null" if unavailable, in which case FieldSet._getDefault()
- /// should be called instead.
- String getDefaultExpr() {
- if (isRepeated) return "null";
- switch (descriptor.type) {
- case FieldDescriptorProto_Type.TYPE_BOOL:
- return _getDefaultAsBoolExpr("false");
- case FieldDescriptorProto_Type.TYPE_INT32:
- case FieldDescriptorProto_Type.TYPE_UINT32:
- case FieldDescriptorProto_Type.TYPE_SINT32:
- case FieldDescriptorProto_Type.TYPE_FIXED32:
- case FieldDescriptorProto_Type.TYPE_SFIXED32:
- return _getDefaultAsInt32Expr("0");
- case FieldDescriptorProto_Type.TYPE_STRING:
- return _getDefaultAsStringExpr("''");
- default:
- return "null";
- }
- }
-
- /// Returns a function expression that returns the field's default value.
- ///
- /// [fileGen] represents the .proto file where the expression will be
- /// evaluated.
- String generateDefaultFunction(FileGenerator fileGen) {
- if (isRepeated) {
- return '() => new $_protobufImportPrefix.PbList()';
- }
- bool sameProtoFile =
- fileGen.protoFileUri == baseType.generator?.fileGen?.protoFileUri;
-
- switch (descriptor.type) {
- case FieldDescriptorProto_Type.TYPE_BOOL:
- return _getDefaultAsBoolExpr(null);
- case FieldDescriptorProto_Type.TYPE_FLOAT:
- case FieldDescriptorProto_Type.TYPE_DOUBLE:
- if (!descriptor.hasDefaultValue()) {
- return null;
- } else if ('0.0' == descriptor.defaultValue ||
- '0' == descriptor.defaultValue) {
- return null;
- } else if (descriptor.defaultValue == 'inf') {
- return 'double.infinity';
- } else if (descriptor.defaultValue == '-inf') {
- return 'double.negativeInfinity';
- } else if (descriptor.defaultValue == 'nan') {
- return 'double.nan';
- } else if (HEX_LITERAL_REGEX.hasMatch(descriptor.defaultValue)) {
- return '(${descriptor.defaultValue}).toDouble()';
- } else if (INTEGER_LITERAL_REGEX.hasMatch(descriptor.defaultValue)) {
- return '${descriptor.defaultValue}.0';
- } else if (DECIMAL_LITERAL_REGEX_A.hasMatch(descriptor.defaultValue) ||
- DECIMAL_LITERAL_REGEX_B.hasMatch(descriptor.defaultValue)) {
- return '${descriptor.defaultValue}';
- }
- throw _invalidDefaultValue;
- case FieldDescriptorProto_Type.TYPE_INT32:
- case FieldDescriptorProto_Type.TYPE_UINT32:
- case FieldDescriptorProto_Type.TYPE_SINT32:
- case FieldDescriptorProto_Type.TYPE_FIXED32:
- case FieldDescriptorProto_Type.TYPE_SFIXED32:
- return _getDefaultAsInt32Expr(null);
- case FieldDescriptorProto_Type.TYPE_INT64:
- case FieldDescriptorProto_Type.TYPE_UINT64:
- case FieldDescriptorProto_Type.TYPE_SINT64:
- case FieldDescriptorProto_Type.TYPE_FIXED64:
- case FieldDescriptorProto_Type.TYPE_SFIXED64:
- var value = '0';
- if (descriptor.hasDefaultValue()) value = descriptor.defaultValue;
- if (value == '0') return 'Int64.ZERO';
- return "$_protobufImportPrefix.parseLongInt('$value')";
- case FieldDescriptorProto_Type.TYPE_STRING:
- return _getDefaultAsStringExpr(null);
- case FieldDescriptorProto_Type.TYPE_BYTES:
- if (!descriptor.hasDefaultValue() || descriptor.defaultValue.isEmpty) {
- return null;
- }
- String byteList = descriptor.defaultValue.codeUnits
- .map((b) => '0x${b.toRadixString(16)}')
- .join(',');
- return '() => <int>[$byteList]';
- case FieldDescriptorProto_Type.TYPE_GROUP:
- case FieldDescriptorProto_Type.TYPE_MESSAGE:
- if (sameProtoFile) return '${baseType.unprefixed}.getDefault';
- return "${baseType.prefixed}.getDefault";
- case FieldDescriptorProto_Type.TYPE_ENUM:
- var className = sameProtoFile ? baseType.unprefixed : baseType.prefixed;
- EnumGenerator gen = baseType.generator;
- if (descriptor.hasDefaultValue() &&
- descriptor.defaultValue.isNotEmpty) {
- return '$className.${descriptor.defaultValue}';
- } else if (gen._canonicalValues.isNotEmpty) {
- return '$className.${gen.dartNames[gen._canonicalValues[0].name]}';
- }
- return null;
- default:
- throw _typeNotImplemented("generatedDefaultFunction");
- }
- }
-
- String _getDefaultAsBoolExpr(String noDefault) {
- if (descriptor.hasDefaultValue() && 'false' != descriptor.defaultValue) {
- return '${descriptor.defaultValue}';
- }
- return noDefault;
- }
-
- String _getDefaultAsStringExpr(String noDefault) {
- if (!descriptor.hasDefaultValue() || descriptor.defaultValue.isEmpty) {
- return noDefault;
- }
- // TODO(skybrian): fix dubious escaping.
- String value = descriptor.defaultValue.replaceAll(r'$', r'\$');
- return '\'$value\'';
- }
-
- String _getDefaultAsInt32Expr(String noDefault) {
- if (descriptor.hasDefaultValue() && '0' != descriptor.defaultValue) {
- return '${descriptor.defaultValue}';
- }
- return noDefault;
- }
-
- bool _hasBooleanOption(Extension extension) =>
- descriptor?.options?.getExtension(extension) ?? false;
-
- get _invalidDefaultValue => "dart-protoc-plugin:"
- " invalid default value (${descriptor.defaultValue})"
- " found in field $fullName";
-
- _typeNotImplemented(String methodName) => "dart-protoc-plugin:"
- " $methodName not implemented for type (${descriptor.type})"
- " found in field $fullName";
-}
diff --git a/lib/protoc.dart b/lib/protoc.dart
deleted file mode 100644
index 6a1b390..0000000
--- a/lib/protoc.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-library protoc;
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:dart_style/dart_style.dart';
-import 'package:protobuf/mixins_meta.dart';
-import 'package:protobuf/protobuf.dart';
-import 'package:path/path.dart' as path;
-
-import 'src/dart_options.pb.dart';
-import 'src/descriptor.pb.dart';
-import 'src/plugin.pb.dart';
-
-import 'const_generator.dart' show writeJsonConst;
-import 'indenting_writer.dart' show IndentingWriter;
-import 'names.dart';
-
-part 'base_type.dart';
-part 'client_generator.dart';
-part 'code_generator.dart';
-part 'enum_generator.dart';
-part 'extension_generator.dart';
-part 'file_generator.dart';
-part 'grpc_generator.dart';
-part 'linker.dart';
-part 'message_generator.dart';
-part 'options.dart';
-part 'output_config.dart';
-part 'protobuf_field.dart';
-part 'service_generator.dart';
diff --git a/lib/service_generator.dart b/lib/service_generator.dart
deleted file mode 100644
index e06d5fc..0000000
--- a/lib/service_generator.dart
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of protoc;
-
-class ServiceGenerator {
- final ServiceDescriptorProto _descriptor;
-
- /// The generator of the .pb.dart file that will contain this service.
- final FileGenerator fileGen;
-
- /// The message types needed directly by this service.
- ///
- /// The key is the fully qualified name with a leading '.'.
- /// Populated by [resolve].
- final _deps = <String, MessageGenerator>{};
-
- /// The message types needed transitively by this service.
- ///
- /// The key is the fully qualified name with a leading '.'.
- /// Populated by [resolve].
- final _transitiveDeps = <String, MessageGenerator>{};
-
- /// Maps each undefined type to a string describing its location.
- ///
- /// Populated by [resolve].
- final _undefinedDeps = <String, String>{};
-
- final String classname;
-
- static String serviceBaseName(String originalName) {
- if (originalName.endsWith("Service")) {
- return originalName + "Base"; // avoid: ServiceServiceBase
- } else {
- return originalName + "ServiceBase";
- }
- }
-
- ServiceGenerator(this._descriptor, this.fileGen, Set<String> usedNames)
- : classname = disambiguateName(
- serviceBaseName(avoidInitialUnderscore(_descriptor.name)),
- usedNames,
- defaultSuffixes());
-
- /// Finds all message types used by this service.
- ///
- /// Puts the types found in [_deps] and [_transitiveDeps].
- /// If a type name can't be resolved, puts it in [_undefinedDeps].
- /// Precondition: messages have been registered and resolved.
- void resolve(GenerationContext ctx) {
- for (var m in _methodDescriptors) {
- _addDependency(ctx, m.inputType, "input type of ${m.name}");
- _addDependency(ctx, m.outputType, "output type of ${m.name}");
- }
- _resolveMoreTypes(ctx);
- }
-
- /// Hook for a subclass to register any additional types it uses.
- void _resolveMoreTypes(GenerationContext ctx) {}
-
- /// Adds a dependency on the given message type.
- ///
- /// If the type name can't be resolved, adds it to [_undefinedDeps].
- /// If it can, recursively adds the types of its fields as well.
- void _addDependency(GenerationContext ctx, String fqname, String location) {
- if (_deps.containsKey(fqname)) return; // Already added.
-
- MessageGenerator mg = ctx.getFieldType(fqname);
- if (mg == null) {
- _undefinedDeps[fqname] = location;
- return;
- }
- _addDepsRecursively(mg, 0);
- }
-
- void _addDepsRecursively(MessageGenerator mg, int depth) {
- if (_transitiveDeps.containsKey(mg.dottedName)) {
- // Already added, but perhaps at a different depth.
- if (depth == 0) _deps[mg.dottedName] = mg;
- return;
- }
- mg.checkResolved();
- if (depth == 0) _deps[mg.dottedName] = mg;
- _transitiveDeps[mg.dottedName] = mg;
- for (var field in mg._fieldList) {
- if (field.baseType.isGroup || field.baseType.isMessage) {
- _addDepsRecursively(field.baseType.generator, depth + 1);
- }
- }
- }
-
- /// Adds dependencies of [generate] to [imports].
- ///
- /// For each .pb.dart file that the generated code needs to import,
- /// add its generator.
- void addImportsTo(Set<FileGenerator> imports) {
- for (var mg in _deps.values) {
- imports.add(mg.fileGen);
- }
- }
-
- /// Adds dependencies of [generateConstants] to [imports].
- ///
- /// For each .pbjson.dart file that the generated code needs to import,
- /// add its generator.
- void addConstantImportsTo(Set<FileGenerator> imports) {
- for (var mg in _transitiveDeps.values) {
- imports.add(mg.fileGen);
- }
- }
-
- /// Returns the Dart class name to use for a message type.
- ///
- /// Throws an exception if it can't be resolved.
- String _getDartClassName(String fqname) {
- var mg = _deps[fqname];
- if (mg == null) {
- var location = _undefinedDeps[fqname];
- throw 'FAILURE: Unknown type reference (${fqname}) for ${location}';
- }
- if (fileGen.protoFileUri == mg.fileGen.protoFileUri) {
- // If it's the same file, we import it without using "as".
- return mg.classname;
- }
- return mg.fileImportPrefix + "." + mg.classname;
- }
-
- List<MethodDescriptorProto> get _methodDescriptors => _descriptor.method;
-
- String _methodName(String name) =>
- name.substring(0, 1).toLowerCase() + name.substring(1);
-
- String get _parentClass => 'GeneratedService';
-
- void _generateStub(IndentingWriter out, MethodDescriptorProto m) {
- var methodName = _methodName(m.name);
- var inputClass = _getDartClassName(m.inputType);
- var outputClass = _getDartClassName(m.outputType);
-
- out.println('\$async.Future<$outputClass> $methodName('
- 'ServerContext ctx, $inputClass request);');
- }
-
- void _generateStubs(IndentingWriter out) {
- for (MethodDescriptorProto m in _methodDescriptors) {
- _generateStub(out, m);
- }
- out.println();
- }
-
- void _generateRequestMethod(IndentingWriter out) {
- out.addBlock('GeneratedMessage createRequest(String method) {', '}', () {
- out.addBlock("switch (method) {", "}", () {
- for (MethodDescriptorProto m in _methodDescriptors) {
- var inputClass = _getDartClassName(m.inputType);
- out.println("case '${m.name}': return new $inputClass();");
- }
- out.println("default: "
- "throw new ArgumentError('Unknown method: \$method');");
- });
- });
- out.println();
- }
-
- void _generateDispatchMethod(out) {
- out.addBlock(
- r'$async.Future<GeneratedMessage> handleCall(ServerContext ctx, '
- 'String method, GeneratedMessage request) {',
- '}', () {
- out.addBlock("switch (method) {", "}", () {
- for (MethodDescriptorProto m in _methodDescriptors) {
- var methodName = _methodName(m.name);
- out.println(
- "case '${m.name}': return this.$methodName(ctx, request);");
- }
- out.println("default: "
- "throw new ArgumentError('Unknown method: \$method');");
- });
- });
- out.println();
- }
-
- /// Hook for generating members added in subclasses.
- void _generateMoreClassMembers(IndentingWriter out) {}
-
- void generate(IndentingWriter out) {
- out.addBlock(
- 'abstract class $classname extends '
- '$_parentClass {',
- '}', () {
- _generateStubs(out);
- _generateRequestMethod(out);
- _generateDispatchMethod(out);
- _generateMoreClassMembers(out);
- out.println("Map<String, dynamic> get \$json => $jsonConstant;");
- out.println("Map<String, Map<String, dynamic>> get \$messageJson =>"
- " $messageJsonConstant;");
- });
- out.println();
- }
-
- String get jsonConstant => "$classname\$json";
- String get messageJsonConstant => "$classname\$messageJson";
-
- /// Writes Dart constants for the service and message descriptors.
- ///
- /// The map includes an entry for every message type that might need
- /// to be read or written (assuming the type name resolved).
- void generateConstants(IndentingWriter out) {
- out.print("const $jsonConstant = ");
- writeJsonConst(out, _descriptor.writeToJsonMap());
- out.println(";");
- out.println();
-
- var typeConstants = <String, String>{};
- for (var key in _transitiveDeps.keys) {
- typeConstants[key] = _transitiveDeps[key].getJsonConstant(fileGen);
- }
- out.addBlock("const $messageJsonConstant = const {", "};", () {
- for (var key in typeConstants.keys) {
- var typeConst = typeConstants[key];
- out.println("'$key': $typeConst,");
- }
- });
- out.println();
-
- if (_undefinedDeps.isNotEmpty) {
- for (var name in _undefinedDeps.keys) {
- var location = _undefinedDeps[name];
- out.println("// can't resolve ($name) used by $location");
- }
- out.println();
- }
- }
-}
diff --git a/lib/src/dart_options.pb.dart b/lib/src/dart_options.pb.dart
deleted file mode 100644
index 058f220..0000000
--- a/lib/src/dart_options.pb.dart
+++ /dev/null
@@ -1,140 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: dart_options.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class DartMixin extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('DartMixin',
- package: const $pb.PackageName('dart_options'))
- ..aOS(1, 'name')
- ..aOS(2, 'importFrom')
- ..aOS(3, 'parent')
- ..hasRequiredFields = false;
-
- DartMixin() : super();
- DartMixin.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- DartMixin.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- DartMixin clone() => new DartMixin()..mergeFromMessage(this);
- DartMixin copyWith(void Function(DartMixin) updates) =>
- super.copyWith((message) => updates(message as DartMixin));
- $pb.BuilderInfo get info_ => _i;
- static DartMixin create() => new DartMixin();
- static $pb.PbList<DartMixin> createRepeated() => new $pb.PbList<DartMixin>();
- static DartMixin getDefault() => _defaultInstance ??= create()..freeze();
- static DartMixin _defaultInstance;
- static void $checkItem(DartMixin v) {
- if (v is! DartMixin) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- String get importFrom => $_getS(1, '');
- set importFrom(String v) {
- $_setString(1, v);
- }
-
- bool hasImportFrom() => $_has(1);
- void clearImportFrom() => clearField(2);
-
- String get parent => $_getS(2, '');
- set parent(String v) {
- $_setString(2, v);
- }
-
- bool hasParent() => $_has(2);
- void clearParent() => clearField(3);
-}
-
-class Imports extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('Imports',
- package: const $pb.PackageName('dart_options'))
- ..pp<DartMixin>(
- 1, 'mixins', $pb.PbFieldType.PM, DartMixin.$checkItem, DartMixin.create)
- ..hasRequiredFields = false;
-
- Imports() : super();
- Imports.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- Imports.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- Imports clone() => new Imports()..mergeFromMessage(this);
- Imports copyWith(void Function(Imports) updates) =>
- super.copyWith((message) => updates(message as Imports));
- $pb.BuilderInfo get info_ => _i;
- static Imports create() => new Imports();
- static $pb.PbList<Imports> createRepeated() => new $pb.PbList<Imports>();
- static Imports getDefault() => _defaultInstance ??= create()..freeze();
- static Imports _defaultInstance;
- static void $checkItem(Imports v) {
- if (v is! Imports) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<DartMixin> get mixins => $_getList(0);
-}
-
-class Dart_options {
- static final $pb.Extension imports = new $pb.Extension<Imports>(
- 'google.protobuf.FileOptions',
- 'imports',
- 28125061,
- $pb.PbFieldType.OM,
- Imports.getDefault,
- Imports.create);
- static final $pb.Extension defaultMixin = new $pb.Extension<String>(
- 'google.protobuf.FileOptions',
- 'defaultMixin',
- 96128839,
- $pb.PbFieldType.OS);
- static final $pb.Extension mixin = new $pb.Extension<String>(
- 'google.protobuf.MessageOptions', 'mixin', 96128839, $pb.PbFieldType.OS);
- static final $pb.Extension overrideGetter = new $pb.Extension<bool>(
- 'google.protobuf.FieldOptions',
- 'overrideGetter',
- 28205290,
- $pb.PbFieldType.OB);
- static final $pb.Extension overrideSetter = new $pb.Extension<bool>(
- 'google.protobuf.FieldOptions',
- 'overrideSetter',
- 28937366,
- $pb.PbFieldType.OB);
- static final $pb.Extension overrideHasMethod = new $pb.Extension<bool>(
- 'google.protobuf.FieldOptions',
- 'overrideHasMethod',
- 28937461,
- $pb.PbFieldType.OB);
- static final $pb.Extension overrideClearMethod = new $pb.Extension<bool>(
- 'google.protobuf.FieldOptions',
- 'overrideClearMethod',
- 28907907,
- $pb.PbFieldType.OB);
- static final $pb.Extension dartName = new $pb.Extension<String>(
- 'google.protobuf.FieldOptions', 'dartName', 28700919, $pb.PbFieldType.OS);
- static void registerAllExtensions($pb.ExtensionRegistry registry) {
- registry.add(imports);
- registry.add(defaultMixin);
- registry.add(mixin);
- registry.add(overrideGetter);
- registry.add(overrideSetter);
- registry.add(overrideHasMethod);
- registry.add(overrideClearMethod);
- registry.add(dartName);
- }
-}
diff --git a/lib/src/descriptor.pb.dart b/lib/src/descriptor.pb.dart
deleted file mode 100644
index 09c44e0..0000000
--- a/lib/src/descriptor.pb.dart
+++ /dev/null
@@ -1,1645 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: descriptor.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:fixnum/fixnum.dart';
-import 'package:protobuf/protobuf.dart' as $pb;
-
-import 'descriptor.pbenum.dart';
-
-export 'descriptor.pbenum.dart';
-
-class FileDescriptorSet extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FileDescriptorSet',
- package: const $pb.PackageName('google.protobuf'))
- ..pp<FileDescriptorProto>(1, 'file', $pb.PbFieldType.PM,
- FileDescriptorProto.$checkItem, FileDescriptorProto.create);
-
- FileDescriptorSet() : super();
- FileDescriptorSet.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- FileDescriptorSet.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- FileDescriptorSet clone() => new FileDescriptorSet()..mergeFromMessage(this);
- FileDescriptorSet copyWith(void Function(FileDescriptorSet) updates) =>
- super.copyWith((message) => updates(message as FileDescriptorSet));
- $pb.BuilderInfo get info_ => _i;
- static FileDescriptorSet create() => new FileDescriptorSet();
- static $pb.PbList<FileDescriptorSet> createRepeated() =>
- new $pb.PbList<FileDescriptorSet>();
- static FileDescriptorSet getDefault() =>
- _defaultInstance ??= create()..freeze();
- static FileDescriptorSet _defaultInstance;
- static void $checkItem(FileDescriptorSet v) {
- if (v is! FileDescriptorSet)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<FileDescriptorProto> get file => $_getList(0);
-}
-
-class FileDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FileDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..aOS(2, 'package')
- ..pPS(3, 'dependency')
- ..pp<DescriptorProto>(4, 'messageType', $pb.PbFieldType.PM,
- DescriptorProto.$checkItem, DescriptorProto.create)
- ..pp<EnumDescriptorProto>(5, 'enumType', $pb.PbFieldType.PM,
- EnumDescriptorProto.$checkItem, EnumDescriptorProto.create)
- ..pp<ServiceDescriptorProto>(6, 'service', $pb.PbFieldType.PM,
- ServiceDescriptorProto.$checkItem, ServiceDescriptorProto.create)
- ..pp<FieldDescriptorProto>(7, 'extension', $pb.PbFieldType.PM,
- FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
- ..a<FileOptions>(8, 'options', $pb.PbFieldType.OM, FileOptions.getDefault,
- FileOptions.create)
- ..a<SourceCodeInfo>(9, 'sourceCodeInfo', $pb.PbFieldType.OM,
- SourceCodeInfo.getDefault, SourceCodeInfo.create)
- ..p<int>(10, 'publicDependency', $pb.PbFieldType.P3)
- ..p<int>(11, 'weakDependency', $pb.PbFieldType.P3)
- ..aOS(12, 'syntax');
-
- FileDescriptorProto() : super();
- FileDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- FileDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- FileDescriptorProto clone() =>
- new FileDescriptorProto()..mergeFromMessage(this);
- FileDescriptorProto copyWith(void Function(FileDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as FileDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static FileDescriptorProto create() => new FileDescriptorProto();
- static $pb.PbList<FileDescriptorProto> createRepeated() =>
- new $pb.PbList<FileDescriptorProto>();
- static FileDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static FileDescriptorProto _defaultInstance;
- static void $checkItem(FileDescriptorProto v) {
- if (v is! FileDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- String get package => $_getS(1, '');
- set package(String v) {
- $_setString(1, v);
- }
-
- bool hasPackage() => $_has(1);
- void clearPackage() => clearField(2);
-
- List<String> get dependency => $_getList(2);
-
- List<DescriptorProto> get messageType => $_getList(3);
-
- List<EnumDescriptorProto> get enumType => $_getList(4);
-
- List<ServiceDescriptorProto> get service => $_getList(5);
-
- List<FieldDescriptorProto> get extension => $_getList(6);
-
- FileOptions get options => $_getN(7);
- set options(FileOptions v) {
- setField(8, v);
- }
-
- bool hasOptions() => $_has(7);
- void clearOptions() => clearField(8);
-
- SourceCodeInfo get sourceCodeInfo => $_getN(8);
- set sourceCodeInfo(SourceCodeInfo v) {
- setField(9, v);
- }
-
- bool hasSourceCodeInfo() => $_has(8);
- void clearSourceCodeInfo() => clearField(9);
-
- List<int> get publicDependency => $_getList(9);
-
- List<int> get weakDependency => $_getList(10);
-
- String get syntax => $_getS(11, '');
- set syntax(String v) {
- $_setString(11, v);
- }
-
- bool hasSyntax() => $_has(11);
- void clearSyntax() => clearField(12);
-}
-
-class DescriptorProto_ExtensionRange extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'DescriptorProto.ExtensionRange',
- package: const $pb.PackageName('google.protobuf'))
- ..a<int>(1, 'start', $pb.PbFieldType.O3)
- ..a<int>(2, 'end', $pb.PbFieldType.O3)
- ..hasRequiredFields = false;
-
- DescriptorProto_ExtensionRange() : super();
- DescriptorProto_ExtensionRange.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- DescriptorProto_ExtensionRange.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- DescriptorProto_ExtensionRange clone() =>
- new DescriptorProto_ExtensionRange()..mergeFromMessage(this);
- DescriptorProto_ExtensionRange copyWith(
- void Function(DescriptorProto_ExtensionRange) updates) =>
- super.copyWith(
- (message) => updates(message as DescriptorProto_ExtensionRange));
- $pb.BuilderInfo get info_ => _i;
- static DescriptorProto_ExtensionRange create() =>
- new DescriptorProto_ExtensionRange();
- static $pb.PbList<DescriptorProto_ExtensionRange> createRepeated() =>
- new $pb.PbList<DescriptorProto_ExtensionRange>();
- static DescriptorProto_ExtensionRange getDefault() =>
- _defaultInstance ??= create()..freeze();
- static DescriptorProto_ExtensionRange _defaultInstance;
- static void $checkItem(DescriptorProto_ExtensionRange v) {
- if (v is! DescriptorProto_ExtensionRange)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- int get start => $_get(0, 0);
- set start(int v) {
- $_setSignedInt32(0, v);
- }
-
- bool hasStart() => $_has(0);
- void clearStart() => clearField(1);
-
- int get end => $_get(1, 0);
- set end(int v) {
- $_setSignedInt32(1, v);
- }
-
- bool hasEnd() => $_has(1);
- void clearEnd() => clearField(2);
-}
-
-class DescriptorProto_ReservedRange extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'DescriptorProto.ReservedRange',
- package: const $pb.PackageName('google.protobuf'))
- ..a<int>(1, 'start', $pb.PbFieldType.O3)
- ..a<int>(2, 'end', $pb.PbFieldType.O3)
- ..hasRequiredFields = false;
-
- DescriptorProto_ReservedRange() : super();
- DescriptorProto_ReservedRange.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- DescriptorProto_ReservedRange.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- DescriptorProto_ReservedRange clone() =>
- new DescriptorProto_ReservedRange()..mergeFromMessage(this);
- DescriptorProto_ReservedRange copyWith(
- void Function(DescriptorProto_ReservedRange) updates) =>
- super.copyWith(
- (message) => updates(message as DescriptorProto_ReservedRange));
- $pb.BuilderInfo get info_ => _i;
- static DescriptorProto_ReservedRange create() =>
- new DescriptorProto_ReservedRange();
- static $pb.PbList<DescriptorProto_ReservedRange> createRepeated() =>
- new $pb.PbList<DescriptorProto_ReservedRange>();
- static DescriptorProto_ReservedRange getDefault() =>
- _defaultInstance ??= create()..freeze();
- static DescriptorProto_ReservedRange _defaultInstance;
- static void $checkItem(DescriptorProto_ReservedRange v) {
- if (v is! DescriptorProto_ReservedRange)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- int get start => $_get(0, 0);
- set start(int v) {
- $_setSignedInt32(0, v);
- }
-
- bool hasStart() => $_has(0);
- void clearStart() => clearField(1);
-
- int get end => $_get(1, 0);
- set end(int v) {
- $_setSignedInt32(1, v);
- }
-
- bool hasEnd() => $_has(1);
- void clearEnd() => clearField(2);
-}
-
-class DescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('DescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..pp<FieldDescriptorProto>(2, 'field', $pb.PbFieldType.PM,
- FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
- ..pp<DescriptorProto>(3, 'nestedType', $pb.PbFieldType.PM,
- DescriptorProto.$checkItem, DescriptorProto.create)
- ..pp<EnumDescriptorProto>(4, 'enumType', $pb.PbFieldType.PM,
- EnumDescriptorProto.$checkItem, EnumDescriptorProto.create)
- ..pp<DescriptorProto_ExtensionRange>(
- 5,
- 'extensionRange',
- $pb.PbFieldType.PM,
- DescriptorProto_ExtensionRange.$checkItem,
- DescriptorProto_ExtensionRange.create)
- ..pp<FieldDescriptorProto>(6, 'extension', $pb.PbFieldType.PM,
- FieldDescriptorProto.$checkItem, FieldDescriptorProto.create)
- ..a<MessageOptions>(7, 'options', $pb.PbFieldType.OM,
- MessageOptions.getDefault, MessageOptions.create)
- ..pp<OneofDescriptorProto>(8, 'oneofDecl', $pb.PbFieldType.PM,
- OneofDescriptorProto.$checkItem, OneofDescriptorProto.create)
- ..pp<DescriptorProto_ReservedRange>(
- 9,
- 'reservedRange',
- $pb.PbFieldType.PM,
- DescriptorProto_ReservedRange.$checkItem,
- DescriptorProto_ReservedRange.create)
- ..pPS(10, 'reservedName');
-
- DescriptorProto() : super();
- DescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- DescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- DescriptorProto clone() => new DescriptorProto()..mergeFromMessage(this);
- DescriptorProto copyWith(void Function(DescriptorProto) updates) =>
- super.copyWith((message) => updates(message as DescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static DescriptorProto create() => new DescriptorProto();
- static $pb.PbList<DescriptorProto> createRepeated() =>
- new $pb.PbList<DescriptorProto>();
- static DescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static DescriptorProto _defaultInstance;
- static void $checkItem(DescriptorProto v) {
- if (v is! DescriptorProto) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- List<FieldDescriptorProto> get field => $_getList(1);
-
- List<DescriptorProto> get nestedType => $_getList(2);
-
- List<EnumDescriptorProto> get enumType => $_getList(3);
-
- List<DescriptorProto_ExtensionRange> get extensionRange => $_getList(4);
-
- List<FieldDescriptorProto> get extension => $_getList(5);
-
- MessageOptions get options => $_getN(6);
- set options(MessageOptions v) {
- setField(7, v);
- }
-
- bool hasOptions() => $_has(6);
- void clearOptions() => clearField(7);
-
- List<OneofDescriptorProto> get oneofDecl => $_getList(7);
-
- List<DescriptorProto_ReservedRange> get reservedRange => $_getList(8);
-
- List<String> get reservedName => $_getList(9);
-}
-
-class FieldDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FieldDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..aOS(2, 'extendee')
- ..a<int>(3, 'number', $pb.PbFieldType.O3)
- ..e<FieldDescriptorProto_Label>(
- 4,
- 'label',
- $pb.PbFieldType.OE,
- FieldDescriptorProto_Label.LABEL_OPTIONAL,
- FieldDescriptorProto_Label.valueOf,
- FieldDescriptorProto_Label.values)
- ..e<FieldDescriptorProto_Type>(
- 5,
- 'type',
- $pb.PbFieldType.OE,
- FieldDescriptorProto_Type.TYPE_DOUBLE,
- FieldDescriptorProto_Type.valueOf,
- FieldDescriptorProto_Type.values)
- ..aOS(6, 'typeName')
- ..aOS(7, 'defaultValue')
- ..a<FieldOptions>(8, 'options', $pb.PbFieldType.OM, FieldOptions.getDefault,
- FieldOptions.create)
- ..a<int>(9, 'oneofIndex', $pb.PbFieldType.O3)
- ..aOS(10, 'jsonName');
-
- FieldDescriptorProto() : super();
- FieldDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- FieldDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- FieldDescriptorProto clone() =>
- new FieldDescriptorProto()..mergeFromMessage(this);
- FieldDescriptorProto copyWith(void Function(FieldDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as FieldDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static FieldDescriptorProto create() => new FieldDescriptorProto();
- static $pb.PbList<FieldDescriptorProto> createRepeated() =>
- new $pb.PbList<FieldDescriptorProto>();
- static FieldDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static FieldDescriptorProto _defaultInstance;
- static void $checkItem(FieldDescriptorProto v) {
- if (v is! FieldDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- String get extendee => $_getS(1, '');
- set extendee(String v) {
- $_setString(1, v);
- }
-
- bool hasExtendee() => $_has(1);
- void clearExtendee() => clearField(2);
-
- int get number => $_get(2, 0);
- set number(int v) {
- $_setSignedInt32(2, v);
- }
-
- bool hasNumber() => $_has(2);
- void clearNumber() => clearField(3);
-
- FieldDescriptorProto_Label get label => $_getN(3);
- set label(FieldDescriptorProto_Label v) {
- setField(4, v);
- }
-
- bool hasLabel() => $_has(3);
- void clearLabel() => clearField(4);
-
- FieldDescriptorProto_Type get type => $_getN(4);
- set type(FieldDescriptorProto_Type v) {
- setField(5, v);
- }
-
- bool hasType() => $_has(4);
- void clearType() => clearField(5);
-
- String get typeName => $_getS(5, '');
- set typeName(String v) {
- $_setString(5, v);
- }
-
- bool hasTypeName() => $_has(5);
- void clearTypeName() => clearField(6);
-
- String get defaultValue => $_getS(6, '');
- set defaultValue(String v) {
- $_setString(6, v);
- }
-
- bool hasDefaultValue() => $_has(6);
- void clearDefaultValue() => clearField(7);
-
- FieldOptions get options => $_getN(7);
- set options(FieldOptions v) {
- setField(8, v);
- }
-
- bool hasOptions() => $_has(7);
- void clearOptions() => clearField(8);
-
- int get oneofIndex => $_get(8, 0);
- set oneofIndex(int v) {
- $_setSignedInt32(8, v);
- }
-
- bool hasOneofIndex() => $_has(8);
- void clearOneofIndex() => clearField(9);
-
- String get jsonName => $_getS(9, '');
- set jsonName(String v) {
- $_setString(9, v);
- }
-
- bool hasJsonName() => $_has(9);
- void clearJsonName() => clearField(10);
-}
-
-class OneofDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('OneofDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..a<OneofOptions>(2, 'options', $pb.PbFieldType.OM, OneofOptions.getDefault,
- OneofOptions.create);
-
- OneofDescriptorProto() : super();
- OneofDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- OneofDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- OneofDescriptorProto clone() =>
- new OneofDescriptorProto()..mergeFromMessage(this);
- OneofDescriptorProto copyWith(void Function(OneofDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as OneofDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static OneofDescriptorProto create() => new OneofDescriptorProto();
- static $pb.PbList<OneofDescriptorProto> createRepeated() =>
- new $pb.PbList<OneofDescriptorProto>();
- static OneofDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static OneofDescriptorProto _defaultInstance;
- static void $checkItem(OneofDescriptorProto v) {
- if (v is! OneofDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- OneofOptions get options => $_getN(1);
- set options(OneofOptions v) {
- setField(2, v);
- }
-
- bool hasOptions() => $_has(1);
- void clearOptions() => clearField(2);
-}
-
-class EnumDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('EnumDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..pp<EnumValueDescriptorProto>(2, 'value', $pb.PbFieldType.PM,
- EnumValueDescriptorProto.$checkItem, EnumValueDescriptorProto.create)
- ..a<EnumOptions>(3, 'options', $pb.PbFieldType.OM, EnumOptions.getDefault,
- EnumOptions.create);
-
- EnumDescriptorProto() : super();
- EnumDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- EnumDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- EnumDescriptorProto clone() =>
- new EnumDescriptorProto()..mergeFromMessage(this);
- EnumDescriptorProto copyWith(void Function(EnumDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as EnumDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static EnumDescriptorProto create() => new EnumDescriptorProto();
- static $pb.PbList<EnumDescriptorProto> createRepeated() =>
- new $pb.PbList<EnumDescriptorProto>();
- static EnumDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static EnumDescriptorProto _defaultInstance;
- static void $checkItem(EnumDescriptorProto v) {
- if (v is! EnumDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- List<EnumValueDescriptorProto> get value => $_getList(1);
-
- EnumOptions get options => $_getN(2);
- set options(EnumOptions v) {
- setField(3, v);
- }
-
- bool hasOptions() => $_has(2);
- void clearOptions() => clearField(3);
-}
-
-class EnumValueDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'EnumValueDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..a<int>(2, 'number', $pb.PbFieldType.O3)
- ..a<EnumValueOptions>(3, 'options', $pb.PbFieldType.OM,
- EnumValueOptions.getDefault, EnumValueOptions.create);
-
- EnumValueDescriptorProto() : super();
- EnumValueDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- EnumValueDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- EnumValueDescriptorProto clone() =>
- new EnumValueDescriptorProto()..mergeFromMessage(this);
- EnumValueDescriptorProto copyWith(
- void Function(EnumValueDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as EnumValueDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static EnumValueDescriptorProto create() => new EnumValueDescriptorProto();
- static $pb.PbList<EnumValueDescriptorProto> createRepeated() =>
- new $pb.PbList<EnumValueDescriptorProto>();
- static EnumValueDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static EnumValueDescriptorProto _defaultInstance;
- static void $checkItem(EnumValueDescriptorProto v) {
- if (v is! EnumValueDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- int get number => $_get(1, 0);
- set number(int v) {
- $_setSignedInt32(1, v);
- }
-
- bool hasNumber() => $_has(1);
- void clearNumber() => clearField(2);
-
- EnumValueOptions get options => $_getN(2);
- set options(EnumValueOptions v) {
- setField(3, v);
- }
-
- bool hasOptions() => $_has(2);
- void clearOptions() => clearField(3);
-}
-
-class ServiceDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'ServiceDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..pp<MethodDescriptorProto>(2, 'method', $pb.PbFieldType.PM,
- MethodDescriptorProto.$checkItem, MethodDescriptorProto.create)
- ..a<ServiceOptions>(3, 'options', $pb.PbFieldType.OM,
- ServiceOptions.getDefault, ServiceOptions.create);
-
- ServiceDescriptorProto() : super();
- ServiceDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- ServiceDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- ServiceDescriptorProto clone() =>
- new ServiceDescriptorProto()..mergeFromMessage(this);
- ServiceDescriptorProto copyWith(
- void Function(ServiceDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as ServiceDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static ServiceDescriptorProto create() => new ServiceDescriptorProto();
- static $pb.PbList<ServiceDescriptorProto> createRepeated() =>
- new $pb.PbList<ServiceDescriptorProto>();
- static ServiceDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static ServiceDescriptorProto _defaultInstance;
- static void $checkItem(ServiceDescriptorProto v) {
- if (v is! ServiceDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- List<MethodDescriptorProto> get method => $_getList(1);
-
- ServiceOptions get options => $_getN(2);
- set options(ServiceOptions v) {
- setField(3, v);
- }
-
- bool hasOptions() => $_has(2);
- void clearOptions() => clearField(3);
-}
-
-class MethodDescriptorProto extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('MethodDescriptorProto',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'name')
- ..aOS(2, 'inputType')
- ..aOS(3, 'outputType')
- ..a<MethodOptions>(4, 'options', $pb.PbFieldType.OM,
- MethodOptions.getDefault, MethodOptions.create)
- ..aOB(5, 'clientStreaming')
- ..aOB(6, 'serverStreaming');
-
- MethodDescriptorProto() : super();
- MethodDescriptorProto.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- MethodDescriptorProto.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- MethodDescriptorProto clone() =>
- new MethodDescriptorProto()..mergeFromMessage(this);
- MethodDescriptorProto copyWith(
- void Function(MethodDescriptorProto) updates) =>
- super.copyWith((message) => updates(message as MethodDescriptorProto));
- $pb.BuilderInfo get info_ => _i;
- static MethodDescriptorProto create() => new MethodDescriptorProto();
- static $pb.PbList<MethodDescriptorProto> createRepeated() =>
- new $pb.PbList<MethodDescriptorProto>();
- static MethodDescriptorProto getDefault() =>
- _defaultInstance ??= create()..freeze();
- static MethodDescriptorProto _defaultInstance;
- static void $checkItem(MethodDescriptorProto v) {
- if (v is! MethodDescriptorProto)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- String get inputType => $_getS(1, '');
- set inputType(String v) {
- $_setString(1, v);
- }
-
- bool hasInputType() => $_has(1);
- void clearInputType() => clearField(2);
-
- String get outputType => $_getS(2, '');
- set outputType(String v) {
- $_setString(2, v);
- }
-
- bool hasOutputType() => $_has(2);
- void clearOutputType() => clearField(3);
-
- MethodOptions get options => $_getN(3);
- set options(MethodOptions v) {
- setField(4, v);
- }
-
- bool hasOptions() => $_has(3);
- void clearOptions() => clearField(4);
-
- bool get clientStreaming => $_get(4, false);
- set clientStreaming(bool v) {
- $_setBool(4, v);
- }
-
- bool hasClientStreaming() => $_has(4);
- void clearClientStreaming() => clearField(5);
-
- bool get serverStreaming => $_get(5, false);
- set serverStreaming(bool v) {
- $_setBool(5, v);
- }
-
- bool hasServerStreaming() => $_has(5);
- void clearServerStreaming() => clearField(6);
-}
-
-class FileOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FileOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOS(1, 'javaPackage')
- ..aOS(8, 'javaOuterClassname')
- ..e<FileOptions_OptimizeMode>(
- 9,
- 'optimizeFor',
- $pb.PbFieldType.OE,
- FileOptions_OptimizeMode.SPEED,
- FileOptions_OptimizeMode.valueOf,
- FileOptions_OptimizeMode.values)
- ..aOB(10, 'javaMultipleFiles')
- ..aOS(11, 'goPackage')
- ..aOB(16, 'ccGenericServices')
- ..aOB(17, 'javaGenericServices')
- ..aOB(18, 'pyGenericServices')
- ..aOB(20, 'javaGenerateEqualsAndHash')
- ..aOB(23, 'deprecated')
- ..aOB(27, 'javaStringCheckUtf8')
- ..aOB(31, 'ccEnableArenas')
- ..aOS(36, 'objcClassPrefix')
- ..aOS(37, 'csharpNamespace')
- ..aOS(39, 'swiftPrefix')
- ..aOS(40, 'phpClassPrefix')
- ..aOS(41, 'phpNamespace')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- FileOptions() : super();
- FileOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- FileOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- FileOptions clone() => new FileOptions()..mergeFromMessage(this);
- FileOptions copyWith(void Function(FileOptions) updates) =>
- super.copyWith((message) => updates(message as FileOptions));
- $pb.BuilderInfo get info_ => _i;
- static FileOptions create() => new FileOptions();
- static $pb.PbList<FileOptions> createRepeated() =>
- new $pb.PbList<FileOptions>();
- static FileOptions getDefault() => _defaultInstance ??= create()..freeze();
- static FileOptions _defaultInstance;
- static void $checkItem(FileOptions v) {
- if (v is! FileOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get javaPackage => $_getS(0, '');
- set javaPackage(String v) {
- $_setString(0, v);
- }
-
- bool hasJavaPackage() => $_has(0);
- void clearJavaPackage() => clearField(1);
-
- String get javaOuterClassname => $_getS(1, '');
- set javaOuterClassname(String v) {
- $_setString(1, v);
- }
-
- bool hasJavaOuterClassname() => $_has(1);
- void clearJavaOuterClassname() => clearField(8);
-
- FileOptions_OptimizeMode get optimizeFor => $_getN(2);
- set optimizeFor(FileOptions_OptimizeMode v) {
- setField(9, v);
- }
-
- bool hasOptimizeFor() => $_has(2);
- void clearOptimizeFor() => clearField(9);
-
- bool get javaMultipleFiles => $_get(3, false);
- set javaMultipleFiles(bool v) {
- $_setBool(3, v);
- }
-
- bool hasJavaMultipleFiles() => $_has(3);
- void clearJavaMultipleFiles() => clearField(10);
-
- String get goPackage => $_getS(4, '');
- set goPackage(String v) {
- $_setString(4, v);
- }
-
- bool hasGoPackage() => $_has(4);
- void clearGoPackage() => clearField(11);
-
- bool get ccGenericServices => $_get(5, false);
- set ccGenericServices(bool v) {
- $_setBool(5, v);
- }
-
- bool hasCcGenericServices() => $_has(5);
- void clearCcGenericServices() => clearField(16);
-
- bool get javaGenericServices => $_get(6, false);
- set javaGenericServices(bool v) {
- $_setBool(6, v);
- }
-
- bool hasJavaGenericServices() => $_has(6);
- void clearJavaGenericServices() => clearField(17);
-
- bool get pyGenericServices => $_get(7, false);
- set pyGenericServices(bool v) {
- $_setBool(7, v);
- }
-
- bool hasPyGenericServices() => $_has(7);
- void clearPyGenericServices() => clearField(18);
-
- bool get javaGenerateEqualsAndHash => $_get(8, false);
- set javaGenerateEqualsAndHash(bool v) {
- $_setBool(8, v);
- }
-
- bool hasJavaGenerateEqualsAndHash() => $_has(8);
- void clearJavaGenerateEqualsAndHash() => clearField(20);
-
- bool get deprecated => $_get(9, false);
- set deprecated(bool v) {
- $_setBool(9, v);
- }
-
- bool hasDeprecated() => $_has(9);
- void clearDeprecated() => clearField(23);
-
- bool get javaStringCheckUtf8 => $_get(10, false);
- set javaStringCheckUtf8(bool v) {
- $_setBool(10, v);
- }
-
- bool hasJavaStringCheckUtf8() => $_has(10);
- void clearJavaStringCheckUtf8() => clearField(27);
-
- bool get ccEnableArenas => $_get(11, false);
- set ccEnableArenas(bool v) {
- $_setBool(11, v);
- }
-
- bool hasCcEnableArenas() => $_has(11);
- void clearCcEnableArenas() => clearField(31);
-
- String get objcClassPrefix => $_getS(12, '');
- set objcClassPrefix(String v) {
- $_setString(12, v);
- }
-
- bool hasObjcClassPrefix() => $_has(12);
- void clearObjcClassPrefix() => clearField(36);
-
- String get csharpNamespace => $_getS(13, '');
- set csharpNamespace(String v) {
- $_setString(13, v);
- }
-
- bool hasCsharpNamespace() => $_has(13);
- void clearCsharpNamespace() => clearField(37);
-
- String get swiftPrefix => $_getS(14, '');
- set swiftPrefix(String v) {
- $_setString(14, v);
- }
-
- bool hasSwiftPrefix() => $_has(14);
- void clearSwiftPrefix() => clearField(39);
-
- String get phpClassPrefix => $_getS(15, '');
- set phpClassPrefix(String v) {
- $_setString(15, v);
- }
-
- bool hasPhpClassPrefix() => $_has(15);
- void clearPhpClassPrefix() => clearField(40);
-
- String get phpNamespace => $_getS(16, '');
- set phpNamespace(String v) {
- $_setString(16, v);
- }
-
- bool hasPhpNamespace() => $_has(16);
- void clearPhpNamespace() => clearField(41);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(17);
-}
-
-class MessageOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('MessageOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOB(1, 'messageSetWireFormat')
- ..aOB(2, 'noStandardDescriptorAccessor')
- ..aOB(3, 'deprecated')
- ..aOB(7, 'mapEntry')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- MessageOptions() : super();
- MessageOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- MessageOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- MessageOptions clone() => new MessageOptions()..mergeFromMessage(this);
- MessageOptions copyWith(void Function(MessageOptions) updates) =>
- super.copyWith((message) => updates(message as MessageOptions));
- $pb.BuilderInfo get info_ => _i;
- static MessageOptions create() => new MessageOptions();
- static $pb.PbList<MessageOptions> createRepeated() =>
- new $pb.PbList<MessageOptions>();
- static MessageOptions getDefault() => _defaultInstance ??= create()..freeze();
- static MessageOptions _defaultInstance;
- static void $checkItem(MessageOptions v) {
- if (v is! MessageOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- bool get messageSetWireFormat => $_get(0, false);
- set messageSetWireFormat(bool v) {
- $_setBool(0, v);
- }
-
- bool hasMessageSetWireFormat() => $_has(0);
- void clearMessageSetWireFormat() => clearField(1);
-
- bool get noStandardDescriptorAccessor => $_get(1, false);
- set noStandardDescriptorAccessor(bool v) {
- $_setBool(1, v);
- }
-
- bool hasNoStandardDescriptorAccessor() => $_has(1);
- void clearNoStandardDescriptorAccessor() => clearField(2);
-
- bool get deprecated => $_get(2, false);
- set deprecated(bool v) {
- $_setBool(2, v);
- }
-
- bool hasDeprecated() => $_has(2);
- void clearDeprecated() => clearField(3);
-
- bool get mapEntry => $_get(3, false);
- set mapEntry(bool v) {
- $_setBool(3, v);
- }
-
- bool hasMapEntry() => $_has(3);
- void clearMapEntry() => clearField(7);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(4);
-}
-
-class FieldOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FieldOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..e<FieldOptions_CType>(
- 1,
- 'ctype',
- $pb.PbFieldType.OE,
- FieldOptions_CType.STRING,
- FieldOptions_CType.valueOf,
- FieldOptions_CType.values)
- ..aOB(2, 'packed')
- ..aOB(3, 'deprecated')
- ..aOB(5, 'lazy')
- ..e<FieldOptions_JSType>(
- 6,
- 'jstype',
- $pb.PbFieldType.OE,
- FieldOptions_JSType.JS_NORMAL,
- FieldOptions_JSType.valueOf,
- FieldOptions_JSType.values)
- ..aOB(10, 'weak')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- FieldOptions() : super();
- FieldOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- FieldOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- FieldOptions clone() => new FieldOptions()..mergeFromMessage(this);
- FieldOptions copyWith(void Function(FieldOptions) updates) =>
- super.copyWith((message) => updates(message as FieldOptions));
- $pb.BuilderInfo get info_ => _i;
- static FieldOptions create() => new FieldOptions();
- static $pb.PbList<FieldOptions> createRepeated() =>
- new $pb.PbList<FieldOptions>();
- static FieldOptions getDefault() => _defaultInstance ??= create()..freeze();
- static FieldOptions _defaultInstance;
- static void $checkItem(FieldOptions v) {
- if (v is! FieldOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- FieldOptions_CType get ctype => $_getN(0);
- set ctype(FieldOptions_CType v) {
- setField(1, v);
- }
-
- bool hasCtype() => $_has(0);
- void clearCtype() => clearField(1);
-
- bool get packed => $_get(1, false);
- set packed(bool v) {
- $_setBool(1, v);
- }
-
- bool hasPacked() => $_has(1);
- void clearPacked() => clearField(2);
-
- bool get deprecated => $_get(2, false);
- set deprecated(bool v) {
- $_setBool(2, v);
- }
-
- bool hasDeprecated() => $_has(2);
- void clearDeprecated() => clearField(3);
-
- bool get lazy => $_get(3, false);
- set lazy(bool v) {
- $_setBool(3, v);
- }
-
- bool hasLazy() => $_has(3);
- void clearLazy() => clearField(5);
-
- FieldOptions_JSType get jstype => $_getN(4);
- set jstype(FieldOptions_JSType v) {
- setField(6, v);
- }
-
- bool hasJstype() => $_has(4);
- void clearJstype() => clearField(6);
-
- bool get weak => $_get(5, false);
- set weak(bool v) {
- $_setBool(5, v);
- }
-
- bool hasWeak() => $_has(5);
- void clearWeak() => clearField(10);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(6);
-}
-
-class OneofOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('OneofOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- OneofOptions() : super();
- OneofOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- OneofOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- OneofOptions clone() => new OneofOptions()..mergeFromMessage(this);
- OneofOptions copyWith(void Function(OneofOptions) updates) =>
- super.copyWith((message) => updates(message as OneofOptions));
- $pb.BuilderInfo get info_ => _i;
- static OneofOptions create() => new OneofOptions();
- static $pb.PbList<OneofOptions> createRepeated() =>
- new $pb.PbList<OneofOptions>();
- static OneofOptions getDefault() => _defaultInstance ??= create()..freeze();
- static OneofOptions _defaultInstance;
- static void $checkItem(OneofOptions v) {
- if (v is! OneofOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(0);
-}
-
-class EnumOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('EnumOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOB(2, 'allowAlias')
- ..aOB(3, 'deprecated')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- EnumOptions() : super();
- EnumOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- EnumOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- EnumOptions clone() => new EnumOptions()..mergeFromMessage(this);
- EnumOptions copyWith(void Function(EnumOptions) updates) =>
- super.copyWith((message) => updates(message as EnumOptions));
- $pb.BuilderInfo get info_ => _i;
- static EnumOptions create() => new EnumOptions();
- static $pb.PbList<EnumOptions> createRepeated() =>
- new $pb.PbList<EnumOptions>();
- static EnumOptions getDefault() => _defaultInstance ??= create()..freeze();
- static EnumOptions _defaultInstance;
- static void $checkItem(EnumOptions v) {
- if (v is! EnumOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- bool get allowAlias => $_get(0, false);
- set allowAlias(bool v) {
- $_setBool(0, v);
- }
-
- bool hasAllowAlias() => $_has(0);
- void clearAllowAlias() => clearField(2);
-
- bool get deprecated => $_get(1, false);
- set deprecated(bool v) {
- $_setBool(1, v);
- }
-
- bool hasDeprecated() => $_has(1);
- void clearDeprecated() => clearField(3);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(2);
-}
-
-class EnumValueOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('EnumValueOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOB(1, 'deprecated')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- EnumValueOptions() : super();
- EnumValueOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- EnumValueOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- EnumValueOptions clone() => new EnumValueOptions()..mergeFromMessage(this);
- EnumValueOptions copyWith(void Function(EnumValueOptions) updates) =>
- super.copyWith((message) => updates(message as EnumValueOptions));
- $pb.BuilderInfo get info_ => _i;
- static EnumValueOptions create() => new EnumValueOptions();
- static $pb.PbList<EnumValueOptions> createRepeated() =>
- new $pb.PbList<EnumValueOptions>();
- static EnumValueOptions getDefault() =>
- _defaultInstance ??= create()..freeze();
- static EnumValueOptions _defaultInstance;
- static void $checkItem(EnumValueOptions v) {
- if (v is! EnumValueOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- bool get deprecated => $_get(0, false);
- set deprecated(bool v) {
- $_setBool(0, v);
- }
-
- bool hasDeprecated() => $_has(0);
- void clearDeprecated() => clearField(1);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(1);
-}
-
-class ServiceOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('ServiceOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOB(33, 'deprecated')
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- ServiceOptions() : super();
- ServiceOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- ServiceOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- ServiceOptions clone() => new ServiceOptions()..mergeFromMessage(this);
- ServiceOptions copyWith(void Function(ServiceOptions) updates) =>
- super.copyWith((message) => updates(message as ServiceOptions));
- $pb.BuilderInfo get info_ => _i;
- static ServiceOptions create() => new ServiceOptions();
- static $pb.PbList<ServiceOptions> createRepeated() =>
- new $pb.PbList<ServiceOptions>();
- static ServiceOptions getDefault() => _defaultInstance ??= create()..freeze();
- static ServiceOptions _defaultInstance;
- static void $checkItem(ServiceOptions v) {
- if (v is! ServiceOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- bool get deprecated => $_get(0, false);
- set deprecated(bool v) {
- $_setBool(0, v);
- }
-
- bool hasDeprecated() => $_has(0);
- void clearDeprecated() => clearField(33);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(1);
-}
-
-class MethodOptions extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('MethodOptions',
- package: const $pb.PackageName('google.protobuf'))
- ..aOB(33, 'deprecated')
- ..e<MethodOptions_IdempotencyLevel>(
- 34,
- 'idempotencyLevel',
- $pb.PbFieldType.OE,
- MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
- MethodOptions_IdempotencyLevel.valueOf,
- MethodOptions_IdempotencyLevel.values)
- ..pp<UninterpretedOption>(999, 'uninterpretedOption', $pb.PbFieldType.PM,
- UninterpretedOption.$checkItem, UninterpretedOption.create)
- ..hasExtensions = true;
-
- MethodOptions() : super();
- MethodOptions.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- MethodOptions.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- MethodOptions clone() => new MethodOptions()..mergeFromMessage(this);
- MethodOptions copyWith(void Function(MethodOptions) updates) =>
- super.copyWith((message) => updates(message as MethodOptions));
- $pb.BuilderInfo get info_ => _i;
- static MethodOptions create() => new MethodOptions();
- static $pb.PbList<MethodOptions> createRepeated() =>
- new $pb.PbList<MethodOptions>();
- static MethodOptions getDefault() => _defaultInstance ??= create()..freeze();
- static MethodOptions _defaultInstance;
- static void $checkItem(MethodOptions v) {
- if (v is! MethodOptions) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- bool get deprecated => $_get(0, false);
- set deprecated(bool v) {
- $_setBool(0, v);
- }
-
- bool hasDeprecated() => $_has(0);
- void clearDeprecated() => clearField(33);
-
- MethodOptions_IdempotencyLevel get idempotencyLevel => $_getN(1);
- set idempotencyLevel(MethodOptions_IdempotencyLevel v) {
- setField(34, v);
- }
-
- bool hasIdempotencyLevel() => $_has(1);
- void clearIdempotencyLevel() => clearField(34);
-
- List<UninterpretedOption> get uninterpretedOption => $_getList(2);
-}
-
-class UninterpretedOption_NamePart extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'UninterpretedOption.NamePart',
- package: const $pb.PackageName('google.protobuf'))
- ..aQS(1, 'namePart')
- ..a<bool>(2, 'isExtension', $pb.PbFieldType.QB);
-
- UninterpretedOption_NamePart() : super();
- UninterpretedOption_NamePart.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- UninterpretedOption_NamePart.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- UninterpretedOption_NamePart clone() =>
- new UninterpretedOption_NamePart()..mergeFromMessage(this);
- UninterpretedOption_NamePart copyWith(
- void Function(UninterpretedOption_NamePart) updates) =>
- super.copyWith(
- (message) => updates(message as UninterpretedOption_NamePart));
- $pb.BuilderInfo get info_ => _i;
- static UninterpretedOption_NamePart create() =>
- new UninterpretedOption_NamePart();
- static $pb.PbList<UninterpretedOption_NamePart> createRepeated() =>
- new $pb.PbList<UninterpretedOption_NamePart>();
- static UninterpretedOption_NamePart getDefault() =>
- _defaultInstance ??= create()..freeze();
- static UninterpretedOption_NamePart _defaultInstance;
- static void $checkItem(UninterpretedOption_NamePart v) {
- if (v is! UninterpretedOption_NamePart)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get namePart => $_getS(0, '');
- set namePart(String v) {
- $_setString(0, v);
- }
-
- bool hasNamePart() => $_has(0);
- void clearNamePart() => clearField(1);
-
- bool get isExtension => $_get(1, false);
- set isExtension(bool v) {
- $_setBool(1, v);
- }
-
- bool hasIsExtension() => $_has(1);
- void clearIsExtension() => clearField(2);
-}
-
-class UninterpretedOption extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('UninterpretedOption',
- package: const $pb.PackageName('google.protobuf'))
- ..pp<UninterpretedOption_NamePart>(
- 2,
- 'name',
- $pb.PbFieldType.PM,
- UninterpretedOption_NamePart.$checkItem,
- UninterpretedOption_NamePart.create)
- ..aOS(3, 'identifierValue')
- ..a<Int64>(4, 'positiveIntValue', $pb.PbFieldType.OU6, Int64.ZERO)
- ..aInt64(5, 'negativeIntValue')
- ..a<double>(6, 'doubleValue', $pb.PbFieldType.OD)
- ..a<List<int>>(7, 'stringValue', $pb.PbFieldType.OY)
- ..aOS(8, 'aggregateValue');
-
- UninterpretedOption() : super();
- UninterpretedOption.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- UninterpretedOption.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- UninterpretedOption clone() =>
- new UninterpretedOption()..mergeFromMessage(this);
- UninterpretedOption copyWith(void Function(UninterpretedOption) updates) =>
- super.copyWith((message) => updates(message as UninterpretedOption));
- $pb.BuilderInfo get info_ => _i;
- static UninterpretedOption create() => new UninterpretedOption();
- static $pb.PbList<UninterpretedOption> createRepeated() =>
- new $pb.PbList<UninterpretedOption>();
- static UninterpretedOption getDefault() =>
- _defaultInstance ??= create()..freeze();
- static UninterpretedOption _defaultInstance;
- static void $checkItem(UninterpretedOption v) {
- if (v is! UninterpretedOption)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<UninterpretedOption_NamePart> get name => $_getList(0);
-
- String get identifierValue => $_getS(1, '');
- set identifierValue(String v) {
- $_setString(1, v);
- }
-
- bool hasIdentifierValue() => $_has(1);
- void clearIdentifierValue() => clearField(3);
-
- Int64 get positiveIntValue => $_getI64(2);
- set positiveIntValue(Int64 v) {
- $_setInt64(2, v);
- }
-
- bool hasPositiveIntValue() => $_has(2);
- void clearPositiveIntValue() => clearField(4);
-
- Int64 get negativeIntValue => $_getI64(3);
- set negativeIntValue(Int64 v) {
- $_setInt64(3, v);
- }
-
- bool hasNegativeIntValue() => $_has(3);
- void clearNegativeIntValue() => clearField(5);
-
- double get doubleValue => $_getN(4);
- set doubleValue(double v) {
- $_setDouble(4, v);
- }
-
- bool hasDoubleValue() => $_has(4);
- void clearDoubleValue() => clearField(6);
-
- List<int> get stringValue => $_getN(5);
- set stringValue(List<int> v) {
- $_setBytes(5, v);
- }
-
- bool hasStringValue() => $_has(5);
- void clearStringValue() => clearField(7);
-
- String get aggregateValue => $_getS(6, '');
- set aggregateValue(String v) {
- $_setString(6, v);
- }
-
- bool hasAggregateValue() => $_has(6);
- void clearAggregateValue() => clearField(8);
-}
-
-class SourceCodeInfo_Location extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'SourceCodeInfo.Location',
- package: const $pb.PackageName('google.protobuf'))
- ..p<int>(1, 'path', $pb.PbFieldType.K3)
- ..p<int>(2, 'span', $pb.PbFieldType.K3)
- ..aOS(3, 'leadingComments')
- ..aOS(4, 'trailingComments')
- ..pPS(6, 'leadingDetachedComments')
- ..hasRequiredFields = false;
-
- SourceCodeInfo_Location() : super();
- SourceCodeInfo_Location.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- SourceCodeInfo_Location.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- SourceCodeInfo_Location clone() =>
- new SourceCodeInfo_Location()..mergeFromMessage(this);
- SourceCodeInfo_Location copyWith(
- void Function(SourceCodeInfo_Location) updates) =>
- super.copyWith((message) => updates(message as SourceCodeInfo_Location));
- $pb.BuilderInfo get info_ => _i;
- static SourceCodeInfo_Location create() => new SourceCodeInfo_Location();
- static $pb.PbList<SourceCodeInfo_Location> createRepeated() =>
- new $pb.PbList<SourceCodeInfo_Location>();
- static SourceCodeInfo_Location getDefault() =>
- _defaultInstance ??= create()..freeze();
- static SourceCodeInfo_Location _defaultInstance;
- static void $checkItem(SourceCodeInfo_Location v) {
- if (v is! SourceCodeInfo_Location)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<int> get path => $_getList(0);
-
- List<int> get span => $_getList(1);
-
- String get leadingComments => $_getS(2, '');
- set leadingComments(String v) {
- $_setString(2, v);
- }
-
- bool hasLeadingComments() => $_has(2);
- void clearLeadingComments() => clearField(3);
-
- String get trailingComments => $_getS(3, '');
- set trailingComments(String v) {
- $_setString(3, v);
- }
-
- bool hasTrailingComments() => $_has(3);
- void clearTrailingComments() => clearField(4);
-
- List<String> get leadingDetachedComments => $_getList(4);
-}
-
-class SourceCodeInfo extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('SourceCodeInfo',
- package: const $pb.PackageName('google.protobuf'))
- ..pp<SourceCodeInfo_Location>(1, 'location', $pb.PbFieldType.PM,
- SourceCodeInfo_Location.$checkItem, SourceCodeInfo_Location.create)
- ..hasRequiredFields = false;
-
- SourceCodeInfo() : super();
- SourceCodeInfo.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- SourceCodeInfo.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- SourceCodeInfo clone() => new SourceCodeInfo()..mergeFromMessage(this);
- SourceCodeInfo copyWith(void Function(SourceCodeInfo) updates) =>
- super.copyWith((message) => updates(message as SourceCodeInfo));
- $pb.BuilderInfo get info_ => _i;
- static SourceCodeInfo create() => new SourceCodeInfo();
- static $pb.PbList<SourceCodeInfo> createRepeated() =>
- new $pb.PbList<SourceCodeInfo>();
- static SourceCodeInfo getDefault() => _defaultInstance ??= create()..freeze();
- static SourceCodeInfo _defaultInstance;
- static void $checkItem(SourceCodeInfo v) {
- if (v is! SourceCodeInfo) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<SourceCodeInfo_Location> get location => $_getList(0);
-}
-
-class GeneratedCodeInfo_Annotation extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'GeneratedCodeInfo.Annotation',
- package: const $pb.PackageName('google.protobuf'))
- ..p<int>(1, 'path', $pb.PbFieldType.K3)
- ..aOS(2, 'sourceFile')
- ..a<int>(3, 'begin', $pb.PbFieldType.O3)
- ..a<int>(4, 'end', $pb.PbFieldType.O3)
- ..hasRequiredFields = false;
-
- GeneratedCodeInfo_Annotation() : super();
- GeneratedCodeInfo_Annotation.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- GeneratedCodeInfo_Annotation.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- GeneratedCodeInfo_Annotation clone() =>
- new GeneratedCodeInfo_Annotation()..mergeFromMessage(this);
- GeneratedCodeInfo_Annotation copyWith(
- void Function(GeneratedCodeInfo_Annotation) updates) =>
- super.copyWith(
- (message) => updates(message as GeneratedCodeInfo_Annotation));
- $pb.BuilderInfo get info_ => _i;
- static GeneratedCodeInfo_Annotation create() =>
- new GeneratedCodeInfo_Annotation();
- static $pb.PbList<GeneratedCodeInfo_Annotation> createRepeated() =>
- new $pb.PbList<GeneratedCodeInfo_Annotation>();
- static GeneratedCodeInfo_Annotation getDefault() =>
- _defaultInstance ??= create()..freeze();
- static GeneratedCodeInfo_Annotation _defaultInstance;
- static void $checkItem(GeneratedCodeInfo_Annotation v) {
- if (v is! GeneratedCodeInfo_Annotation)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<int> get path => $_getList(0);
-
- String get sourceFile => $_getS(1, '');
- set sourceFile(String v) {
- $_setString(1, v);
- }
-
- bool hasSourceFile() => $_has(1);
- void clearSourceFile() => clearField(2);
-
- int get begin => $_get(2, 0);
- set begin(int v) {
- $_setSignedInt32(2, v);
- }
-
- bool hasBegin() => $_has(2);
- void clearBegin() => clearField(3);
-
- int get end => $_get(3, 0);
- set end(int v) {
- $_setSignedInt32(3, v);
- }
-
- bool hasEnd() => $_has(3);
- void clearEnd() => clearField(4);
-}
-
-class GeneratedCodeInfo extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('GeneratedCodeInfo',
- package: const $pb.PackageName('google.protobuf'))
- ..pp<GeneratedCodeInfo_Annotation>(
- 1,
- 'annotation',
- $pb.PbFieldType.PM,
- GeneratedCodeInfo_Annotation.$checkItem,
- GeneratedCodeInfo_Annotation.create)
- ..hasRequiredFields = false;
-
- GeneratedCodeInfo() : super();
- GeneratedCodeInfo.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- GeneratedCodeInfo.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- GeneratedCodeInfo clone() => new GeneratedCodeInfo()..mergeFromMessage(this);
- GeneratedCodeInfo copyWith(void Function(GeneratedCodeInfo) updates) =>
- super.copyWith((message) => updates(message as GeneratedCodeInfo));
- $pb.BuilderInfo get info_ => _i;
- static GeneratedCodeInfo create() => new GeneratedCodeInfo();
- static $pb.PbList<GeneratedCodeInfo> createRepeated() =>
- new $pb.PbList<GeneratedCodeInfo>();
- static GeneratedCodeInfo getDefault() =>
- _defaultInstance ??= create()..freeze();
- static GeneratedCodeInfo _defaultInstance;
- static void $checkItem(GeneratedCodeInfo v) {
- if (v is! GeneratedCodeInfo)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<GeneratedCodeInfo_Annotation> get annotation => $_getList(0);
-}
diff --git a/lib/src/descriptor.pbenum.dart b/lib/src/descriptor.pbenum.dart
deleted file mode 100644
index a25cda6..0000000
--- a/lib/src/descriptor.pbenum.dart
+++ /dev/null
@@ -1,206 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: descriptor.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME
-import 'dart:core' show int, dynamic, String, List, Map;
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class FieldDescriptorProto_Type extends $pb.ProtobufEnum {
- static const FieldDescriptorProto_Type TYPE_DOUBLE =
- const FieldDescriptorProto_Type._(1, 'TYPE_DOUBLE');
- static const FieldDescriptorProto_Type TYPE_FLOAT =
- const FieldDescriptorProto_Type._(2, 'TYPE_FLOAT');
- static const FieldDescriptorProto_Type TYPE_INT64 =
- const FieldDescriptorProto_Type._(3, 'TYPE_INT64');
- static const FieldDescriptorProto_Type TYPE_UINT64 =
- const FieldDescriptorProto_Type._(4, 'TYPE_UINT64');
- static const FieldDescriptorProto_Type TYPE_INT32 =
- const FieldDescriptorProto_Type._(5, 'TYPE_INT32');
- static const FieldDescriptorProto_Type TYPE_FIXED64 =
- const FieldDescriptorProto_Type._(6, 'TYPE_FIXED64');
- static const FieldDescriptorProto_Type TYPE_FIXED32 =
- const FieldDescriptorProto_Type._(7, 'TYPE_FIXED32');
- static const FieldDescriptorProto_Type TYPE_BOOL =
- const FieldDescriptorProto_Type._(8, 'TYPE_BOOL');
- static const FieldDescriptorProto_Type TYPE_STRING =
- const FieldDescriptorProto_Type._(9, 'TYPE_STRING');
- static const FieldDescriptorProto_Type TYPE_GROUP =
- const FieldDescriptorProto_Type._(10, 'TYPE_GROUP');
- static const FieldDescriptorProto_Type TYPE_MESSAGE =
- const FieldDescriptorProto_Type._(11, 'TYPE_MESSAGE');
- static const FieldDescriptorProto_Type TYPE_BYTES =
- const FieldDescriptorProto_Type._(12, 'TYPE_BYTES');
- static const FieldDescriptorProto_Type TYPE_UINT32 =
- const FieldDescriptorProto_Type._(13, 'TYPE_UINT32');
- static const FieldDescriptorProto_Type TYPE_ENUM =
- const FieldDescriptorProto_Type._(14, 'TYPE_ENUM');
- static const FieldDescriptorProto_Type TYPE_SFIXED32 =
- const FieldDescriptorProto_Type._(15, 'TYPE_SFIXED32');
- static const FieldDescriptorProto_Type TYPE_SFIXED64 =
- const FieldDescriptorProto_Type._(16, 'TYPE_SFIXED64');
- static const FieldDescriptorProto_Type TYPE_SINT32 =
- const FieldDescriptorProto_Type._(17, 'TYPE_SINT32');
- static const FieldDescriptorProto_Type TYPE_SINT64 =
- const FieldDescriptorProto_Type._(18, 'TYPE_SINT64');
-
- static const List<FieldDescriptorProto_Type> values =
- const <FieldDescriptorProto_Type>[
- TYPE_DOUBLE,
- TYPE_FLOAT,
- TYPE_INT64,
- TYPE_UINT64,
- TYPE_INT32,
- TYPE_FIXED64,
- TYPE_FIXED32,
- TYPE_BOOL,
- TYPE_STRING,
- TYPE_GROUP,
- TYPE_MESSAGE,
- TYPE_BYTES,
- TYPE_UINT32,
- TYPE_ENUM,
- TYPE_SFIXED32,
- TYPE_SFIXED64,
- TYPE_SINT32,
- TYPE_SINT64,
- ];
-
- static final Map<int, FieldDescriptorProto_Type> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static FieldDescriptorProto_Type valueOf(int value) => _byValue[value];
- static void $checkItem(FieldDescriptorProto_Type v) {
- if (v is! FieldDescriptorProto_Type)
- $pb.checkItemFailed(v, 'FieldDescriptorProto_Type');
- }
-
- const FieldDescriptorProto_Type._(int v, String n) : super(v, n);
-}
-
-class FieldDescriptorProto_Label extends $pb.ProtobufEnum {
- static const FieldDescriptorProto_Label LABEL_OPTIONAL =
- const FieldDescriptorProto_Label._(1, 'LABEL_OPTIONAL');
- static const FieldDescriptorProto_Label LABEL_REQUIRED =
- const FieldDescriptorProto_Label._(2, 'LABEL_REQUIRED');
- static const FieldDescriptorProto_Label LABEL_REPEATED =
- const FieldDescriptorProto_Label._(3, 'LABEL_REPEATED');
-
- static const List<FieldDescriptorProto_Label> values =
- const <FieldDescriptorProto_Label>[
- LABEL_OPTIONAL,
- LABEL_REQUIRED,
- LABEL_REPEATED,
- ];
-
- static final Map<int, FieldDescriptorProto_Label> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static FieldDescriptorProto_Label valueOf(int value) => _byValue[value];
- static void $checkItem(FieldDescriptorProto_Label v) {
- if (v is! FieldDescriptorProto_Label)
- $pb.checkItemFailed(v, 'FieldDescriptorProto_Label');
- }
-
- const FieldDescriptorProto_Label._(int v, String n) : super(v, n);
-}
-
-class FileOptions_OptimizeMode extends $pb.ProtobufEnum {
- static const FileOptions_OptimizeMode SPEED =
- const FileOptions_OptimizeMode._(1, 'SPEED');
- static const FileOptions_OptimizeMode CODE_SIZE =
- const FileOptions_OptimizeMode._(2, 'CODE_SIZE');
- static const FileOptions_OptimizeMode LITE_RUNTIME =
- const FileOptions_OptimizeMode._(3, 'LITE_RUNTIME');
-
- static const List<FileOptions_OptimizeMode> values =
- const <FileOptions_OptimizeMode>[
- SPEED,
- CODE_SIZE,
- LITE_RUNTIME,
- ];
-
- static final Map<int, FileOptions_OptimizeMode> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static FileOptions_OptimizeMode valueOf(int value) => _byValue[value];
- static void $checkItem(FileOptions_OptimizeMode v) {
- if (v is! FileOptions_OptimizeMode)
- $pb.checkItemFailed(v, 'FileOptions_OptimizeMode');
- }
-
- const FileOptions_OptimizeMode._(int v, String n) : super(v, n);
-}
-
-class FieldOptions_CType extends $pb.ProtobufEnum {
- static const FieldOptions_CType STRING =
- const FieldOptions_CType._(0, 'STRING');
- static const FieldOptions_CType CORD = const FieldOptions_CType._(1, 'CORD');
- static const FieldOptions_CType STRING_PIECE =
- const FieldOptions_CType._(2, 'STRING_PIECE');
-
- static const List<FieldOptions_CType> values = const <FieldOptions_CType>[
- STRING,
- CORD,
- STRING_PIECE,
- ];
-
- static final Map<int, FieldOptions_CType> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static FieldOptions_CType valueOf(int value) => _byValue[value];
- static void $checkItem(FieldOptions_CType v) {
- if (v is! FieldOptions_CType) $pb.checkItemFailed(v, 'FieldOptions_CType');
- }
-
- const FieldOptions_CType._(int v, String n) : super(v, n);
-}
-
-class FieldOptions_JSType extends $pb.ProtobufEnum {
- static const FieldOptions_JSType JS_NORMAL =
- const FieldOptions_JSType._(0, 'JS_NORMAL');
- static const FieldOptions_JSType JS_STRING =
- const FieldOptions_JSType._(1, 'JS_STRING');
- static const FieldOptions_JSType JS_NUMBER =
- const FieldOptions_JSType._(2, 'JS_NUMBER');
-
- static const List<FieldOptions_JSType> values = const <FieldOptions_JSType>[
- JS_NORMAL,
- JS_STRING,
- JS_NUMBER,
- ];
-
- static final Map<int, FieldOptions_JSType> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static FieldOptions_JSType valueOf(int value) => _byValue[value];
- static void $checkItem(FieldOptions_JSType v) {
- if (v is! FieldOptions_JSType)
- $pb.checkItemFailed(v, 'FieldOptions_JSType');
- }
-
- const FieldOptions_JSType._(int v, String n) : super(v, n);
-}
-
-class MethodOptions_IdempotencyLevel extends $pb.ProtobufEnum {
- static const MethodOptions_IdempotencyLevel IDEMPOTENCY_UNKNOWN =
- const MethodOptions_IdempotencyLevel._(0, 'IDEMPOTENCY_UNKNOWN');
- static const MethodOptions_IdempotencyLevel NO_SIDE_EFFECTS =
- const MethodOptions_IdempotencyLevel._(1, 'NO_SIDE_EFFECTS');
- static const MethodOptions_IdempotencyLevel IDEMPOTENT =
- const MethodOptions_IdempotencyLevel._(2, 'IDEMPOTENT');
-
- static const List<MethodOptions_IdempotencyLevel> values =
- const <MethodOptions_IdempotencyLevel>[
- IDEMPOTENCY_UNKNOWN,
- NO_SIDE_EFFECTS,
- IDEMPOTENT,
- ];
-
- static final Map<int, MethodOptions_IdempotencyLevel> _byValue =
- $pb.ProtobufEnum.initByValue(values);
- static MethodOptions_IdempotencyLevel valueOf(int value) => _byValue[value];
- static void $checkItem(MethodOptions_IdempotencyLevel v) {
- if (v is! MethodOptions_IdempotencyLevel)
- $pb.checkItemFailed(v, 'MethodOptions_IdempotencyLevel');
- }
-
- const MethodOptions_IdempotencyLevel._(int v, String n) : super(v, n);
-}
diff --git a/lib/src/plugin.pb.dart b/lib/src/plugin.pb.dart
deleted file mode 100644
index f8a6ba2..0000000
--- a/lib/src/plugin.pb.dart
+++ /dev/null
@@ -1,234 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: plugin.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-import 'descriptor.pb.dart' as $0;
-
-class Version extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('Version',
- package: const $pb.PackageName('google.protobuf.compiler'))
- ..a<int>(1, 'major', $pb.PbFieldType.O3)
- ..a<int>(2, 'minor', $pb.PbFieldType.O3)
- ..a<int>(3, 'patch', $pb.PbFieldType.O3)
- ..aOS(4, 'suffix')
- ..hasRequiredFields = false;
-
- Version() : super();
- Version.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- Version.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- Version clone() => new Version()..mergeFromMessage(this);
- Version copyWith(void Function(Version) updates) =>
- super.copyWith((message) => updates(message as Version));
- $pb.BuilderInfo get info_ => _i;
- static Version create() => new Version();
- static $pb.PbList<Version> createRepeated() => new $pb.PbList<Version>();
- static Version getDefault() => _defaultInstance ??= create()..freeze();
- static Version _defaultInstance;
- static void $checkItem(Version v) {
- if (v is! Version) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- int get major => $_get(0, 0);
- set major(int v) {
- $_setSignedInt32(0, v);
- }
-
- bool hasMajor() => $_has(0);
- void clearMajor() => clearField(1);
-
- int get minor => $_get(1, 0);
- set minor(int v) {
- $_setSignedInt32(1, v);
- }
-
- bool hasMinor() => $_has(1);
- void clearMinor() => clearField(2);
-
- int get patch => $_get(2, 0);
- set patch(int v) {
- $_setSignedInt32(2, v);
- }
-
- bool hasPatch() => $_has(2);
- void clearPatch() => clearField(3);
-
- String get suffix => $_getS(3, '');
- set suffix(String v) {
- $_setString(3, v);
- }
-
- bool hasSuffix() => $_has(3);
- void clearSuffix() => clearField(4);
-}
-
-class CodeGeneratorRequest extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('CodeGeneratorRequest',
- package: const $pb.PackageName('google.protobuf.compiler'))
- ..pPS(1, 'fileToGenerate')
- ..aOS(2, 'parameter')
- ..a<Version>(3, 'compilerVersion', $pb.PbFieldType.OM, Version.getDefault,
- Version.create)
- ..pp<$0.FileDescriptorProto>(15, 'protoFile', $pb.PbFieldType.PM,
- $0.FileDescriptorProto.$checkItem, $0.FileDescriptorProto.create);
-
- CodeGeneratorRequest() : super();
- CodeGeneratorRequest.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- CodeGeneratorRequest.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- CodeGeneratorRequest clone() =>
- new CodeGeneratorRequest()..mergeFromMessage(this);
- CodeGeneratorRequest copyWith(void Function(CodeGeneratorRequest) updates) =>
- super.copyWith((message) => updates(message as CodeGeneratorRequest));
- $pb.BuilderInfo get info_ => _i;
- static CodeGeneratorRequest create() => new CodeGeneratorRequest();
- static $pb.PbList<CodeGeneratorRequest> createRepeated() =>
- new $pb.PbList<CodeGeneratorRequest>();
- static CodeGeneratorRequest getDefault() =>
- _defaultInstance ??= create()..freeze();
- static CodeGeneratorRequest _defaultInstance;
- static void $checkItem(CodeGeneratorRequest v) {
- if (v is! CodeGeneratorRequest)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- List<String> get fileToGenerate => $_getList(0);
-
- String get parameter => $_getS(1, '');
- set parameter(String v) {
- $_setString(1, v);
- }
-
- bool hasParameter() => $_has(1);
- void clearParameter() => clearField(2);
-
- Version get compilerVersion => $_getN(2);
- set compilerVersion(Version v) {
- setField(3, v);
- }
-
- bool hasCompilerVersion() => $_has(2);
- void clearCompilerVersion() => clearField(3);
-
- List<$0.FileDescriptorProto> get protoFile => $_getList(3);
-}
-
-class CodeGeneratorResponse_File extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo(
- 'CodeGeneratorResponse.File',
- package: const $pb.PackageName('google.protobuf.compiler'))
- ..aOS(1, 'name')
- ..aOS(2, 'insertionPoint')
- ..aOS(15, 'content')
- ..hasRequiredFields = false;
-
- CodeGeneratorResponse_File() : super();
- CodeGeneratorResponse_File.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- CodeGeneratorResponse_File.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- CodeGeneratorResponse_File clone() =>
- new CodeGeneratorResponse_File()..mergeFromMessage(this);
- CodeGeneratorResponse_File copyWith(
- void Function(CodeGeneratorResponse_File) updates) =>
- super.copyWith(
- (message) => updates(message as CodeGeneratorResponse_File));
- $pb.BuilderInfo get info_ => _i;
- static CodeGeneratorResponse_File create() =>
- new CodeGeneratorResponse_File();
- static $pb.PbList<CodeGeneratorResponse_File> createRepeated() =>
- new $pb.PbList<CodeGeneratorResponse_File>();
- static CodeGeneratorResponse_File getDefault() =>
- _defaultInstance ??= create()..freeze();
- static CodeGeneratorResponse_File _defaultInstance;
- static void $checkItem(CodeGeneratorResponse_File v) {
- if (v is! CodeGeneratorResponse_File)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get name => $_getS(0, '');
- set name(String v) {
- $_setString(0, v);
- }
-
- bool hasName() => $_has(0);
- void clearName() => clearField(1);
-
- String get insertionPoint => $_getS(1, '');
- set insertionPoint(String v) {
- $_setString(1, v);
- }
-
- bool hasInsertionPoint() => $_has(1);
- void clearInsertionPoint() => clearField(2);
-
- String get content => $_getS(2, '');
- set content(String v) {
- $_setString(2, v);
- }
-
- bool hasContent() => $_has(2);
- void clearContent() => clearField(15);
-}
-
-class CodeGeneratorResponse extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('CodeGeneratorResponse',
- package: const $pb.PackageName('google.protobuf.compiler'))
- ..aOS(1, 'error')
- ..pp<CodeGeneratorResponse_File>(
- 15,
- 'file',
- $pb.PbFieldType.PM,
- CodeGeneratorResponse_File.$checkItem,
- CodeGeneratorResponse_File.create)
- ..hasRequiredFields = false;
-
- CodeGeneratorResponse() : super();
- CodeGeneratorResponse.fromBuffer(List<int> i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromBuffer(i, r);
- CodeGeneratorResponse.fromJson(String i,
- [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
- : super.fromJson(i, r);
- CodeGeneratorResponse clone() =>
- new CodeGeneratorResponse()..mergeFromMessage(this);
- CodeGeneratorResponse copyWith(
- void Function(CodeGeneratorResponse) updates) =>
- super.copyWith((message) => updates(message as CodeGeneratorResponse));
- $pb.BuilderInfo get info_ => _i;
- static CodeGeneratorResponse create() => new CodeGeneratorResponse();
- static $pb.PbList<CodeGeneratorResponse> createRepeated() =>
- new $pb.PbList<CodeGeneratorResponse>();
- static CodeGeneratorResponse getDefault() =>
- _defaultInstance ??= create()..freeze();
- static CodeGeneratorResponse _defaultInstance;
- static void $checkItem(CodeGeneratorResponse v) {
- if (v is! CodeGeneratorResponse)
- $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get error => $_getS(0, '');
- set error(String v) {
- $_setString(0, v);
- }
-
- bool hasError() => $_has(0);
- void clearError() => clearField(1);
-
- List<CodeGeneratorResponse_File> get file => $_getList(1);
-}
diff --git a/lib/testing/mixins.dart b/lib/testing/mixins.dart
deleted file mode 100644
index 694840c..0000000
--- a/lib/testing/mixins.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-abstract class Mixin1 {
- String get overriddenString => "mixin1";
-
- String get interfaceString;
- set interfaceString(String string);
- bool hasInterfaceString();
-}
-
-abstract class Mixin2 {
- String get overriddenString => "mixin2";
-
- bool hasOverriddenHasMethod() => false;
-}
-
-abstract class Mixin3 {}
diff --git a/protos/dart_options.proto b/protos/dart_options.proto
deleted file mode 100644
index 507c7f3..0000000
--- a/protos/dart_options.proto
+++ /dev/null
@@ -1,79 +0,0 @@
-// Experimental options controlling Dart code generation.
-syntax = "proto2";
-
-package dart_options;
-
-// This file must be modified for Google internal use,
-// because custom options only work when the package name
-// agrees with the version of protoc we are using.
-// (The import statement and "google.protobuf." prefix need to be changed.)
-
-import "descriptor.proto";
-
-// A mixin that can be used in the 'with' clause of the generated Dart class
-// for a proto message.
-message DartMixin {
- // The name of the mixin class.
- optional string name = 1;
-
- // A URI pointing to the Dart library that defines the mixin.
- // The generated Dart code will use this in an import statement.
- optional string import_from = 2;
-
- // The name of another mixin to be applied ahead of this one.
- // The generated class for the message will inherit from all mixins
- // in the parent chain.
- optional string parent = 3;
-}
-
-// Defines additional Dart imports to be used with messages in this file.
-message Imports {
-
- // Mixins to be used on messages in this file.
- // These mixins are in addition to internally defined mixins (e.g PbMapMixin)
- // and may override them.
- //
- // Warning: mixins are experimental. The protoc Dart plugin doesn't check
- // for name conflicts between mixin class members and generated class members,
- // so the generated code may contain errors. Therefore, running dartanalyzer
- // on the generated file is a good idea.
- repeated DartMixin mixins = 1;
-}
-
-extend google.protobuf.FileOptions {
-
- optional Imports imports = 28125061;
-
- // Applies the named mixin to all messages in this file.
- // (May be overridden by the "mixin" option on a message.)
- // For now, "PbMapMixin" is the only available mixin.
- optional string default_mixin = 96128839;
-}
-
-extend google.protobuf.MessageOptions {
-
- // Applies the named mixin.
- // For now, "PbMapMixin" is the only available mixin.
- // The empty string can be used to turn off mixins for this message.
- optional string mixin = 96128839;
-}
-
-extend google.protobuf.FieldOptions {
- // Adds @override annotation to the field's getter (for use with mixins).
- optional bool override_getter = 28205290;
-
- // Adds @override annotation to the field's setter (for use with mixins).
- optional bool override_setter = 28937366;
-
- // Adds @override annotation to the field's hasX() method (for use with
- // mixins).
- optional bool override_has_method = 28937461;
-
- // Adds @override annotation to the field's clearX() method (for use with
- // mixins).
- optional bool override_clear_method = 28907907;
-
- // Uses the given name for getters, setters and as suffixes for has/clear
- // methods in the generated Dart file. Should be lowerCamelCase.
- optional string dart_name = 28700919;
-}
diff --git a/protos/descriptor.proto b/protos/descriptor.proto
deleted file mode 100644
index c7fbaaf..0000000
--- a/protos/descriptor.proto
+++ /dev/null
@@ -1,836 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// The messages in this file describe the definitions found in .proto files.
-// A valid .proto file can be translated directly to a FileDescriptorProto
-// without any other information (e.g. without reading its imports).
-
-
-syntax = "proto2";
-
-package google.protobuf;
-option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "DescriptorProtos";
-option csharp_namespace = "Google.Protobuf.Reflection";
-option objc_class_prefix = "GPB";
-
-// descriptor.proto must be optimized for speed because reflection-based
-// algorithms don't work during bootstrapping.
-option optimize_for = SPEED;
-
-// The protocol compiler can output a FileDescriptorSet containing the .proto
-// files it parses.
-message FileDescriptorSet {
- repeated FileDescriptorProto file = 1;
-}
-
-// Describes a complete .proto file.
-message FileDescriptorProto {
- optional string name = 1; // file name, relative to root of source tree
- optional string package = 2; // e.g. "foo", "foo.bar", etc.
-
- // Names of files imported by this file.
- repeated string dependency = 3;
- // Indexes of the public imported files in the dependency list above.
- repeated int32 public_dependency = 10;
- // Indexes of the weak imported files in the dependency list.
- // For Google-internal migration only. Do not use.
- repeated int32 weak_dependency = 11;
-
- // All top-level definitions in this file.
- repeated DescriptorProto message_type = 4;
- repeated EnumDescriptorProto enum_type = 5;
- repeated ServiceDescriptorProto service = 6;
- repeated FieldDescriptorProto extension = 7;
-
- optional FileOptions options = 8;
-
- // This field contains optional information about the original source code.
- // You may safely remove this entire field without harming runtime
- // functionality of the descriptors -- the information is needed only by
- // development tools.
- optional SourceCodeInfo source_code_info = 9;
-
- // The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
- optional string syntax = 12;
-}
-
-// Describes a message type.
-message DescriptorProto {
- optional string name = 1;
-
- repeated FieldDescriptorProto field = 2;
- repeated FieldDescriptorProto extension = 6;
-
- repeated DescriptorProto nested_type = 3;
- repeated EnumDescriptorProto enum_type = 4;
-
- message ExtensionRange {
- optional int32 start = 1;
- optional int32 end = 2;
- }
- repeated ExtensionRange extension_range = 5;
-
- repeated OneofDescriptorProto oneof_decl = 8;
-
- optional MessageOptions options = 7;
-
- // Range of reserved tag numbers. Reserved tag numbers may not be used by
- // fields or extension ranges in the same message. Reserved ranges may
- // not overlap.
- message ReservedRange {
- optional int32 start = 1; // Inclusive.
- optional int32 end = 2; // Exclusive.
- }
- repeated ReservedRange reserved_range = 9;
- // Reserved field names, which may not be used by fields in the same message.
- // A given name may only be reserved once.
- repeated string reserved_name = 10;
-}
-
-// Describes a field within a message.
-message FieldDescriptorProto {
- enum Type {
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- TYPE_DOUBLE = 1;
- TYPE_FLOAT = 2;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- TYPE_INT64 = 3;
- TYPE_UINT64 = 4;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- TYPE_INT32 = 5;
- TYPE_FIXED64 = 6;
- TYPE_FIXED32 = 7;
- TYPE_BOOL = 8;
- TYPE_STRING = 9;
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- TYPE_GROUP = 10;
- TYPE_MESSAGE = 11; // Length-delimited aggregate.
-
- // New in version 2.
- TYPE_BYTES = 12;
- TYPE_UINT32 = 13;
- TYPE_ENUM = 14;
- TYPE_SFIXED32 = 15;
- TYPE_SFIXED64 = 16;
- TYPE_SINT32 = 17; // Uses ZigZag encoding.
- TYPE_SINT64 = 18; // Uses ZigZag encoding.
- };
-
- enum Label {
- // 0 is reserved for errors
- LABEL_OPTIONAL = 1;
- LABEL_REQUIRED = 2;
- LABEL_REPEATED = 3;
- };
-
- optional string name = 1;
- optional int32 number = 3;
- optional Label label = 4;
-
- // If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- optional Type type = 5;
-
- // For message and enum types, this is the name of the type. If the name
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- // rules are used to find the type (i.e. first the nested types within this
- // message are searched, then within the parent, on up to the root
- // namespace).
- optional string type_name = 6;
-
- // For extensions, this is the name of the type being extended. It is
- // resolved in the same manner as type_name.
- optional string extendee = 2;
-
- // For numeric types, contains the original text representation of the value.
- // For booleans, "true" or "false".
- // For strings, contains the default text contents (not escaped in any way).
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
- optional string default_value = 7;
-
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof.
- optional int32 oneof_index = 9;
-
- // JSON name of this field. The value is set by protocol compiler. If the
- // user has set a "json_name" option on this field, that option's value
- // will be used. Otherwise, it's deduced from the field's name by converting
- // it to camelCase.
- optional string json_name = 10;
-
- optional FieldOptions options = 8;
-}
-
-// Describes a oneof.
-message OneofDescriptorProto {
- optional string name = 1;
- optional OneofOptions options = 2;
-}
-
-// Describes an enum type.
-message EnumDescriptorProto {
- optional string name = 1;
-
- repeated EnumValueDescriptorProto value = 2;
-
- optional EnumOptions options = 3;
-}
-
-// Describes a value within an enum.
-message EnumValueDescriptorProto {
- optional string name = 1;
- optional int32 number = 2;
-
- optional EnumValueOptions options = 3;
-}
-
-// Describes a service.
-message ServiceDescriptorProto {
- optional string name = 1;
- repeated MethodDescriptorProto method = 2;
-
- optional ServiceOptions options = 3;
-}
-
-// Describes a method of a service.
-message MethodDescriptorProto {
- optional string name = 1;
-
- // Input and output type names. These are resolved in the same way as
- // FieldDescriptorProto.type_name, but must refer to a message type.
- optional string input_type = 2;
- optional string output_type = 3;
-
- optional MethodOptions options = 4;
-
- // Identifies if client streams multiple client messages
- optional bool client_streaming = 5 [default=false];
- // Identifies if server streams multiple server messages
- optional bool server_streaming = 6 [default=false];
-}
-
-
-// ===================================================================
-// Options
-
-// Each of the definitions above may have "options" attached. These are
-// just annotations which may cause code to be generated slightly differently
-// or may contain hints for code that manipulates protocol messages.
-//
-// Clients may define custom options as extensions of the *Options messages.
-// These extensions may not yet be known at parsing time, so the parser cannot
-// store the values in them. Instead it stores them in a field in the *Options
-// message called uninterpreted_option. This field must have the same name
-// across all *Options messages. We then use this field to populate the
-// extensions when we build a descriptor, at which point all protos have been
-// parsed and so all extensions are known.
-//
-// Extension numbers for custom options may be chosen as follows:
-// * For options which will only be used within a single application or
-// organization, or for experimental options, use field numbers 50000
-// through 99999. It is up to you to ensure that you do not use the
-// same number for multiple options.
-// * For options which will be published and used publicly by multiple
-// independent entities, e-mail protobuf-global-extension-registry@google.com
-// to reserve extension numbers. Simply provide your project name (e.g.
-// Objective-C plugin) and your project website (if available) -- there's no
-// need to explain how you intend to use them. Usually you only need one
-// extension number. You can declare multiple options with only one extension
-// number by putting them in a sub-message. See the Custom Options section of
-// the docs for examples:
-// https://developers.google.com/protocol-buffers/docs/proto#options
-// If this turns out to be popular, a web service will be set up
-// to automatically assign option numbers.
-
-
-message FileOptions {
-
- // Sets the Java package where classes generated from this .proto will be
- // placed. By default, the proto package is used, but this is often
- // inappropriate because proto packages do not normally start with backwards
- // domain names.
- optional string java_package = 1;
-
-
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
- optional string java_outer_classname = 8;
-
- // If set true, then the Java code generator will generate a separate .java
- // file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
- // generated to contain the file's getDescriptor() method as well as any
- // top-level extensions defined in the file.
- optional bool java_multiple_files = 10 [default=false];
-
- // This option does nothing.
- optional bool java_generate_equals_and_hash = 20 [deprecated=true];
-
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- optional bool java_string_check_utf8 = 27 [default=false];
-
-
- // Generated classes can be optimized for speed or code size.
- enum OptimizeMode {
- SPEED = 1; // Generate complete code for parsing, serialization,
- // etc.
- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
- }
- optional OptimizeMode optimize_for = 9 [default=SPEED];
-
- // Sets the Go package where structs generated from this .proto will be
- // placed. If omitted, the Go package will be derived from the following:
- // - The basename of the package import path, if provided.
- // - Otherwise, the package statement in the .proto file, if present.
- // - Otherwise, the basename of the .proto file, without extension.
- optional string go_package = 11;
-
-
-
- // Should generic services be generated in each language? "Generic" services
- // are not specific to any particular RPC system. They are generated by the
- // main code generators in each language (without additional plugins).
- // Generic services were the only kind of service generation supported by
- // early versions of google.protobuf.
- //
- // Generic services are now considered deprecated in favor of using plugins
- // that generate code specific to your particular RPC system. Therefore,
- // these default to false. Old code which depends on generic services should
- // explicitly set them to true.
- optional bool cc_generic_services = 16 [default=false];
- optional bool java_generic_services = 17 [default=false];
- optional bool py_generic_services = 18 [default=false];
-
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- optional bool deprecated = 23 [default=false];
-
- // Enables the use of arenas for the proto messages in this file. This applies
- // only to generated classes for C++.
- optional bool cc_enable_arenas = 31 [default=false];
-
-
- // Sets the objective c class prefix which is prepended to all objective c
- // generated classes from this .proto. There is no default.
- optional string objc_class_prefix = 36;
-
- // Namespace for generated classes; defaults to the package.
- optional string csharp_namespace = 37;
-
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- optional string swift_prefix = 39;
-
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- optional string php_class_prefix = 40;
-
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- optional string php_namespace = 41;
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 38;
-}
-
-message MessageOptions {
- // Set true to use the old proto1 MessageSet wire format for extensions.
- // This is provided for backwards-compatibility with the MessageSet wire
- // format. You should not use this for any other reason: It's less
- // efficient, has fewer features, and is more complicated.
- //
- // The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
- // Note that the message cannot have any defined fields; MessageSets only
- // have extensions.
- //
- // All extensions of your type must be singular messages; e.g. they cannot
- // be int32s, enums, or repeated messages.
- //
- // Because this is an option, the above two restrictions are not enforced by
- // the protocol compiler.
- optional bool message_set_wire_format = 1 [default=false];
-
- // Disables the generation of the standard "descriptor()" accessor, which can
- // conflict with a field of the same name. This is meant to make migration
- // from proto1 easier; new code should avoid fields named "descriptor".
- optional bool no_standard_descriptor_accessor = 2 [default=false];
-
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- optional bool deprecated = 3 [default=false];
-
- // Whether the message is an automatically generated map entry type for the
- // maps field.
- //
- // For maps fields:
- // map<KeyType, ValueType> map_field = 1;
- // The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
- //
- // Implementations may choose not to generate the map_entry=true message, but
- // use a native map in the target language to hold the keys and values.
- // The reflection APIs in such implementions still need to work as
- // if the field is a repeated message field.
- //
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
- // instead. The option should only be implicitly set by the proto compiler
- // parser.
- optional bool map_entry = 7;
-
- reserved 8; // javalite_serializable
- reserved 9; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message FieldOptions {
- // The ctype option instructs the C++ code generator to use a different
- // representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
- optional CType ctype = 1 [default = STRING];
- enum CType {
- // Default mode.
- STRING = 0;
-
- CORD = 1;
-
- STRING_PIECE = 2;
- }
- // The packed option can be enabled for repeated primitive fields to enable
- // a more efficient representation on the wire. Rather than repeatedly
- // writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
- optional bool packed = 2;
-
- // The jstype option determines the JavaScript type used for values of the
- // field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). By default these types are
- // represented as JavaScript strings. This avoids loss of precision that can
- // happen when a large value is converted to a floating point JavaScript
- // numbers. Specifying JS_NUMBER for the jstype causes the generated
- // JavaScript code to use the JavaScript "number" type instead of strings.
- // This option is an enum to permit additional types to be added,
- // e.g. goog.math.Integer.
- optional JSType jstype = 6 [default = JS_NORMAL];
- enum JSType {
- // Use the default type.
- JS_NORMAL = 0;
-
- // Use JavaScript strings.
- JS_STRING = 1;
-
- // Use JavaScript numbers.
- JS_NUMBER = 2;
- }
-
- // Should this field be parsed lazily? Lazy applies only to message-type
- // fields. It means that when the outer message is initially parsed, the
- // inner message's contents will not be parsed but instead stored in encoded
- // form. The inner message will actually be parsed when it is first accessed.
- //
- // This is only a hint. Implementations are free to choose whether to use
- // eager or lazy parsing regardless of the value of this option. However,
- // setting this option true suggests that the protocol author believes that
- // using lazy parsing on this field is worth the additional bookkeeping
- // overhead typically needed to implement it.
- //
- // This option does not affect the public interface of any generated code;
- // all method signatures remain the same. Furthermore, thread-safety of the
- // interface is not affected by this option; const methods remain safe to
- // call from multiple threads concurrently, while non-const methods continue
- // to require exclusive access.
- //
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
- optional bool lazy = 5 [default=false];
-
- // Is this field deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for accessors, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating fields.
- optional bool deprecated = 3 [default=false];
-
- // For Google-internal migration only. Do not use.
- optional bool weak = 10 [default=false];
-
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 4; // removed jtype
-}
-
-message OneofOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumOptions {
-
- // Set this option to true to allow mapping different tag names to the same
- // value.
- optional bool allow_alias = 2;
-
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- optional bool deprecated = 3 [default=false];
-
- reserved 5; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumValueOptions {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- optional bool deprecated = 1 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message ServiceOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- optional bool deprecated = 33 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message MethodOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- optional bool deprecated = 33 [default=false];
-
- // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
- // or neither? HTTP based RPC implementation may choose GET verb for safe
- // methods, and PUT verb for idempotent methods instead of the default POST.
- enum IdempotencyLevel {
- IDEMPOTENCY_UNKNOWN = 0;
- NO_SIDE_EFFECTS = 1; // implies idempotent
- IDEMPOTENT = 2; // idempotent, but may have side effects
- }
- optional IdempotencyLevel idempotency_level =
- 34 [default=IDEMPOTENCY_UNKNOWN];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-
-// A message representing a option the parser does not recognize. This only
-// appears in options protos created by the compiler::Parser class.
-// DescriptorPool resolves these when building Descriptor objects. Therefore,
-// options protos in descriptor objects (e.g. returned by Descriptor::options(),
-// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
-// in them.
-message UninterpretedOption {
- // The name of the uninterpreted option. Each string represents a segment in
- // a dot-separated name. is_extension is true iff a segment represents an
- // extension (denoted with parentheses in options specs in .proto files).
- // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
- // "foo.(bar.baz).qux".
- message NamePart {
- required string name_part = 1;
- required bool is_extension = 2;
- }
- repeated NamePart name = 2;
-
- // The value of the uninterpreted option, in whatever type the tokenizer
- // identified it as during parsing. Exactly one of these should be set.
- optional string identifier_value = 3;
- optional uint64 positive_int_value = 4;
- optional int64 negative_int_value = 5;
- optional double double_value = 6;
- optional bytes string_value = 7;
- optional string aggregate_value = 8;
-}
-
-// ===================================================================
-// Optional source code info
-
-// Encapsulates information about the original source file from which a
-// FileDescriptorProto was generated.
-message SourceCodeInfo {
- // A Location identifies a piece of source code in a .proto file which
- // corresponds to a particular definition. This information is intended
- // to be useful to IDEs, code indexers, documentation generators, and similar
- // tools.
- //
- // For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
- // Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
- // We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- //
- // Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendent. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
- repeated Location location = 1;
- message Location {
- // Identifies which part of the FileDescriptorProto was defined at this
- // location.
- //
- // Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
- // refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
- // This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
- // and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
- // and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
- //
- // Thus, the above path gives the location of a field name. If we removed
- // the last element:
- // [ 4, 3, 2, 7 ]
- // this path refers to the whole field declaration (from the beginning
- // of the label to the terminating semicolon).
- repeated int32 path = 1 [packed=true];
-
- // Always has exactly three or four elements: start line, start column,
- // end line (optional, otherwise assumed same as start line), end column.
- // These are packed into a single field for efficiency. Note that line
- // and column numbers are zero-based -- typically you will want to add
- // 1 to each before displaying to a user.
- repeated int32 span = 2 [packed=true];
-
- // If this SourceCodeInfo represents a complete declaration, these are any
- // comments appearing before and after the declaration which appear to be
- // attached to the declaration.
- //
- // A series of line comments appearing on consecutive lines, with no other
- // tokens appearing on those lines, will be treated as a single comment.
- //
- // leading_detached_comments will keep paragraphs of comments that appear
- // before (but not connected to) the current element. Each paragraph,
- // separated by empty lines, will be one comment element in the repeated
- // field.
- //
- // Only the comment content is provided; comment markers (e.g. //) are
- // stripped out. For block comments, leading whitespace and an asterisk
- // will be stripped from the beginning of each line other than the first.
- // Newlines are included in the output.
- //
- // Examples:
- //
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
- //
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
- //
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
- //
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
- //
- // // Detached comment for corge paragraph 2.
- //
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
- //
- // // ignored detached comments.
- optional string leading_comments = 3;
- optional string trailing_comments = 4;
- repeated string leading_detached_comments = 6;
- }
-}
-
-// Describes the relationship between generated code and its original source
-// file. A GeneratedCodeInfo message is associated with only one generated
-// source file, but may contain references to different source .proto files.
-message GeneratedCodeInfo {
- // An Annotation connects some span of text in generated code to an element
- // of its generating .proto file.
- repeated Annotation annotation = 1;
- message Annotation {
- // Identifies the element in the original source .proto file. This field
- // is formatted the same as SourceCodeInfo.Location.path.
- repeated int32 path = 1 [packed=true];
-
- // Identifies the filesystem path to the original source .proto.
- optional string source_file = 2;
-
- // Identifies the starting offset in bytes in the generated code
- // that relates to the identified object.
- optional int32 begin = 3;
-
- // Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
- // the last relevant byte (so the length of the text = end - begin).
- optional int32 end = 4;
- }
-}
diff --git a/protos/plugin.proto b/protos/plugin.proto
deleted file mode 100644
index 2df53dd..0000000
--- a/protos/plugin.proto
+++ /dev/null
@@ -1,166 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-//
-// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
-// change.
-//
-// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
-// just a program that reads a CodeGeneratorRequest from stdin and writes a
-// CodeGeneratorResponse to stdout.
-//
-// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
-// of dealing with the raw protocol defined here.
-//
-// A plugin executable needs only to be placed somewhere in the path. The
-// plugin should be named "protoc-gen-$NAME", and will then be used when the
-// flag "--${NAME}_out" is passed to protoc.
-
-syntax = "proto2";
-package google.protobuf.compiler;
-option java_package = "com.google.protobuf.compiler";
-option java_outer_classname = "PluginProtos";
-
-option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";
-
-import "descriptor.proto";
-
-// The version number of protocol compiler.
-message Version {
- optional int32 major = 1;
- optional int32 minor = 2;
- optional int32 patch = 3;
- // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
- // be empty for mainline stable releases.
- optional string suffix = 4;
-}
-
-// An encoded CodeGeneratorRequest is written to the plugin's stdin.
-message CodeGeneratorRequest {
- // The .proto files that were explicitly listed on the command-line. The
- // code generator should generate code only for these files. Each file's
- // descriptor will be included in proto_file, below.
- repeated string file_to_generate = 1;
-
- // The generator parameter passed on the command-line.
- optional string parameter = 2;
-
- // FileDescriptorProtos for all files in files_to_generate and everything
- // they import. The files will appear in topological order, so each file
- // appears before any file that imports it.
- //
- // protoc guarantees that all proto_files will be written after
- // the fields above, even though this is not technically guaranteed by the
- // protobuf wire format. This theoretically could allow a plugin to stream
- // in the FileDescriptorProtos and handle them one by one rather than read
- // the entire set into memory at once. However, as of this writing, this
- // is not similarly optimized on protoc's end -- it will store all fields in
- // memory at once before sending them to the plugin.
- //
- // Type names of fields and extensions in the FileDescriptorProto are always
- // fully qualified.
- repeated FileDescriptorProto proto_file = 15;
-
- // The version number of protocol compiler.
- optional Version compiler_version = 3;
-}
-
-// The plugin writes an encoded CodeGeneratorResponse to stdout.
-message CodeGeneratorResponse {
- // Error message. If non-empty, code generation failed. The plugin process
- // should exit with status code zero even if it reports an error in this way.
- //
- // This should be used to indicate errors in .proto files which prevent the
- // code generator from generating correct code. Errors which indicate a
- // problem in protoc itself -- such as the input CodeGeneratorRequest being
- // unparseable -- should be reported by writing a message to stderr and
- // exiting with a non-zero status code.
- optional string error = 1;
-
- // Represents a single generated file.
- message File {
- // The file name, relative to the output directory. The name must not
- // contain "." or ".." components and must be relative, not be absolute (so,
- // the file cannot lie outside the output directory). "/" must be used as
- // the path separator, not "\".
- //
- // If the name is omitted, the content will be appended to the previous
- // file. This allows the generator to break large files into small chunks,
- // and allows the generated text to be streamed back to protoc so that large
- // files need not reside completely in memory at one time. Note that as of
- // this writing protoc does not optimize for this -- it will read the entire
- // CodeGeneratorResponse before writing files to disk.
- optional string name = 1;
-
- // If non-empty, indicates that the named file should already exist, and the
- // content here is to be inserted into that file at a defined insertion
- // point. This feature allows a code generator to extend the output
- // produced by another code generator. The original generator may provide
- // insertion points by placing special annotations in the file that look
- // like:
- // @@protoc_insertion_point(NAME)
- // The annotation can have arbitrary text before and after it on the line,
- // which allows it to be placed in a comment. NAME should be replaced with
- // an identifier naming the point -- this is what other generators will use
- // as the insertion_point. Code inserted at this point will be placed
- // immediately above the line containing the insertion point (thus multiple
- // insertions to the same point will come out in the order they were added).
- // The double-@ is intended to make it unlikely that the generated code
- // could contain things that look like insertion points by accident.
- //
- // For example, the C++ code generator places the following line in the
- // .pb.h files that it generates:
- // // @@protoc_insertion_point(namespace_scope)
- // This line appears within the scope of the file's package namespace, but
- // outside of any particular class. Another plugin can then specify the
- // insertion_point "namespace_scope" to generate additional classes or
- // other declarations that should be placed in this scope.
- //
- // Note that if the line containing the insertion point begins with
- // whitespace, the same whitespace will be added to every line of the
- // inserted text. This is useful for languages like Python, where
- // indentation matters. In these languages, the insertion point comment
- // should be indented the same amount as any inserted code will need to be
- // in order to work correctly in that context.
- //
- // The code generator that generates the initial file and the one which
- // inserts into it must both run as part of a single invocation of protoc.
- // Code generators are executed in the order in which they appear on the
- // command line.
- //
- // If |insertion_point| is present, |name| must also be present.
- optional string insertion_point = 2;
-
- // The file contents.
- optional string content = 15;
- }
- repeated File file = 15;
-}
diff --git a/pubspec.yaml b/pubspec.yaml
deleted file mode 100644
index 7d7f545..0000000
--- a/pubspec.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: protoc_plugin
-version: 12.0.0
-author: Dart Team <misc@dartlang.org>
-description: Protoc compiler plugin to generate Dart code
-homepage: https://github.com/dart-lang/dart-protoc-plugin
-
-environment:
- sdk: '>=2.0.0 <3.0.0'
-
-dependencies:
- fixnum: ^0.10.5
- path: ^1.0.0
- protobuf: ^0.10.5
- dart_style: ^1.0.6
-
-dev_dependencies:
- build: ^1.0.0
- build_runner: ^1.0.0
- build_web_compilers: ^0.4.0
- glob: ^1.1.7
- test: ^1.3.0
- yaml: ^2.1.15
-
-executables:
- protoc-gen-dart: protoc_plugin
diff --git a/test/all_tests.dart b/test/all_tests.dart
deleted file mode 100755
index fec7447..0000000
--- a/test/all_tests.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc_plugin_all_tests;
-
-import 'bazel_test.dart' as bazel;
-import 'any_test.dart' as any;
-import 'client_generator_test.dart' as client_generator;
-import 'const_generator_test.dart' as const_generator;
-import 'enum_generator_test.dart' as enum_generator;
-import 'extension_test.dart' as extension;
-import 'file_generator_test.dart' as file_generator;
-import 'generated_message_test.dart' as generated_message;
-import 'hash_code_test.dart' as hash_code;
-import 'indenting_writer_test.dart' as indenting_writer;
-import 'import_test.dart' as import_prefix;
-import 'json_test.dart' as json;
-import 'leading_underscores_test.dart' as leading_underscores;
-import 'map_test.dart' as map;
-import 'message_generator_test.dart' as message_generator;
-import 'message_test.dart' as message;
-import 'mixin_test.dart' as mixin_test;
-import 'names_test.dart' as names;
-import 'protoc_options_test.dart' as protoc_options;
-import 'repeated_field_test.dart' as repeated_field;
-import 'service_test.dart' as service;
-import 'service_generator_test.dart' as service_generator;
-import 'unknown_field_set_test.dart' as unknown_field_set;
-import 'validate_fail_test.dart' as validate_fail;
-import 'wire_format_test.dart' as wire_format;
-
-void main() {
- any.main();
- bazel.main();
- client_generator.main();
- const_generator.main();
- enum_generator.main();
- extension.main();
- file_generator.main();
- generated_message.main();
- hash_code.main();
- indenting_writer.main();
- import_prefix.main();
- json.main();
- leading_underscores.main();
- map.main();
- message_generator.main();
- message.main();
- mixin_test.main();
- names.main();
- protoc_options.main();
- repeated_field.main();
- service.main();
- service_generator.main();
- unknown_field_set.main();
- validate_fail.main();
- wire_format.main();
-}
diff --git a/test/any_test.dart b/test/any_test.dart
deleted file mode 100644
index e755a27..0000000
--- a/test/any_test.dart
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/any.pb.dart';
-import '../out/protos/service.pb.dart';
-import '../out/protos/toplevel.pb.dart' as toplevel;
-import '../out/protos/using_any.pb.dart';
-
-void main() {
- test('pack -> unpack', () {
- Any any = Any.pack(new SearchRequest()..query = 'hest');
- expect(any.typeUrl, 'type.googleapis.com/SearchRequest');
- Any any1 = Any.pack(new SearchRequest()..query = 'hest1',
- typeUrlPrefix: 'example.com');
- expect(any1.typeUrl, 'example.com/SearchRequest');
- expect(any1.canUnpackInto(SearchRequest.getDefault()), true);
- expect(any1.canUnpackInto(SearchResponse.getDefault()), false);
- SearchRequest searchRequest = any.unpackInto(new SearchRequest());
- expect(searchRequest.query, 'hest');
- SearchRequest searchRequest1 = any1.unpackInto(new SearchRequest());
- expect(searchRequest1.query, 'hest1');
- expect(() {
- any.unpackInto(new SearchResponse());
- }, throwsA(const TypeMatcher<InvalidProtocolBufferException>()));
- });
-
- test('any inside any', () {
- Any any = Any.pack(Any.pack(new SearchRequest()..query = 'hest'));
- expect(any.typeUrl, 'type.googleapis.com/google.protobuf.Any');
- expect(any.canUnpackInto(Any.getDefault()), true);
- expect(any.canUnpackInto(SearchRequest.getDefault()), false);
- expect(any.unpackInto(new Any()).canUnpackInto(SearchRequest.getDefault()),
- true);
- expect(any.unpackInto(new Any()).unpackInto(new SearchRequest()).query,
- 'hest');
- });
-
- test('toplevel', () {
- Any any = Any.pack(new toplevel.T()
- ..a = 127
- ..b = 'hest');
- expect(any.typeUrl, 'type.googleapis.com/T');
- var t2 = any.unpackInto(new toplevel.T());
- expect(t2.a, 127);
- expect(t2.b, 'hest');
- });
-
- test('nested message', () {
- Any any = Any.pack(new Container_Nested()..int32Value = 127);
- expect(
- any.typeUrl, 'type.googleapis.com/protobuf_unittest.Container.Nested');
- var t2 = any.unpackInto(new Container_Nested());
- expect(t2.int32Value, 127);
- });
-
- test('using any', () {
- Any any = Any.pack(new SearchRequest()..query = 'hest');
- Any any1 = Any.pack(new SearchRequest()..query = 'hest1');
- Any any2 = Any.pack(new SearchRequest()..query = 'hest2');
- TestAny testAny = TestAny()
- ..anyValue = any
- ..repeatedAnyValue.addAll(<Any>[any1, any2]);
- TestAny testAnyFromBuffer = TestAny.fromBuffer(testAny.writeToBuffer());
- expect(testAnyFromBuffer.anyValue.unpackInto(new SearchRequest()).query,
- 'hest');
- expect(
- testAnyFromBuffer.repeatedAnyValue[0]
- .unpackInto(new SearchRequest())
- .query,
- 'hest1');
- expect(
- testAnyFromBuffer.repeatedAnyValue[1]
- .unpackInto(new SearchRequest())
- .query,
- 'hest2');
- });
-}
diff --git a/test/bazel_test.dart b/test/bazel_test.dart
deleted file mode 100644
index 28239c9..0000000
--- a/test/bazel_test.dart
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bazel_test;
-
-import 'package:protoc_plugin/bazel.dart';
-import 'package:test/test.dart';
-
-void main() {
- group('BazelOptionParser', () {
- var optionParser;
- Map<String, BazelPackage> packages;
- var errors;
-
- setUp(() {
- packages = {};
- optionParser = new BazelOptionParser(packages);
- errors = [];
- });
-
- _onError(String message) {
- errors.add(message);
- }
-
- test('should call onError for null values', () {
- optionParser.parse(null, null, _onError);
- expect(errors, isNotEmpty);
- });
-
- test('should call onError for empty values', () {
- optionParser.parse(null, '', _onError);
- expect(errors, isNotEmpty);
- });
-
- test('should call onError for malformed entries', () {
- optionParser.parse(null, 'foo', _onError);
- optionParser.parse(null, 'foo|bar', _onError);
- optionParser.parse(null, 'foo|bar|baz|quux', _onError);
- expect(errors.length, 3);
- expect(packages, isEmpty);
- });
-
- test('should handle a single package|path entry', () {
- optionParser.parse(null, 'foo|bar/baz|wibble/wobble', _onError);
- expect(errors, isEmpty);
- expect(packages.length, 1);
- expect(packages['bar/baz'].name, 'foo');
- expect(packages['bar/baz'].input_root, 'bar/baz');
- expect(packages['bar/baz'].output_root, 'wibble/wobble');
- });
-
- test('should handle multiple package|path entries', () {
- optionParser.parse(
- null,
- 'foo|bar/baz|wibble/wobble;a|b/c/d|e/f;one.two|three|four/five',
- _onError);
- expect(errors, isEmpty);
- expect(packages.length, 3);
- expect(packages['bar/baz'].name, 'foo');
- expect(packages['bar/baz'].input_root, 'bar/baz');
- expect(packages['bar/baz'].output_root, 'wibble/wobble');
- expect(packages['b/c/d'].name, 'a');
- expect(packages['b/c/d'].input_root, 'b/c/d');
- expect(packages['b/c/d'].output_root, 'e/f');
- expect(packages['three'].name, 'one.two');
- expect(packages['three'].input_root, 'three');
- expect(packages['three'].output_root, 'four/five');
- });
-
- test('should skip and continue past malformed entries', () {
- optionParser.parse(null,
- 'foo|bar/baz|wibble/wobble;fizz;a.b|c/d|e/f;x|y|zz|y', _onError);
- expect(errors.length, 2);
- expect(packages.length, 2);
- expect(packages['bar/baz'].name, 'foo');
- expect(packages['c/d'].name, 'a.b');
- });
-
- test('should emit error for conflicting package names', () {
- optionParser.parse(null,
- 'foo|bar/baz|wibble/wobble;flob|bar/baz|wibble/wobble', _onError);
- expect(errors.length, 1);
- expect(packages.length, 1);
- expect(packages['bar/baz'].name, 'foo');
- });
-
- test('should emit error for conflicting output_roots', () {
- optionParser.parse(null,
- 'foo|bar/baz|wibble/wobble;foo|bar/baz|womble/wumble', _onError);
- expect(errors.length, 1);
- expect(packages.length, 1);
- expect(packages['bar/baz'].output_root, 'wibble/wobble');
- });
-
- test('should normalize paths', () {
- optionParser.parse(
- null, 'foo|bar//baz/|quux/;a|b/|c;c|d//e/f///|g//h//', _onError);
- expect(errors, isEmpty);
- expect(packages.length, 3);
- expect(packages['bar/baz'].name, 'foo');
- expect(packages['bar/baz'].input_root, 'bar/baz');
- expect(packages['bar/baz'].output_root, 'quux');
- expect(packages['b'].name, 'a');
- expect(packages['b'].input_root, 'b');
- expect(packages['b'].output_root, 'c');
- expect(packages['d/e/f'].name, 'c');
- expect(packages['d/e/f'].input_root, 'd/e/f');
- expect(packages['d/e/f'].output_root, 'g/h');
- });
- });
-
- group('BazelOutputConfiguration', () {
- Map<String, BazelPackage> packages;
- BazelOutputConfiguration config;
-
- setUp(() {
- packages = {
- 'foo/bar': new BazelPackage('a.b.c', 'foo/bar', 'baz/flob'),
- 'foo/bar/baz': new BazelPackage('d.e.f', 'foo/bar/baz', 'baz/flob/foo'),
- 'wibble/wobble':
- new BazelPackage('wibble.wobble', 'wibble/wobble', 'womble/wumble'),
- };
- config = new BazelOutputConfiguration(packages);
- });
-
- group('outputPathForUri', () {
- test('should handle files at package root', () {
- var p =
- config.outputPathFor(Uri.parse('foo/bar/quux.proto'), '.pb.dart');
- expect(p.path, 'baz/flob/quux.pb.dart');
- });
-
- test('should handle files below package root', () {
- var p = config.outputPathFor(
- Uri.parse('foo/bar/a/b/quux.proto'), '.pb.dart');
- expect(p.path, 'baz/flob/a/b/quux.pb.dart');
- });
-
- test('should handle files in a nested package root', () {
- var p = config.outputPathFor(
- Uri.parse('foo/bar/baz/quux.proto'), '.pb.dart');
- expect(p.path, 'baz/flob/foo/quux.pb.dart');
- });
-
- test('should handle files below a nested package root', () {
- var p = config.outputPathFor(
- Uri.parse('foo/bar/baz/a/b/quux.proto'), '.pb.dart');
- expect(p.path, 'baz/flob/foo/a/b/quux.pb.dart');
- });
-
- test('should throw if unable to locate the package for an input', () {
- expect(
- () =>
- config.outputPathFor(Uri.parse('a/b/c/quux.proto'), '.pb.dart'),
- throwsArgumentError);
- });
- });
-
- group('resolveImport', () {
- test('should emit relative import if in same package', () {
- var target = Uri.parse('foo/bar/quux.proto');
- var source = Uri.parse('foo/bar/baz.proto');
- var uri = config.resolveImport(target, source, '.pb.dart');
- expect(uri.path, 'quux.pb.dart');
- });
-
- test('should emit relative import if in subdir of same package', () {
- var target = Uri.parse('foo/bar/a/b/quux.proto');
- var source = Uri.parse('foo/bar/baz.proto');
- var uri = config.resolveImport(target, source, '.pb.dart');
- expect(uri.path, 'a/b/quux.pb.dart');
- });
-
- test('should emit relative import if in parent dir in same package', () {
- var target = Uri.parse('foo/bar/quux.proto');
- var source = Uri.parse('foo/bar/a/b/baz.proto');
- var uri = config.resolveImport(target, source, '.pb.dart');
- expect(uri.path, '../../quux.pb.dart');
- });
-
- test('should emit package: import if in different package', () {
- var target = Uri.parse('wibble/wobble/quux.proto');
- var source = Uri.parse('foo/bar/baz.proto');
- var uri = config.resolveImport(target, source, '.pb.dart');
- expect(uri.scheme, 'package');
- expect(uri.path, 'wibble.wobble/quux.pb.dart');
- });
-
- test('should emit package: import if in subdir of different package', () {
- var target = Uri.parse('wibble/wobble/foo/bar/quux.proto');
- var source = Uri.parse('foo/bar/baz.proto');
- var uri = config.resolveImport(target, source, '.pb.dart');
- expect(uri.scheme, 'package');
- expect(uri.path, 'wibble.wobble/foo/bar/quux.pb.dart');
- });
-
- test('should throw if target is in unknown package', () {
- var target = Uri.parse('flob/flub/quux.proto');
- var source = Uri.parse('foo/bar/baz.proto');
- expect(() => config.resolveImport(target, source, '.pb.dart'),
- throwsA(startsWith('ERROR: cannot generate import for')));
- });
- });
- });
-}
diff --git a/test/client_generator_test.dart b/test/client_generator_test.dart
deleted file mode 100644
index e0adfa4..0000000
--- a/test/client_generator_test.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library client_generator_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:test/test.dart';
-
-import 'golden_file.dart';
-import 'service_util.dart';
-
-void main() {
- test('testClientGenerator', () {
- var options = new GenerationOptions();
- var fd = buildFileDescriptor(
- "testpkg", "testpkg.proto", ["SomeRequest", "SomeReply"]);
- fd.service.add(buildServiceDescriptor());
- var fg = new FileGenerator(fd, options);
-
- var fd2 = buildFileDescriptor(
- "foo.bar", "foobar.proto", ["EmptyMessage", "AnotherReply"]);
- var fg2 = new FileGenerator(fd2, options);
-
- link(new GenerationOptions(), [fg, fg2]);
-
- ClientApiGenerator cag = fg.clientApiGenerators[0];
-
- IndentingWriter writer = new IndentingWriter();
- cag.generate(writer);
- expectMatchesGoldenFile(writer.toString(), 'test/goldens/client');
- });
-}
diff --git a/test/const_generator_test.dart b/test/const_generator_test.dart
deleted file mode 100644
index 0b1b987..0000000
--- a/test/const_generator_test.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library const_generator_test;
-
-import 'package:protoc_plugin/const_generator.dart';
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:test/test.dart';
-
-String toConst(val) {
- var out = new IndentingWriter();
- writeJsonConst(out, val);
- return out.toString();
-}
-
-void main() {
- test('writeJsonConst examples', () {
- expect(toConst(null), "null");
- expect(toConst(true), "true");
- expect(toConst(false), "false");
- expect(toConst(123), "123");
- expect(toConst(123.456), "123.456");
- });
-
- test('writeJsonConst string examples', () {
- expect(toConst(""), "''");
- expect(toConst("hello"), "'hello'");
- expect(toConst(r"backslash: \"), r"r'backslash: \'");
- expect(toConst(r"hello $world"), r"r'hello $world'");
- expect(toConst("She said, 'hello.'"), '''"She said, 'hello.'"''');
- expect(toConst('''single: ' double: "'''), """'''single: ' double: "'''""");
- var triple = '"""';
- expect(toConst("""single: ' double: " triple: '''"""),
- """${triple}single: ' double: " triple: '''$triple""");
- expect(
- toConst("""single: ' double: " triples: ''' and $triple!"""),
- "r'''\n"
- "single: ' double: \" triples: ''' \"'''\" r''' and $triple!'''");
- });
-
- test('writeJsonConst list examples', () {
- expect(toConst([]), "const []");
- expect(toConst([1, 2, 3]), "const [1, 2, 3]");
- expect(
- toConst([
- [1, 2],
- [3, 4]
- ]),
- 'const [\n'
- ' const [1, 2],\n'
- ' const [3, 4],\n'
- ']');
- });
-
- test('writeJsonConst map examples', () {
- expect(toConst({}), "const {}");
- expect(toConst({"a": 1, "b": 2}), "const {'a': 1, 'b': 2}");
- expect(
- toConst({
- "a": {"x": 1},
- "b": {"x": 2}
- }),
- "const {\n"
- " 'a': const {'x': 1},\n"
- " 'b': const {'x': 2},\n"
- "}");
- });
-}
diff --git a/test/enum_generator_test.dart b/test/enum_generator_test.dart
deleted file mode 100755
index d1cd2f1..0000000
--- a/test/enum_generator_test.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library enum_generator_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-import 'package:test/test.dart';
-
-import 'golden_file.dart';
-
-void main() {
- test('testEnumGenerator', () {
- EnumDescriptorProto ed = new EnumDescriptorProto()
- ..name = 'PhoneType'
- ..value.addAll([
- new EnumValueDescriptorProto()
- ..name = 'MOBILE'
- ..number = 0,
- new EnumValueDescriptorProto()
- ..name = 'HOME'
- ..number = 1,
- new EnumValueDescriptorProto()
- ..name = 'WORK'
- ..number = 2,
- new EnumValueDescriptorProto()
- ..name = 'BUSINESS'
- ..number = 2
- ]);
- IndentingWriter writer = new IndentingWriter();
- FileGenerator fg =
- new FileGenerator(new FileDescriptorProto(), new GenerationOptions());
- EnumGenerator eg = new EnumGenerator(ed, fg, new Set<String>());
- eg.generate(writer);
- expectMatchesGoldenFile(writer.toString(), 'test/goldens/enum');
- });
-}
diff --git a/test/extension_test.dart b/test/extension_test.dart
deleted file mode 100644
index 9a015b6..0000000
--- a/test/extension_test.dart
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library extension_test;
-
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-import '../out/protos/enum_extension.pb.dart';
-import '../out/protos/nested_extension.pb.dart';
-import '../out/protos/non_nested_extension.pb.dart';
-import '../out/protos/ExtensionNameConflict.pb.dart';
-import '../out/protos/ExtensionEnumNameConflict.pb.dart';
-
-import 'test_util.dart';
-
-throwsArgError(String expectedMessage) => throwsA(predicate((x) {
- expect(x, isArgumentError);
- expect(x.message, expectedMessage);
- return true;
- }));
-
-void main() {
- test('can set all extension types', () {
- TestAllExtensions message = new TestAllExtensions();
- setAllExtensions(message);
- assertAllExtensionsSet(message);
- });
-
- test('can modify all repeated extension types', () {
- TestAllExtensions message = new TestAllExtensions();
- setAllExtensions(message);
- modifyRepeatedExtensions(message);
- assertRepeatedExtensionsModified(message);
- });
-
- test('unset extensions return default values', () {
- assertExtensionsClear(new TestAllExtensions());
- });
-
- // void testExtensionReflectionGetters() {} // UNSUPPORTED -- reflection
- // void testExtensionReflectionSetters() {} // UNSUPPORTED -- reflection
- // void testExtensionReflectionSettersRejectNull() {} // UNSUPPORTED
- // void testExtensionReflectionRepeatedSetters() {} // UNSUPPORTED
- // void testExtensionReflectionRepeatedSettersRejectNull() // UNSUPPORTED
- // void testExtensionReflectionDefaults() // UNSUPPORTED
-
- test('can clear an optional extension', () {
- // clearExtension() is not actually used in test_util, so try it manually.
- var message = new TestAllExtensions();
- message.setExtension(Unittest.optionalInt32Extension, 1);
- message.clearExtension(Unittest.optionalInt32Extension);
- expect(message.hasExtension(Unittest.optionalInt32Extension), isFalse);
- });
-
- test('can clear a repeated extension', () {
- var message = new TestAllExtensions();
- message.addExtension(Unittest.repeatedInt32Extension, 1);
- message.clearExtension(Unittest.repeatedInt32Extension);
- expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);
- });
-
- test('can clone an extension field', () {
- TestAllExtensions original = new TestAllExtensions();
- original.setExtension(Unittest.optionalInt32Extension, 1);
- TestAllExtensions clone = original.clone();
- expect(clone.hasExtension(Unittest.optionalInt32Extension), isTrue);
- expect(clone.getExtension(Unittest.optionalInt32Extension), 1);
- });
-
- test('can clone all types of extension fields', () {
- assertAllExtensionsSet(getAllExtensionsSet().clone());
- });
-
- test("throws if field number isn't allowed for extension", () {
- var message = new TestAllTypes(); // does not allow extensions
- expect(() {
- message.setExtension(Unittest.optionalInt32Extension, 0);
- },
- throwsArgError(
- "Extension optionalInt32Extension not legal for message protobuf_unittest.TestAllTypes"));
-
- expect(() {
- message.getExtension(Unittest.optionalInt32Extension);
- },
- throwsArgError(
- "Extension optionalInt32Extension not legal for message protobuf_unittest.TestAllTypes"));
- });
-
- test("throws if an int32 extension is set to a bad value", () {
- var message = new TestAllExtensions();
- expect(() {
- message.setExtension(Unittest.optionalInt32Extension, "hello");
- },
- throwsArgError(
- "Illegal to set field optionalInt32Extension (1) of protobuf_unittest.TestAllExtensions"
- " to value (hello): not type int"));
- });
-
- test('throws if an int64 extension is set to a bad value', () {
- var message = new TestAllExtensions();
- expect(() {
- message.setExtension(Unittest.optionalInt64Extension, 123);
- },
- throwsArgError(
- "Illegal to set field optionalInt64Extension (2) of protobuf_unittest.TestAllExtensions"
- " to value (123): not Int64"));
- });
-
- test('throws if a message extension is set to a bad value', () {
- var message = new TestAllExtensions();
-
- // For a non-repeated message, we only check for a GeneratedMessage.
- expect(() {
- message.setExtension(Unittest.optionalNestedMessageExtension, 123);
- },
- throwsArgError(
- "Illegal to set field optionalNestedMessageExtension (18)"
- " of protobuf_unittest.TestAllExtensions to value (123): not a GeneratedMessage"));
-
- // For a repeated message, the type check is exact.
- expect(() {
- message.addExtension(
- Unittest.repeatedNestedMessageExtension, new TestAllTypes());
- }, throwsATypeError);
- });
-
- test('throws if an enum extension is set to a bad value', () {
- var message = new TestAllExtensions();
-
- // For a non-repeated enum, we only check for a ProtobufEnum.
- expect(() {
- message.setExtension(Unittest.optionalNestedEnumExtension, 123);
- },
- throwsArgError("Illegal to set field optionalNestedEnumExtension (21)"
- " of protobuf_unittest.TestAllExtensions to value (123): not type ProtobufEnum"));
-
- // For a repeated enum, the type check is exact.
- expect(() {
- message.addExtension(
- Unittest.repeatedForeignEnumExtension, TestAllTypes_NestedEnum.FOO);
- }, throwsATypeError);
- });
-
- test('can extend a message with a message field with a different type', () {
- expect(Non_nested_extension.nonNestedExtension.makeDefault(),
- new TypeMatcher<MyNonNestedExtension>());
- expect(Non_nested_extension.nonNestedExtension.name, 'nonNestedExtension');
- });
-
- test('can extend a message with a message field of the same type', () {
- expect(
- MyNestedExtension.recursiveExtension.makeDefault()
- is MessageToBeExtended,
- isTrue);
- expect(MyNestedExtension.recursiveExtension.name, 'recursiveExtension');
- });
-
- test('can extend message with enum', () {
- var msg = new Extendable();
- msg.setExtension(Enum_extension.animal, Animal.CAT);
- });
-
- test('extension class was renamed to avoid conflict with message', () {
- expect(ExtensionNameConflictExt.someExtension.tagNumber, 1);
- });
-
- test('extension class was renamed to avoid conflict with enum', () {
- expect(ExtensionEnumNameConflictExt.enumConflictExtension.tagNumber, 1);
- });
-}
diff --git a/test/file_generator_test.dart b/test/file_generator_test.dart
deleted file mode 100644
index f26d828..0000000
--- a/test/file_generator_test.dart
+++ /dev/null
@@ -1,369 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library file_generator_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-import 'package:protoc_plugin/src/plugin.pb.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:test/test.dart';
-
-import 'golden_file.dart';
-
-FileDescriptorProto buildFileDescriptor(
- {phoneNumber = true, topLevelEnum = false}) {
- FileDescriptorProto fd = new FileDescriptorProto()..name = 'test';
-
- if (topLevelEnum) {
- fd.enumType.add(new EnumDescriptorProto()
- ..name = 'PhoneType'
- ..value.addAll([
- new EnumValueDescriptorProto()
- ..name = 'MOBILE'
- ..number = 0,
- new EnumValueDescriptorProto()
- ..name = 'HOME'
- ..number = 1,
- new EnumValueDescriptorProto()
- ..name = 'WORK'
- ..number = 2,
- new EnumValueDescriptorProto()
- ..name = 'BUSINESS'
- ..number = 2
- ]));
- }
-
- if (phoneNumber) {
- fd.messageType.add(new DescriptorProto()
- ..name = 'PhoneNumber'
- ..field.addAll([
- // required string number = 1;
- new FieldDescriptorProto()
- ..name = 'number'
- ..number = 1
- ..label = FieldDescriptorProto_Label.LABEL_REQUIRED
- ..type = FieldDescriptorProto_Type.TYPE_STRING,
- // optional int32 type = 2;
- // OR
- // optional PhoneType type = 2;
- new FieldDescriptorProto()
- ..name = 'type'
- ..number = 2
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = topLevelEnum
- ? FieldDescriptorProto_Type.TYPE_ENUM
- : FieldDescriptorProto_Type.TYPE_INT32
- ..typeName = topLevelEnum ? '.PhoneType' : '',
- // optional string name = 3 [default = "$"];
- new FieldDescriptorProto()
- ..name = 'name'
- ..number = 3
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_STRING
- ..defaultValue = r'$'
- ]));
- }
-
- return fd;
-}
-
-void main() {
- test('FileGenerator outputs a .pb.dart file for a proto with one message',
- () {
- FileDescriptorProto fd = buildFileDescriptor();
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
- expectMatchesGoldenFile(
- fg.generateMainFile(), 'test/goldens/oneMessage.pb');
- });
-
- test('FileGenerator outputs a pbjson.dart file for a proto with one message',
- () {
- FileDescriptorProto fd = buildFileDescriptor();
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
- expectMatchesGoldenFile(
- fg.generateJsonFile(), 'test/goldens/oneMessage.pbjson');
- });
-
- test('FileGenerator generates files for a top-level enum', () {
- FileDescriptorProto fd =
- buildFileDescriptor(phoneNumber: false, topLevelEnum: true);
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
- expectMatchesGoldenFile(
- fg.generateMainFile(), 'test/goldens/topLevelEnum.pb');
- expectMatchesGoldenFile(
- fg.generateEnumFile(), 'test/goldens/topLevelEnum.pbenum');
- });
-
- test('FileGenerator generates a .pbjson.dart file for a top-level enum', () {
- FileDescriptorProto fd =
- buildFileDescriptor(phoneNumber: false, topLevelEnum: true);
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
- expectMatchesGoldenFile(
- fg.generateJsonFile(), 'test/goldens/topLevelEnum.pbjson');
- });
-
- test('FileGenerator outputs library for a .proto in a package', () {
- FileDescriptorProto fd = buildFileDescriptor();
- fd.package = "pb_library";
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
-
- var writer = new IndentingWriter();
- fg.writeMainHeader(writer);
- expectMatchesGoldenFile(
- writer.toString(), 'test/goldens/header_in_package.pb');
- });
-
- test('FileGenerator outputs a fixnum import when needed', () {
- FileDescriptorProto fd = new FileDescriptorProto()
- ..name = 'test'
- ..messageType.add(new DescriptorProto()
- ..name = 'Count'
- ..field.addAll([
- new FieldDescriptorProto()
- ..name = 'count'
- ..number = 1
- ..type = FieldDescriptorProto_Type.TYPE_INT64
- ]));
-
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
-
- var writer = new IndentingWriter();
- fg.writeMainHeader(writer);
- expectMatchesGoldenFile(
- writer.toString(), 'test/goldens/header_with_fixnum.pb');
- });
-
- test('FileGenerator outputs files for a service', () {
- DescriptorProto empty = new DescriptorProto()..name = "Empty";
-
- ServiceDescriptorProto sd = new ServiceDescriptorProto()
- ..name = 'Test'
- ..method.add(new MethodDescriptorProto()
- ..name = 'Ping'
- ..inputType = '.Empty'
- ..outputType = '.Empty');
-
- FileDescriptorProto fd = new FileDescriptorProto()
- ..name = 'test'
- ..messageType.add(empty)
- ..service.add(sd);
-
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
-
- var writer = new IndentingWriter();
- fg.writeMainHeader(writer);
- expectMatchesGoldenFile(fg.generateMainFile(), 'test/goldens/service.pb');
- expectMatchesGoldenFile(
- fg.generateServerFile(), 'test/goldens/service.pbserver');
- });
-
- test('FileGenerator does not output legacy service stubs if gRPC is selected',
- () {
- DescriptorProto empty = new DescriptorProto()..name = "Empty";
-
- ServiceDescriptorProto sd = new ServiceDescriptorProto()
- ..name = 'Test'
- ..method.add(new MethodDescriptorProto()
- ..name = 'Ping'
- ..inputType = '.Empty'
- ..outputType = '.Empty');
-
- FileDescriptorProto fd = new FileDescriptorProto()
- ..name = 'test'
- ..messageType.add(empty)
- ..service.add(sd);
-
- var options = new GenerationOptions(useGrpc: true);
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
-
- var writer = new IndentingWriter();
- fg.writeMainHeader(writer);
- expectMatchesGoldenFile(
- fg.generateMainFile(), 'test/goldens/grpc_service.pb');
- });
-
- test('FileGenerator outputs gRPC stubs if gRPC is selected', () {
- final input = new DescriptorProto()..name = 'Input';
- final output = new DescriptorProto()..name = 'Output';
-
- final unary = new MethodDescriptorProto()
- ..name = 'Unary'
- ..inputType = '.Input'
- ..outputType = '.Output'
- ..clientStreaming = false
- ..serverStreaming = false;
- final clientStreaming = new MethodDescriptorProto()
- ..name = 'ClientStreaming'
- ..inputType = '.Input'
- ..outputType = '.Output'
- ..clientStreaming = true
- ..serverStreaming = false;
- final serverStreaming = new MethodDescriptorProto()
- ..name = 'ServerStreaming'
- ..inputType = '.Input'
- ..outputType = '.Output'
- ..clientStreaming = false
- ..serverStreaming = true;
- final bidirectional = new MethodDescriptorProto()
- ..name = 'Bidirectional'
- ..inputType = '.Input'
- ..outputType = '.Output'
- ..clientStreaming = true
- ..serverStreaming = true;
-
- ServiceDescriptorProto sd = new ServiceDescriptorProto()
- ..name = 'Test'
- ..method.addAll([unary, clientStreaming, serverStreaming, bidirectional]);
-
- FileDescriptorProto fd = new FileDescriptorProto()
- ..name = 'test'
- ..messageType.addAll([input, output])
- ..service.add(sd);
-
- var options = new GenerationOptions(useGrpc: true);
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options, [fg]);
-
- var writer = new IndentingWriter();
- fg.writeMainHeader(writer);
- expectMatchesGoldenFile(
- fg.generateGrpcFile(), 'test/goldens/grpc_service.pbgrpc');
- });
-
- test('FileGenerator generates imports for .pb.dart files', () {
- // This defines three .proto files package1.proto, package2.proto and
- // test.proto with the following content:
- //
- // package1.proto:
- // ---------------
- // package p1;
- // message M {
- // optional M m = 2;
- // }
- //
- // package2.proto:
- // ---------------
- // package p2;
- // message M {
- // optional M m = 2;
- // }
- //
- // test.proto:
- // ---------------
- // package test;
- // import "package1.proto";
- // import "package2.proto";
- // message M {
- // optional M m = 1;
- // optional p1.M m1 = 2;
- // optional p2.M m2 = 3;
- // }
-
- // Description of package1.proto.
- DescriptorProto md1 = new DescriptorProto()
- ..name = 'M'
- ..field.addAll([
- // optional M m = 1;
- new FieldDescriptorProto()
- ..name = 'm'
- ..number = 1
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_MESSAGE
- ..typeName = ".p1.M",
- ]);
- FileDescriptorProto fd1 = new FileDescriptorProto()
- ..package = 'p1'
- ..name = 'package1.proto'
- ..messageType.add(md1);
-
- // Description of package1.proto.
- DescriptorProto md2 = new DescriptorProto()
- ..name = 'M'
- ..field.addAll([
- // optional M m = 1;
- new FieldDescriptorProto()
- ..name = 'x'
- ..number = 1
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_MESSAGE
- ..typeName = ".p2.M",
- ]);
- FileDescriptorProto fd2 = new FileDescriptorProto()
- ..package = 'p2'
- ..name = 'package2.proto'
- ..messageType.add(md2);
-
- // Description of test.proto.
- DescriptorProto md = new DescriptorProto()
- ..name = 'M'
- ..field.addAll([
- // optional M m = 1;
- new FieldDescriptorProto()
- ..name = 'm'
- ..number = 1
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_MESSAGE
- ..typeName = ".M",
- // optional p1.M m1 = 2;
- new FieldDescriptorProto()
- ..name = 'm1'
- ..number = 2
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_MESSAGE
- ..typeName = ".p1.M",
- // optional p2.M m2 = 3;
- new FieldDescriptorProto()
- ..name = 'm2'
- ..number = 3
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_MESSAGE
- ..typeName = ".p2.M",
- ]);
- FileDescriptorProto fd = new FileDescriptorProto()
- ..name = 'test.proto'
- ..messageType.add(md);
- fd.dependency.addAll(['package1.proto', 'package2.proto']);
- var request = new CodeGeneratorRequest();
- var response = new CodeGeneratorResponse();
- var options = parseGenerationOptions(request, response);
-
- FileGenerator fg = new FileGenerator(fd, options);
- link(options,
- [fg, new FileGenerator(fd1, options), new FileGenerator(fd2, options)]);
- expectMatchesGoldenFile(fg.generateMainFile(), 'test/goldens/imports.pb');
- expectMatchesGoldenFile(
- fg.generateEnumFile(), 'test/goldens/imports.pbjson');
- });
-}
diff --git a/test/generated_message_test.dart b/test/generated_message_test.dart
deleted file mode 100755
index 809797c..0000000
--- a/test/generated_message_test.dart
+++ /dev/null
@@ -1,721 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library generated_message_test;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-import '../out/protos/google/protobuf/unittest_import.pb.dart';
-import '../out/protos/google/protobuf/unittest_optimize_for.pb.dart';
-import '../out/protos/multiple_files_test.pb.dart';
-import '../out/protos/reserved_names.pb.dart';
-import '../out/protos/duplicate_names_import.pb.dart';
-import '../out/protos/package1.pb.dart' as p1;
-import '../out/protos/package2.pb.dart' as p2;
-import '../out/protos/package3.pb.dart' as p3;
-import '../out/protos/toplevel_import.pb.dart' as t;
-import '../out/protos/toplevel.pb.dart';
-
-import 'test_util.dart';
-
-void main() {
- final throwsInvalidProtocolBufferException =
- throwsA(new TypeMatcher<InvalidProtocolBufferException>());
- test('testProtosShareRepeatedArraysIfDidntChange', () {
- TestAllTypes value1 = new TestAllTypes()
- ..repeatedInt32.add(100)
- ..repeatedImportEnum.add(ImportEnum.IMPORT_BAR)
- ..repeatedForeignMessage.add(new ForeignMessage());
-
- TestAllTypes value2 = value1.clone();
-
- expect(value2.repeatedInt32, value1.repeatedInt32);
- expect(value2.repeatedImportEnum, value1.repeatedImportEnum);
- expect(value2.repeatedForeignMessage, value1.repeatedForeignMessage);
- });
-
- test('testSettersRejectNull', () {
- TestAllTypes message = new TestAllTypes();
- expect(() {
- message.optionalString = null;
- }, throwsArgumentError);
- expect(() {
- message.optionalBytes = null;
- }, throwsArgumentError);
- expect(() {
- message.optionalNestedMessage = null;
- }, throwsArgumentError);
- expect(() {
- message.optionalNestedMessage = null;
- }, throwsArgumentError);
- expect(() {
- message.optionalNestedEnum = null;
- }, throwsArgumentError);
- expect(() {
- message.repeatedString.add(null);
- }, throwsArgumentError);
- expect(() {
- message.repeatedBytes.add(null);
- }, throwsArgumentError);
- expect(() {
- message.repeatedNestedMessage.add(null);
- }, throwsArgumentError);
- expect(() {
- message.repeatedNestedMessage.add(null);
- }, throwsArgumentError);
- expect(() {
- message.repeatedNestedEnum.add(null);
- }, throwsArgumentError);
- });
-
- test('testDefaultMessageIsReadOnly', () {
- var message = new TestAllTypes();
- expect(message.optionalNestedMessage,
- same(TestAllTypes_NestedMessage.getDefault()));
- expect(() {
- message.optionalNestedMessage.bb = 123;
- }, throwsUnsupportedError);
-
- message = TestAllTypes.getDefault();
- expect(() {
- message.clear();
- }, throwsUnsupportedError);
- expect(() {
- message.optionalString = "123";
- }, throwsUnsupportedError);
- expect(() {
- message.clearOptionalString();
- }, throwsUnsupportedError);
- expect(() {
- message.repeatedString.add("123");
- }, throwsUnsupportedError);
- expect(() {
- message.repeatedString.clear();
- }, throwsUnsupportedError);
- expect(() {
- message.unknownFields.clear();
- }, throwsUnsupportedError);
- });
-
- test('testRepeatedSetters', () {
- TestAllTypes message = getAllSet();
- modifyRepeatedFields(message);
- assertRepeatedFieldsModified(message);
- });
-
- test('testRepeatedSettersRejectNull', () {
- TestAllTypes message = new TestAllTypes();
-
- message.repeatedString.addAll(['one', 'two']);
- expect(() {
- message.repeatedString[1] = null;
- }, throwsArgumentError);
-
- message.repeatedBytes.addAll(['one'.codeUnits, 'two'.codeUnits]);
- expect(() {
- message.repeatedBytes[1] = null;
- }, throwsArgumentError);
-
- message.repeatedNestedMessage.addAll([
- new TestAllTypes_NestedMessage()..bb = 318,
- new TestAllTypes_NestedMessage()..bb = 456
- ]);
- expect(() {
- message.repeatedNestedMessage[1] = null;
- }, throwsArgumentError);
-
- message.repeatedNestedEnum
- .addAll([TestAllTypes_NestedEnum.FOO, TestAllTypes_NestedEnum.BAR]);
- expect(() {
- message.repeatedNestedEnum[1] = null;
- }, throwsArgumentError);
- });
-
- test('testRepeatedAppend', () {
- TestAllTypes message = new TestAllTypes()
- ..repeatedInt32.addAll([1, 2, 3, 4])
- ..repeatedForeignEnum.addAll([ForeignEnum.FOREIGN_BAZ])
- ..repeatedForeignMessage.addAll([new ForeignMessage()..c = 12]);
-
- expect(message.repeatedInt32, [1, 2, 3, 4]);
- expect(message.repeatedForeignEnum, [ForeignEnum.FOREIGN_BAZ]);
- expect(message.repeatedForeignMessage.length, 1);
- expect(message.repeatedForeignMessage[0].c, 12);
- });
-
- test('testRepeatedAppendRejectsNull', () {
- TestAllTypes message = new TestAllTypes();
-
- expect(() {
- message.repeatedForeignMessage
- .addAll([new ForeignMessage()..c = 12, null]);
- }, throwsArgumentError);
-
- expect(() {
- message.repeatedForeignEnum.addAll([ForeignEnum.FOREIGN_BAZ, null]);
- }, throwsArgumentError);
-
- expect(() {
- message.repeatedString.addAll(['one', null]);
- }, throwsArgumentError);
-
- expect(() {
- message.repeatedBytes.addAll(['one'.codeUnits, null]);
- }, throwsArgumentError);
- });
-
- test('testSettingForeignMessage', () {
- TestAllTypes message = new TestAllTypes()
- ..optionalForeignMessage = (new ForeignMessage()..c = 123);
-
- TestAllTypes expectedMessage = new TestAllTypes()
- ..optionalForeignMessage = (new ForeignMessage()..c = 123);
-
- expect(message, expectedMessage);
- });
-
- test('testSettingRepeatedForeignMessage', () {
- TestAllTypes message = new TestAllTypes()
- ..repeatedForeignMessage.add(new ForeignMessage()..c = 456);
-
- TestAllTypes expectedMessage = new TestAllTypes()
- ..repeatedForeignMessage.add(new ForeignMessage()..c = 456);
-
- expect(message, expectedMessage);
- });
-
- test('testDefaults', () {
- assertClear(new TestAllTypes());
-
- TestExtremeDefaultValues message = new TestExtremeDefaultValues();
-
- expect(message.utf8String, '\u1234');
- expect(message.infDouble, same(double.infinity));
- expect(message.negInfDouble, same(double.negativeInfinity));
- expect(message.nanDouble, same(double.nan));
- expect(message.infFloat, same(double.infinity));
- expect(message.negInfFloat, same(double.negativeInfinity));
- expect(message.nanFloat, same(double.nan));
- expect(message.cppTrigraph, '? ? ?? ?? ??? ??/ ??-');
- expect(message.smallInt64.toRadixString(16).toUpperCase(),
- '-7FFFFFFFFFFFFFFF');
- });
-
- test('testClear', () {
- TestAllTypes message = new TestAllTypes();
-
- assertClear(message);
- setAllFields(message);
- message.clear();
- assertClear(message);
- });
-
- // void testReflectionGetters() {} // UNSUPPORTED -- until reflection
- // void testReflectionSetters() {} // UNSUPPORTED -- until reflection
- // void testReflectionSettersRejectNull() {} // UNSUPPORTED - reflection
- // void testReflectionRepeatedSetters() {} // UNSUPPORTED -- reflection
- // void testReflectionRepeatedSettersRejectNull() {} // UNSUPPORTED
- // void testReflectionDefaults() {} // UNSUPPORTED -- until reflection
-
- test('testEnumInterface', () {
- expect(
- new TestAllTypes().defaultNestedEnum, new TypeMatcher<ProtobufEnum>());
- });
-
- test('testEnumMap', () {
- for (ForeignEnum value in ForeignEnum.values) {
- expect(ForeignEnum.valueOf(value.value), value);
- }
- expect(ForeignEnum.valueOf(12345), isNull);
- });
-
- test('testParsePackedToUnpacked', () {
- TestUnpackedTypes message =
- new TestUnpackedTypes.fromBuffer(getPackedSet().writeToBuffer());
- assertUnpackedFieldsSet(message);
- });
-
- test('testParseUnpackedToPacked', () {
- TestPackedTypes message =
- new TestPackedTypes.fromBuffer(getUnpackedSet().writeToBuffer());
- assertPackedFieldsSet(message);
- });
-
- test('testIgnoreJavaMultipleFilesOption', () {
- // UNSUPPORTED getFile
- // We mostly just want to check that things compile.
- MessageWithNoOuter message = new MessageWithNoOuter()
- ..nested = (new MessageWithNoOuter_NestedMessage()..i = 1)
- ..foreign.add(new TestAllTypes()..optionalInt32 = 1)
- ..nestedEnum = MessageWithNoOuter_NestedEnum.BAZ
- ..foreignEnum = EnumWithNoOuter.BAR;
-
- expect(new MessageWithNoOuter.fromBuffer(message.writeToBuffer()), message);
-
- // Not currently supported in Dart protobuf.
- // expect(MessageWithNoOuter.getDescriptor().getFile(),
- // MultipleFilesTestProto.getDescriptor());
-
- int tagNumber = message.getTagNumber('foreignEnum');
- expect(tagNumber, isNotNull);
- expect(message.getField(tagNumber), EnumWithNoOuter.BAR);
-
- // Not currently supported in Dart protobuf.
- // expect(ServiceWithNoOuter.getDescriptor().getFile()
- // MultipleFilesTestProto.getDescriptor());
-
- expect(
- new TestAllExtensions()
- .hasExtension(Multiple_files_test.extensionWithOuter),
- isFalse);
- });
-
- test('testOptionalFieldWithRequiredSubfieldsOptimizedForSize', () {
- expect(new TestOptionalOptimizedForSize().isInitialized(), isTrue);
-
- expect(
- (new TestOptionalOptimizedForSize()
- ..o = new TestRequiredOptimizedForSize())
- .isInitialized(),
- isFalse);
-
- expect(
- (new TestOptionalOptimizedForSize()
- ..o = (new TestRequiredOptimizedForSize()..x = 5))
- .isInitialized(),
- isTrue);
- });
-
- test('testSetAllFieldsAndClone', () {
- TestAllTypes message = getAllSet();
- assertAllFieldsSet(message);
- assertAllFieldsSet(message.clone());
- });
-
- test('testReadWholeMessage', () {
- TestAllTypes message = getAllSet();
- List<int> rawBytes = message.writeToBuffer();
- assertAllFieldsSet(new TestAllTypes.fromBuffer(rawBytes));
- });
-
- test('testReadHugeBlob', () {
- // Allocate and initialize a 1MB blob.
- List<int> blob = new List<int>(1 << 20);
- for (int i = 0; i < blob.length; i++) {
- blob[i] = i % 256;
- }
-
- // Make a message containing it.
- TestAllTypes message = getAllSet();
- message.optionalBytes = blob;
-
- TestAllTypes message2 =
- new TestAllTypes.fromBuffer(message.writeToBuffer());
- expect(message2.optionalBytes, message.optionalBytes);
- });
-
- test('testRecursiveMessageDefaultInstance', () {
- TestRecursiveMessage message = new TestRecursiveMessage();
- expect(message.a, isNotNull);
- expect(message, message.a);
- });
-
- test('testMaliciousRecursion', () {
- GeneratedMessage _makeRecursiveMessage(int depth) {
- return depth == 0
- ? (new TestRecursiveMessage()..i = 5)
- : (new TestRecursiveMessage()..a = _makeRecursiveMessage(depth - 1));
- }
-
- _assertMessageDepth(TestRecursiveMessage message, int depth) {
- if (depth == 0) {
- expect(message.hasA(), isFalse);
- expect(message.i, 5);
- } else {
- expect(message.hasA(), isTrue);
- _assertMessageDepth(message.a, depth - 1);
- }
- }
-
- List<int> data64 = _makeRecursiveMessage(64).writeToBuffer();
- List<int> data65 = _makeRecursiveMessage(65).writeToBuffer();
-
- _assertMessageDepth(new TestRecursiveMessage.fromBuffer(data64), 64);
-
- expect(() {
- new TestRecursiveMessage.fromBuffer(data65);
- }, throwsInvalidProtocolBufferException);
-
- CodedBufferReader input = new CodedBufferReader(data64, recursionLimit: 8);
- expect(() {
- // Uncomfortable alternative to below...
- new TestRecursiveMessage().mergeFromCodedBufferReader(input);
- }, throwsInvalidProtocolBufferException);
- });
-
- test('testSizeLimit', () {
- CodedBufferReader input =
- new CodedBufferReader(getAllSet().writeToBuffer(), sizeLimit: 16);
-
- expect(() {
- // Uncomfortable alternative to below...
- new TestAllTypes().mergeFromCodedBufferReader(input);
- }, throwsInvalidProtocolBufferException);
- });
- test('testSerialize', () {
- TestAllTypes expected = getAllSet();
- List<int> out = expected.writeToBuffer();
- TestAllTypes actual = new TestAllTypes.fromBuffer(out);
- expect(actual, expected);
- });
-
- test('testEnumValues', () {
- expect(TestAllTypes_NestedEnum.values, [
- TestAllTypes_NestedEnum.FOO,
- TestAllTypes_NestedEnum.BAR,
- TestAllTypes_NestedEnum.BAZ
- ]);
- expect(TestAllTypes_NestedEnum.FOO.value, 1);
- expect(TestAllTypes_NestedEnum.BAR.value, 2);
- expect(TestAllTypes_NestedEnum.BAZ.value, 3);
- });
-
- test('testWriteWholeMessage', () {
- List<int> goldenMessage = const <int>[
- // no dartfmt
- 0x08, 0x65, 0x10, 0x66, 0x18, 0x67, 0x20, 0x68, 0x28, 0xd2, 0x01, 0x30,
- 0xd4, 0x01, 0x3d, 0x6b, 0x00, 0x00, 0x00, 0x41, 0x6c, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x4d, 0x6d, 0x00, 0x00, 0x00, 0x51, 0x6e, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0xde, 0x42, 0x61,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x40, 0x68, 0x01, 0x72, 0x03,
- 0x31, 0x31, 0x35, 0x7a, 0x03, 0x31, 0x31, 0x36, 0x83, 0x01, 0x88, 0x01,
- 0x75, 0x84, 0x01, 0x92, 0x01, 0x02, 0x08, 0x76, 0x9a, 0x01, 0x02, 0x08,
- 0x77, 0xa2, 0x01, 0x02, 0x08, 0x78, 0xa8, 0x01, 0x03, 0xb0, 0x01, 0x06,
- 0xb8, 0x01, 0x09, 0xc2, 0x01, 0x03, 0x31, 0x32, 0x34, 0xca, 0x01, 0x03,
- 0x31, 0x32, 0x35, 0xf8, 0x01, 0xc9, 0x01, 0xf8, 0x01, 0xad, 0x02, 0x80,
- 0x02, 0xca, 0x01, 0x80, 0x02, 0xae, 0x02, 0x88, 0x02, 0xcb, 0x01, 0x88,
- 0x02, 0xaf, 0x02, 0x90, 0x02, 0xcc, 0x01, 0x90, 0x02, 0xb0, 0x02, 0x98,
- 0x02, 0x9a, 0x03, 0x98, 0x02, 0xe2, 0x04, 0xa0, 0x02, 0x9c, 0x03, 0xa0,
- 0x02, 0xe4, 0x04, 0xad, 0x02, 0xcf, 0x00, 0x00, 0x00, 0xad, 0x02, 0x33,
- 0x01, 0x00, 0x00, 0xb1, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xb1, 0x02, 0x34, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd,
- 0x02, 0xd1, 0x00, 0x00, 0x00, 0xbd, 0x02, 0x35, 0x01, 0x00, 0x00, 0xc1,
- 0x02, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x02, 0x36,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x02, 0x00, 0x00, 0x53,
- 0x43, 0xcd, 0x02, 0x00, 0x80, 0x9b, 0x43, 0xd1, 0x02, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x6a, 0x40, 0xd1, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x73, 0x40, 0xd8, 0x02, 0x01, 0xd8, 0x02, 0x00, 0xe2, 0x02, 0x03,
- 0x32, 0x31, 0x35, 0xe2, 0x02, 0x03, 0x33, 0x31, 0x35, 0xea, 0x02, 0x03,
- 0x32, 0x31, 0x36, 0xea, 0x02, 0x03, 0x33, 0x31, 0x36, 0xf3, 0x02, 0xf8,
- 0x02, 0xd9, 0x01, 0xf4, 0x02, 0xf3, 0x02, 0xf8, 0x02, 0xbd, 0x02, 0xf4,
- 0x02, 0x82, 0x03, 0x03, 0x08, 0xda, 0x01, 0x82, 0x03, 0x03, 0x08, 0xbe,
- 0x02, 0x8a, 0x03, 0x03, 0x08, 0xdb, 0x01, 0x8a, 0x03, 0x03, 0x08, 0xbf,
- 0x02, 0x92, 0x03, 0x03, 0x08, 0xdc, 0x01, 0x92, 0x03, 0x03, 0x08, 0xc0,
- 0x02, 0x98, 0x03, 0x02, 0x98, 0x03, 0x03, 0xa0, 0x03, 0x05, 0xa0, 0x03,
- 0x06, 0xa8, 0x03, 0x08, 0xa8, 0x03, 0x09, 0xb2, 0x03, 0x03, 0x32, 0x32,
- 0x34, 0xb2, 0x03, 0x03, 0x33, 0x32, 0x34, 0xba, 0x03, 0x03, 0x32, 0x32,
- 0x35, 0xba, 0x03, 0x03, 0x33, 0x32, 0x35, 0xe8, 0x03, 0x91, 0x03, 0xf0,
- 0x03, 0x92, 0x03, 0xf8, 0x03, 0x93, 0x03, 0x80, 0x04, 0x94, 0x03, 0x88,
- 0x04, 0xaa, 0x06, 0x90, 0x04, 0xac, 0x06, 0x9d, 0x04, 0x97, 0x01, 0x00,
- 0x00, 0xa1, 0x04, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad,
- 0x04, 0x99, 0x01, 0x00, 0x00, 0xb1, 0x04, 0x9a, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xbd, 0x04, 0x00, 0x80, 0xcd, 0x43, 0xc1, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xc0, 0x79, 0x40, 0xc8, 0x04, 0x00, 0xd2, 0x04,
- 0x03, 0x34, 0x31, 0x35, 0xda, 0x04, 0x03, 0x34, 0x31, 0x36, 0x88, 0x05,
- 0x01, 0x90, 0x05, 0x04, 0x98, 0x05, 0x07, 0xa2, 0x05, 0x03, 0x34, 0x32,
- 0x34, 0xaa, 0x05, 0x03, 0x34, 0x32, 0x35
- ];
- expect(getAllSet().writeToBuffer(), goldenMessage);
- });
-
- test('testWriteWholePackedFieldsMessage', () {
- List<int> goldenPackedMessage = const <int>[
- // no dartfmt
- 0xd2, 0x05, 0x04, 0xd9, 0x04, 0xbd, 0x05, 0xda, 0x05, 0x04, 0xda, 0x04,
- 0xbe, 0x05, 0xe2, 0x05, 0x04, 0xdb, 0x04, 0xbf, 0x05, 0xea, 0x05, 0x04,
- 0xdc, 0x04, 0xc0, 0x05, 0xf2, 0x05, 0x04, 0xba, 0x09, 0x82, 0x0b, 0xfa,
- 0x05, 0x04, 0xbc, 0x09, 0x84, 0x0b, 0x82, 0x06, 0x08, 0x5f, 0x02, 0x00,
- 0x00, 0xc3, 0x02, 0x00, 0x00, 0x8a, 0x06, 0x10, 0x60, 0x02, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xc4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x92, 0x06, 0x08, 0x61, 0x02, 0x00, 0x00, 0xc5, 0x02, 0x00, 0x00, 0x9a,
- 0x06, 0x10, 0x62, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x02,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x08, 0x00, 0xc0, 0x18,
- 0x44, 0x00, 0xc0, 0x31, 0x44, 0xaa, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x83, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x86, 0x40,
- 0xb2, 0x06, 0x02, 0x01, 0x00, 0xba, 0x06, 0x02, 0x05, 0x06
- ];
- expect(getPackedSet().writeToBuffer(), goldenPackedMessage);
- });
-
- test('testWriteMessageWithNegativeEnumValue', () {
- SparseEnumMessage message = new SparseEnumMessage()
- ..sparseEnum = TestSparseEnum.SPARSE_E;
- expect(message.sparseEnum.value < 0, isTrue,
- reason: 'enum.value should be -53452');
- SparseEnumMessage message2 =
- new SparseEnumMessage.fromBuffer(message.writeToBuffer());
- expect(message2.sparseEnum, TestSparseEnum.SPARSE_E,
- reason: 'should resolve back to SPARSE_E');
- });
-
- test('testReservedNamesOptional', () {
- ReservedNamesOptional message = new ReservedNamesOptional();
- message.hashCode_1 = 1;
- expect(message.hashCode_1, 1);
- expect(message.hasHashCode_1(), isTrue);
- message.clearHashCode_1();
-
- message.noSuchMethod_2 = 1;
- message.runtimeType_3 = 1;
- message.toString_4 = 1;
- message.fromBuffer_10 = 1;
- message.fromJson_11 = 1;
- message.hasRequiredFields_12 = 1;
- message.isInitialized_13 = 1;
- message.clear_14 = 1;
- message.getTagNumber_15 = 1;
- message.check_16 = 1;
- message.writeToBuffer_17 = 1;
- message.writeToCodedBufferWriter_18 = 1;
- message.mergeFromCodedBufferReader_19 = 1;
- message.mergeFromBuffer_20 = 1;
- message.writeToJson_21 = 1;
- message.mergeFromJson_22 = 1;
- message.addExtension_23 = 1;
- message.getExtension_24 = 1;
- message.setExtension_25 = 1;
- message.hasExtension_26 = 1;
- message.clearExtension_27 = 1;
- message.getField_28 = 1;
- message.setField_29 = 1;
- message.hasField_30 = 1;
- message.clearField_31 = 1;
- message.extensionsAreInitialized_32 = 1;
- message.mergeFromMessage_33 = 1;
- message.mergeUnknownFields_34 = 1;
- message.hashCode1 = 1;
- message.x = 1;
- message.hasX_51 = 1;
- message.clearX_53 = 1;
- message.hasX51 = 1;
- message.clearX53 = 1;
- });
-
- test('testReservedNamesRepeated', () {
- ReservedNamesRepeated message = new ReservedNamesRepeated();
- message.hashCode_1.clear();
- message.noSuchMethod_2.clear();
- message.runtimeType_3.clear();
- message.toString_4.clear();
- message.fromBuffer_10.clear();
- message.fromJson_11.clear();
- message.hasRequiredFields_12.clear();
- message.isInitialized_13.clear();
- message.clear_14.clear();
- message.getTagNumber_15.clear();
- message.check_16.clear();
- message.writeToBuffer_17.clear();
- message.writeToCodedBufferWriter_18.clear();
- message.mergeFromCodedBufferReader_19.clear();
- message.mergeFromBuffer_20.clear();
- message.writeToJson_21.clear();
- message.mergeFromJson_22.clear();
- message.addExtension_23.clear();
- message.getExtension_24.clear();
- message.setExtension_25.clear();
- message.hasExtension_26.clear();
- message.clearExtension_27.clear();
- message.getField_28.clear();
- message.setField_29.clear();
- message.hasField_30.clear();
- message.clearField_31.clear();
- message.extensionsAreInitialized_32.clear();
- message.mergeFromMessage_33.clear();
- message.mergeUnknownFields_34.clear();
- message.hashCode1.clear();
- message.x.clear();
- message.hasX.clear();
- message.clearX.clear();
- message.hasX51.clear();
- message.clearX53.clear();
- });
-
- test('testReservedNamesRequired', () {
- ReservedNamesRequired message = new ReservedNamesRequired();
- message.hashCode_1 = 1;
- expect(message.hashCode_1, 1);
- expect(message.hasHashCode_1(), isTrue);
- message.clearHashCode_1();
-
- message.noSuchMethod_2 = 1;
- message.runtimeType_3 = 1;
- message.toString_4 = 1;
- message.fromBuffer_10 = 1;
- message.fromJson_11 = 1;
- message.hasRequiredFields_12 = 1;
- message.isInitialized_13 = 1;
- message.clear_14 = 1;
- message.getTagNumber_15 = 1;
- message.check_16 = 1;
- message.writeToBuffer_17 = 1;
- message.writeToCodedBufferWriter_18 = 1;
- message.mergeFromCodedBufferReader_19 = 1;
- message.mergeFromBuffer_20 = 1;
- message.writeToJson_21 = 1;
- message.mergeFromJson_22 = 1;
- message.addExtension_23 = 1;
- message.getExtension_24 = 1;
- message.setExtension_25 = 1;
- message.hasExtension_26 = 1;
- message.clearExtension_27 = 1;
- message.getField_28 = 1;
- message.setField_29 = 1;
- message.hasField_30 = 1;
- message.clearField_31 = 1;
- message.extensionsAreInitialized_32 = 1;
- message.mergeFromMessage_33 = 1;
- message.mergeUnknownFields_34 = 1;
- message.hashCode1 = 1;
- message.x = 1;
- message.hasX_51 = 1;
- message.clearX_53 = 1;
- message.hasX51 = 1;
- message.clearX53 = 1;
- });
-
- test('testReservedWordsOptional', () {
- ReservedWordsOptional message = new ReservedWordsOptional();
- message.assert_1 = 1;
- message.break_2 = 1;
- message.case_3 = 1;
- message.catch_4 = 1;
- message.class_5 = 1;
- message.const_6 = 1;
- message.continue_7 = 1;
- message.default_8 = 1;
- message.do_9 = 1;
- message.else_10 = 1;
- message.enum_11 = 1;
- message.extends_12 = 1;
- message.false_13 = 1;
- message.final_14 = 1;
- message.finally_15 = 1;
- message.for_16 = 1;
- message.if_17 = 1;
- message.in_18 = 1;
- message.is_19 = 1;
- message.new_20 = 1;
- message.null_21 = 1;
- message.rethrow_22 = 1;
- message.return_23 = 1;
- message.super_24 = 1;
- message.switch_25 = 1;
- message.this_26 = 1;
- message.throw_27 = 1;
- message.true_28 = 1;
- message.try_29 = 1;
- message.var_30 = 1;
- message.void_31 = 1;
- message.while_32 = 1;
- message.with_33 = 1;
- });
-
- test('testReservedWordsRepeated', () {
- ReservedWordsRepeated message = new ReservedWordsRepeated();
- message.assert_1.clear();
- message.break_2.clear();
- message.case_3.clear();
- message.catch_4.clear();
- message.class_5.clear();
- message.const_6.clear();
- message.continue_7.clear();
- message.default_8.clear();
- message.do_9.clear();
- message.else_10.clear();
- message.enum_11.clear();
- message.extends_12.clear();
- message.false_13.clear();
- message.final_14.clear();
- message.finally_15.clear();
- message.for_16.clear();
- message.if_17.clear();
- message.in_18.clear();
- message.is_19.clear();
- message.new_20.clear();
- message.null_21.clear();
- message.rethrow_22.clear();
- message.return_23.clear();
- message.super_24.clear();
- message.switch_25.clear();
- message.this_26.clear();
- message.throw_27.clear();
- message.true_28.clear();
- message.try_29.clear();
- message.var_30.clear();
- message.void_31.clear();
- message.while_32.clear();
- message.with_33.clear();
- });
-
- test('testReservedWordsRequired', () {
- ReservedWordsRequired message = new ReservedWordsRequired();
- message.assert_1 = 1;
- message.break_2 = 1;
- message.case_3 = 1;
- message.catch_4 = 1;
- message.class_5 = 1;
- message.const_6 = 1;
- message.continue_7 = 1;
- message.default_8 = 1;
- message.do_9 = 1;
- message.else_10 = 1;
- message.enum_11 = 1;
- message.extends_12 = 1;
- message.false_13 = 1;
- message.final_14 = 1;
- message.finally_15 = 1;
- message.for_16 = 1;
- message.if_17 = 1;
- message.in_18 = 1;
- message.is_19 = 1;
- message.new_20 = 1;
- message.null_21 = 1;
- message.rethrow_22 = 1;
- message.return_23 = 1;
- message.super_24 = 1;
- message.switch_25 = 1;
- message.this_26 = 1;
- message.throw_27 = 1;
- message.true_28 = 1;
- message.try_29 = 1;
- message.var_30 = 1;
- message.void_31 = 1;
- message.while_32 = 1;
- message.with_33 = 1;
- });
-
- test('testImportDuplicatenames', () {
- M message = new M();
- message.m1 = new p1.M();
- message.m1M = new p1.M_M();
- message.m2 = new p2.M();
- message.m2M = new p2.M_M();
- message.m3 = new p3.M();
- message.m3M = new p3.M_M();
- });
-
- test('testToplevel', () {
- t.M message = new t.M();
- message.t = new T();
- new t.SApi(null);
- });
-
- test('to toDebugString', () {
- TestAllTypes value1 = new TestAllTypes()..optionalString = "test 123";
- expect(value1.toString(), 'optionalString: test 123\n');
- });
-}
diff --git a/test/golden_file.dart b/test/golden_file.dart
deleted file mode 100644
index 0d936fa..0000000
--- a/test/golden_file.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-import 'package:test/test.dart';
-
-/// Will test [actual] against the contests of the file at [goldenFilePath].
-///
-/// If the file doesn't exist, the file is instead created containing [actual].
-void expectMatchesGoldenFile(String actual, String goldenFilePath) {
- File goldenFile = File(goldenFilePath);
- if (goldenFile.existsSync()) {
- expect(actual, equals(goldenFile.readAsStringSync()));
- } else {
- goldenFile
- ..createSync(recursive: true)
- ..writeAsStringSync(actual);
- }
-}
diff --git a/test/goldens/client b/test/goldens/client
deleted file mode 100644
index 45281fe..0000000
--- a/test/goldens/client
+++ /dev/null
@@ -1,14 +0,0 @@
-class TestApi {
- $pb.RpcClient _client;
- TestApi(this._client);
-
- $async.Future<SomeReply> aMethod($pb.ClientContext ctx, SomeRequest request) {
- var emptyResponse = new SomeReply();
- return _client.invoke<SomeReply>(ctx, 'Test', 'AMethod', request, emptyResponse);
- }
- $async.Future<$0.AnotherReply> anotherMethod($pb.ClientContext ctx, $0.EmptyMessage request) {
- var emptyResponse = new $0.AnotherReply();
- return _client.invoke<$0.AnotherReply>(ctx, 'Test', 'AnotherMethod', request, emptyResponse);
- }
-}
-
diff --git a/test/goldens/enum b/test/goldens/enum
deleted file mode 100644
index 40de719..0000000
--- a/test/goldens/enum
+++ /dev/null
@@ -1,22 +0,0 @@
-class PhoneType extends $pb.ProtobufEnum {
- static const PhoneType MOBILE = const PhoneType._(0, 'MOBILE');
- static const PhoneType HOME = const PhoneType._(1, 'HOME');
- static const PhoneType WORK = const PhoneType._(2, 'WORK');
-
- static const PhoneType BUSINESS = WORK;
-
- static const List<PhoneType> values = const <PhoneType> [
- MOBILE,
- HOME,
- WORK,
- ];
-
- static final Map<int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
- static PhoneType valueOf(int value) => _byValue[value];
- static void $checkItem(PhoneType v) {
- if (v is! PhoneType) $pb.checkItemFailed(v, 'PhoneType');
- }
-
- const PhoneType._(int v, String n) : super(v, n);
-}
-
diff --git a/test/goldens/grpc_service.pb b/test/goldens/grpc_service.pb
deleted file mode 100644
index 2515d87..0000000
--- a/test/goldens/grpc_service.pb
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class Empty extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('Empty')
- ..hasRequiredFields = false
- ;
-
- Empty() : super();
- Empty.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
- Empty.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
- Empty clone() => new Empty()..mergeFromMessage(this);
- Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty));
- $pb.BuilderInfo get info_ => _i;
- static Empty create() => new Empty();
- static $pb.PbList<Empty> createRepeated() => new $pb.PbList<Empty>();
- static Empty getDefault() => _defaultInstance ??= create()..freeze();
- static Empty _defaultInstance;
- static void $checkItem(Empty v) {
- if (v is! Empty) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-}
-
diff --git a/test/goldens/grpc_service.pbgrpc b/test/goldens/grpc_service.pbgrpc
deleted file mode 100644
index b167366..0000000
--- a/test/goldens/grpc_service.pbgrpc
+++ /dev/null
@@ -1,111 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-import 'dart:async' as $async;
-
-import 'package:grpc/grpc.dart';
-
-import 'test.pb.dart';
-export 'test.pb.dart';
-
-class TestClient extends Client {
- static final _$unary = new ClientMethod<Input, Output>(
- '/Test/Unary',
- (Input value) => value.writeToBuffer(),
- (List<int> value) => new Output.fromBuffer(value));
- static final _$clientStreaming = new ClientMethod<Input, Output>(
- '/Test/ClientStreaming',
- (Input value) => value.writeToBuffer(),
- (List<int> value) => new Output.fromBuffer(value));
- static final _$serverStreaming = new ClientMethod<Input, Output>(
- '/Test/ServerStreaming',
- (Input value) => value.writeToBuffer(),
- (List<int> value) => new Output.fromBuffer(value));
- static final _$bidirectional = new ClientMethod<Input, Output>(
- '/Test/Bidirectional',
- (Input value) => value.writeToBuffer(),
- (List<int> value) => new Output.fromBuffer(value));
-
- TestClient(ClientChannel channel, {CallOptions options})
- : super(channel, options: options);
-
- ResponseFuture<Output> unary(Input request, {CallOptions options}) {
- final call = $createCall(_$unary, new $async.Stream.fromIterable([request]),
- options: options);
- return new ResponseFuture(call);
- }
-
- ResponseFuture<Output> clientStreaming($async.Stream<Input> request,
- {CallOptions options}) {
- final call = $createCall(_$clientStreaming, request, options: options);
- return new ResponseFuture(call);
- }
-
- ResponseStream<Output> serverStreaming(Input request, {CallOptions options}) {
- final call = $createCall(
- _$serverStreaming, new $async.Stream.fromIterable([request]),
- options: options);
- return new ResponseStream(call);
- }
-
- ResponseStream<Output> bidirectional($async.Stream<Input> request,
- {CallOptions options}) {
- final call = $createCall(_$bidirectional, request, options: options);
- return new ResponseStream(call);
- }
-}
-
-abstract class TestServiceBase extends Service {
- String get $name => 'Test';
-
- TestServiceBase() {
- $addMethod(new ServiceMethod<Input, Output>(
- 'Unary',
- unary_Pre,
- false,
- false,
- (List<int> value) => new Input.fromBuffer(value),
- (Output value) => value.writeToBuffer()));
- $addMethod(new ServiceMethod<Input, Output>(
- 'ClientStreaming',
- clientStreaming,
- true,
- false,
- (List<int> value) => new Input.fromBuffer(value),
- (Output value) => value.writeToBuffer()));
- $addMethod(new ServiceMethod<Input, Output>(
- 'ServerStreaming',
- serverStreaming_Pre,
- false,
- true,
- (List<int> value) => new Input.fromBuffer(value),
- (Output value) => value.writeToBuffer()));
- $addMethod(new ServiceMethod<Input, Output>(
- 'Bidirectional',
- bidirectional,
- true,
- true,
- (List<int> value) => new Input.fromBuffer(value),
- (Output value) => value.writeToBuffer()));
- }
-
- $async.Future<Output> unary_Pre(
- ServiceCall call, $async.Future request) async {
- return unary(call, await request);
- }
-
- $async.Stream<Output> serverStreaming_Pre(
- ServiceCall call, $async.Future request) async* {
- yield* serverStreaming(call, (await request) as Input);
- }
-
- $async.Future<Output> unary(ServiceCall call, Input request);
- $async.Future<Output> clientStreaming(
- ServiceCall call, $async.Stream<Input> request);
- $async.Stream<Output> serverStreaming(ServiceCall call, Input request);
- $async.Stream<Output> bidirectional(
- ServiceCall call, $async.Stream<Input> request);
-}
diff --git a/test/goldens/header_in_package.pb b/test/goldens/header_in_package.pb
deleted file mode 100644
index 0399a53..0000000
--- a/test/goldens/header_in_package.pb
+++ /dev/null
@@ -1,11 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
diff --git a/test/goldens/header_with_fixnum.pb b/test/goldens/header_with_fixnum.pb
deleted file mode 100644
index 9df6c14..0000000
--- a/test/goldens/header_with_fixnum.pb
+++ /dev/null
@@ -1,12 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:fixnum/fixnum.dart';
-import 'package:protobuf/protobuf.dart' as $pb;
-
diff --git a/test/goldens/imports.pb b/test/goldens/imports.pb
deleted file mode 100644
index 2c384a9..0000000
--- a/test/goldens/imports.pb
+++ /dev/null
@@ -1,52 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-import 'package1.pb.dart' as $0;
-import 'package2.pb.dart' as $1;
-
-class M extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('M')
- ..a<M>(1, 'm', $pb.PbFieldType.OM, M.getDefault, M.create)
- ..a<$0.M>(2, 'm1', $pb.PbFieldType.OM, $0.M.getDefault, $0.M.create)
- ..a<$1.M>(3, 'm2', $pb.PbFieldType.OM, $1.M.getDefault, $1.M.create)
- ..hasRequiredFields = false
- ;
-
- M() : super();
- M.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
- M.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
- M clone() => new M()..mergeFromMessage(this);
- M copyWith(void Function(M) updates) => super.copyWith((message) => updates(message as M));
- $pb.BuilderInfo get info_ => _i;
- static M create() => new M();
- static $pb.PbList<M> createRepeated() => new $pb.PbList<M>();
- static M getDefault() => _defaultInstance ??= create()..freeze();
- static M _defaultInstance;
- static void $checkItem(M v) {
- if (v is! M) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- M get m => $_getN(0);
- set m(M v) { setField(1, v); }
- bool hasM() => $_has(0);
- void clearM() => clearField(1);
-
- $0.M get m1 => $_getN(1);
- set m1($0.M v) { setField(2, v); }
- bool hasM1() => $_has(1);
- void clearM1() => clearField(2);
-
- $1.M get m2 => $_getN(2);
- set m2($1.M v) { setField(3, v); }
- bool hasM2() => $_has(2);
- void clearM2() => clearField(3);
-}
-
diff --git a/test/goldens/imports.pbjson b/test/goldens/imports.pbjson
deleted file mode 100644
index 02eb3e2..0000000
--- a/test/goldens/imports.pbjson
+++ /dev/null
@@ -1,6 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
diff --git a/test/goldens/messageGenerator b/test/goldens/messageGenerator
deleted file mode 100644
index 1c4f0bc..0000000
--- a/test/goldens/messageGenerator
+++ /dev/null
@@ -1,37 +0,0 @@
-class PhoneNumber extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('PhoneNumber')
- ..aQS(1, 'number')
- ..e<PhoneNumber_PhoneType>(2, 'type', $pb.PbFieldType.OE, PhoneNumber_PhoneType.MOBILE, PhoneNumber_PhoneType.valueOf, PhoneNumber_PhoneType.values)
- ..a<String>(3, 'name', $pb.PbFieldType.OS, '\$')
- ;
-
- PhoneNumber() : super();
- PhoneNumber.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
- PhoneNumber.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
- PhoneNumber clone() => new PhoneNumber()..mergeFromMessage(this);
- PhoneNumber copyWith(void Function(PhoneNumber) updates) => super.copyWith((message) => updates(message as PhoneNumber));
- $pb.BuilderInfo get info_ => _i;
- static PhoneNumber create() => new PhoneNumber();
- static $pb.PbList<PhoneNumber> createRepeated() => new $pb.PbList<PhoneNumber>();
- static PhoneNumber getDefault() => _defaultInstance ??= create()..freeze();
- static PhoneNumber _defaultInstance;
- static void $checkItem(PhoneNumber v) {
- if (v is! PhoneNumber) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get number => $_getS(0, '');
- set number(String v) { $_setString(0, v); }
- bool hasNumber() => $_has(0);
- void clearNumber() => clearField(1);
-
- PhoneNumber_PhoneType get type => $_getN(1);
- set type(PhoneNumber_PhoneType v) { setField(2, v); }
- bool hasType() => $_has(1);
- void clearType() => clearField(2);
-
- String get name => $_getS(2, '\$');
- set name(String v) { $_setString(2, v); }
- bool hasName() => $_has(2);
- void clearName() => clearField(3);
-}
-
diff --git a/test/goldens/messageGeneratorEnums b/test/goldens/messageGeneratorEnums
deleted file mode 100644
index 157bfe1..0000000
--- a/test/goldens/messageGeneratorEnums
+++ /dev/null
@@ -1,22 +0,0 @@
-class PhoneNumber_PhoneType extends $pb.ProtobufEnum {
- static const PhoneNumber_PhoneType MOBILE = const PhoneNumber_PhoneType._(0, 'MOBILE');
- static const PhoneNumber_PhoneType HOME = const PhoneNumber_PhoneType._(1, 'HOME');
- static const PhoneNumber_PhoneType WORK = const PhoneNumber_PhoneType._(2, 'WORK');
-
- static const PhoneNumber_PhoneType BUSINESS = WORK;
-
- static const List<PhoneNumber_PhoneType> values = const <PhoneNumber_PhoneType> [
- MOBILE,
- HOME,
- WORK,
- ];
-
- static final Map<int, PhoneNumber_PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
- static PhoneNumber_PhoneType valueOf(int value) => _byValue[value];
- static void $checkItem(PhoneNumber_PhoneType v) {
- if (v is! PhoneNumber_PhoneType) $pb.checkItemFailed(v, 'PhoneNumber_PhoneType');
- }
-
- const PhoneNumber_PhoneType._(int v, String n) : super(v, n);
-}
-
diff --git a/test/goldens/oneMessage.pb b/test/goldens/oneMessage.pb
deleted file mode 100644
index 7ca3006..0000000
--- a/test/goldens/oneMessage.pb
+++ /dev/null
@@ -1,48 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class PhoneNumber extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('PhoneNumber')
- ..aQS(1, 'number')
- ..a<int>(2, 'type', $pb.PbFieldType.O3)
- ..a<String>(3, 'name', $pb.PbFieldType.OS, '\$')
- ;
-
- PhoneNumber() : super();
- PhoneNumber.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
- PhoneNumber.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
- PhoneNumber clone() => new PhoneNumber()..mergeFromMessage(this);
- PhoneNumber copyWith(void Function(PhoneNumber) updates) => super.copyWith((message) => updates(message as PhoneNumber));
- $pb.BuilderInfo get info_ => _i;
- static PhoneNumber create() => new PhoneNumber();
- static $pb.PbList<PhoneNumber> createRepeated() => new $pb.PbList<PhoneNumber>();
- static PhoneNumber getDefault() => _defaultInstance ??= create()..freeze();
- static PhoneNumber _defaultInstance;
- static void $checkItem(PhoneNumber v) {
- if (v is! PhoneNumber) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-
- String get number => $_getS(0, '');
- set number(String v) { $_setString(0, v); }
- bool hasNumber() => $_has(0);
- void clearNumber() => clearField(1);
-
- int get type => $_get(1, 0);
- set type(int v) { $_setSignedInt32(1, v); }
- bool hasType() => $_has(1);
- void clearType() => clearField(2);
-
- String get name => $_getS(2, '\$');
- set name(String v) { $_setString(2, v); }
- bool hasName() => $_has(2);
- void clearName() => clearField(3);
-}
-
diff --git a/test/goldens/oneMessage.pbjson b/test/goldens/oneMessage.pbjson
deleted file mode 100644
index 15f916b..0000000
--- a/test/goldens/oneMessage.pbjson
+++ /dev/null
@@ -1,15 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-const PhoneNumber$json = const {
- '1': 'PhoneNumber',
- '2': const [
- const {'1': 'number', '3': 1, '4': 2, '5': 9},
- const {'1': 'type', '3': 2, '4': 1, '5': 5, '6': ''},
- const {'1': 'name', '3': 3, '4': 1, '5': 9, '7': r'$'},
- ],
-};
-
diff --git a/test/goldens/service.pb b/test/goldens/service.pb
deleted file mode 100644
index 507b6bf..0000000
--- a/test/goldens/service.pb
+++ /dev/null
@@ -1,42 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-import 'dart:async' as $async;
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class Empty extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = new $pb.BuilderInfo('Empty')
- ..hasRequiredFields = false
- ;
-
- Empty() : super();
- Empty.fromBuffer(List<int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r);
- Empty.fromJson(String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) : super.fromJson(i, r);
- Empty clone() => new Empty()..mergeFromMessage(this);
- Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty));
- $pb.BuilderInfo get info_ => _i;
- static Empty create() => new Empty();
- static $pb.PbList<Empty> createRepeated() => new $pb.PbList<Empty>();
- static Empty getDefault() => _defaultInstance ??= create()..freeze();
- static Empty _defaultInstance;
- static void $checkItem(Empty v) {
- if (v is! Empty) $pb.checkItemFailed(v, _i.qualifiedMessageName);
- }
-}
-
-class TestApi {
- $pb.RpcClient _client;
- TestApi(this._client);
-
- $async.Future<Empty> ping($pb.ClientContext ctx, Empty request) {
- var emptyResponse = new Empty();
- return _client.invoke<Empty>(ctx, 'Test', 'Ping', request, emptyResponse);
- }
-}
-
diff --git a/test/goldens/service.pbserver b/test/goldens/service.pbserver
deleted file mode 100644
index cf1be0c..0000000
--- a/test/goldens/service.pbserver
+++ /dev/null
@@ -1,36 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-import 'dart:async' as $async;
-
-import 'package:protobuf/protobuf.dart';
-
-import 'test.pb.dart';
-import 'test.pbjson.dart';
-
-export 'test.pb.dart';
-
-abstract class TestServiceBase extends GeneratedService {
- $async.Future<Empty> ping(ServerContext ctx, Empty request);
-
- GeneratedMessage createRequest(String method) {
- switch (method) {
- case 'Ping': return new Empty();
- default: throw new ArgumentError('Unknown method: $method');
- }
- }
-
- $async.Future<GeneratedMessage> handleCall(ServerContext ctx, String method, GeneratedMessage request) {
- switch (method) {
- case 'Ping': return this.ping(ctx, request);
- default: throw new ArgumentError('Unknown method: $method');
- }
- }
-
- Map<String, dynamic> get $json => TestServiceBase$json;
- Map<String, Map<String, dynamic>> get $messageJson => TestServiceBase$messageJson;
-}
-
diff --git a/test/goldens/serviceGenerator b/test/goldens/serviceGenerator
deleted file mode 100644
index f5eb2e9..0000000
--- a/test/goldens/serviceGenerator
+++ /dev/null
@@ -1,24 +0,0 @@
-abstract class TestServiceBase extends GeneratedService {
- $async.Future<SomeReply> aMethod(ServerContext ctx, SomeRequest request);
- $async.Future<$0.AnotherReply> anotherMethod(ServerContext ctx, $0.EmptyMessage request);
-
- GeneratedMessage createRequest(String method) {
- switch (method) {
- case 'AMethod': return new SomeRequest();
- case 'AnotherMethod': return new $0.EmptyMessage();
- default: throw new ArgumentError('Unknown method: $method');
- }
- }
-
- $async.Future<GeneratedMessage> handleCall(ServerContext ctx, String method, GeneratedMessage request) {
- switch (method) {
- case 'AMethod': return this.aMethod(ctx, request);
- case 'AnotherMethod': return this.anotherMethod(ctx, request);
- default: throw new ArgumentError('Unknown method: $method');
- }
- }
-
- Map<String, dynamic> get $json => TestServiceBase$json;
- Map<String, Map<String, dynamic>> get $messageJson => TestServiceBase$messageJson;
-}
-
diff --git a/test/goldens/serviceGenerator.pb.json b/test/goldens/serviceGenerator.pb.json
deleted file mode 100644
index 96cdc7a..0000000
--- a/test/goldens/serviceGenerator.pb.json
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: testpkg.proto
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-import 'foobar.pbjson.dart' as $0;
-
-const SomeRequest$json = const {
- '1': 'SomeRequest',
-};
-
-const SomeReply$json = const {
- '1': 'SomeReply',
-};
-
-const TestServiceBase$json = const {
- '1': 'Test',
- '2': const [
- const {'1': 'AMethod', '2': '.testpkg.SomeRequest', '3': '.testpkg.SomeReply'},
- const {'1': 'AnotherMethod', '2': '.foo.bar.EmptyMessage', '3': '.foo.bar.AnotherReply'},
- ],
-};
-
-const TestServiceBase$messageJson = const {
- '.testpkg.SomeRequest': SomeRequest$json,
- '.testpkg.SomeReply': SomeReply$json,
- '.foo.bar.EmptyMessage': $0.EmptyMessage$json,
- '.foo.bar.AnotherReply': $0.AnotherReply$json,
-};
-
diff --git a/test/goldens/topLevelEnum.pb b/test/goldens/topLevelEnum.pb
deleted file mode 100644
index bb968a8..0000000
--- a/test/goldens/topLevelEnum.pb
+++ /dev/null
@@ -1,11 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore: UNUSED_SHOWN_NAME
-import 'dart:core' show int, bool, double, String, List, Map, override;
-
-export 'test.pbenum.dart';
-
diff --git a/test/goldens/topLevelEnum.pbenum b/test/goldens/topLevelEnum.pbenum
deleted file mode 100644
index bb618eb..0000000
--- a/test/goldens/topLevelEnum.pbenum
+++ /dev/null
@@ -1,32 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME
-import 'dart:core' show int, dynamic, String, List, Map;
-import 'package:protobuf/protobuf.dart' as $pb;
-
-class PhoneType extends $pb.ProtobufEnum {
- static const PhoneType MOBILE = const PhoneType._(0, 'MOBILE');
- static const PhoneType HOME = const PhoneType._(1, 'HOME');
- static const PhoneType WORK = const PhoneType._(2, 'WORK');
-
- static const PhoneType BUSINESS = WORK;
-
- static const List<PhoneType> values = const <PhoneType> [
- MOBILE,
- HOME,
- WORK,
- ];
-
- static final Map<int, PhoneType> _byValue = $pb.ProtobufEnum.initByValue(values);
- static PhoneType valueOf(int value) => _byValue[value];
- static void $checkItem(PhoneType v) {
- if (v is! PhoneType) $pb.checkItemFailed(v, 'PhoneType');
- }
-
- const PhoneType._(int v, String n) : super(v, n);
-}
-
diff --git a/test/goldens/topLevelEnum.pbjson b/test/goldens/topLevelEnum.pbjson
deleted file mode 100644
index 56520fd..0000000
--- a/test/goldens/topLevelEnum.pbjson
+++ /dev/null
@@ -1,16 +0,0 @@
-///
-// Generated code. Do not modify.
-// source: test
-///
-// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
-
-const PhoneType$json = const {
- '1': 'PhoneType',
- '2': const [
- const {'1': 'MOBILE', '2': 0},
- const {'1': 'HOME', '2': 1},
- const {'1': 'WORK', '2': 2},
- const {'1': 'BUSINESS', '2': 2},
- ],
-};
-
diff --git a/test/hash_code_test.dart b/test/hash_code_test.dart
deleted file mode 100644
index 36c2712..0000000
--- a/test/hash_code_test.dart
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library hash_code_tests;
-
-import 'package:fixnum/fixnum.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-void main() {
- test('testHashCodeEmptyMessage', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeOptionalInt32', () {
- var m1 = new TestAllTypes()..optionalInt32 = 42;
- var m2 = new TestAllTypes()..optionalInt32 = 42;
- expect(m1.hashCode, m2.hashCode);
-
- m1.optionalInt32 = 43;
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.optionalInt32 = 43;
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeOptionalInt64', () {
- var m1 = new TestAllTypes()..optionalInt64 = new Int64(42);
- var m2 = new TestAllTypes()..optionalInt64 = new Int64(42);
- expect(m1.hashCode, m2.hashCode);
-
- m1.optionalInt64 = new Int64(43);
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.optionalInt64 = new Int64(43);
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeOptionalString', () {
- var m1 = new TestAllTypes()..optionalString = "Dart";
- var m2 = new TestAllTypes()..optionalString = "Dart";
- expect(m1.hashCode, m2.hashCode);
-
- m1.optionalString = "JavaScript";
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.optionalString = "JavaScript";
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeOptionalEnum', () {
- var m1 = new TestAllTypes()
- ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;
- var m2 = new TestAllTypes()
- ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;
- expect(m1.hashCode, m2.hashCode);
-
- m1.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeRepeatedInt32', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- m1.repeatedInt32.add(42);
- m2.repeatedInt32.add(42);
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeRepeatedInt64', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- m1.repeatedInt32.add(42);
- m2.repeatedInt32.add(42);
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedInt32.add(43);
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.repeatedInt32.add(43);
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedInt32.clear();
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.repeatedInt32.clear();
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeRepeatedString', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- m1.repeatedString.add("Dart");
- m2.repeatedString.add("Dart");
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedString.add("JavaScript");
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.repeatedString.add("JavaScript");
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedString.clear();
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.repeatedString.clear();
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeRepeatedEnum', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- m1.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);
- m2.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);
- expect(m1.hashCode, isNot(m2.hashCode));
-
- m2.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeUnknownFields', () {
- var m1 = new TestAllTypes();
- var m2 = new TestAllTypes();
- m1.unknownFields.mergeVarintField(12345, new Int64(123));
- m2.unknownFields.mergeVarintField(12345, new Int64(123));
- expect(m1.hashCode, m2.hashCode);
- });
-
- test('testHashCodeCombined', () {
- var m1 = new TestAllTypes()
- ..optionalInt32 = 42
- ..optionalInt64 = new Int64(42)
- ..optionalString = "Dart"
- ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;
- var m2 = new TestAllTypes()
- ..optionalInt32 = 42
- ..optionalInt64 = new Int64(42)
- ..optionalString = "Dart"
- ..optionalNestedEnum = TestAllTypes_NestedEnum.BAR;
- expect(m1.hashCode, m2.hashCode);
-
- m1.repeatedInt32..add(42)..add(43);
- m2.repeatedInt32..add(42)..add(43);
- m1.repeatedInt64..add(new Int64(42))..add(new Int64(43));
- m2.repeatedInt64..add(new Int64(42))..add(new Int64(43));
- m1.repeatedString..add("Dart")..add("JavaScript");
- m2.repeatedString..add("Dart")..add("JavaScript");
- m1.repeatedNestedEnum
- ..add(TestAllTypes_NestedEnum.BAR)
- ..add(TestAllTypes_NestedEnum.BAZ);
- m2.repeatedNestedEnum
- ..add(TestAllTypes_NestedEnum.BAR)
- ..add(TestAllTypes_NestedEnum.BAZ);
- expect(m1.hashCode, m2.hashCode);
-
- m1.unknownFields.mergeVarintField(12345, new Int64(123));
- m2.unknownFields.mergeVarintField(12345, new Int64(123));
- expect(m1.hashCode, m2.hashCode);
- expect(m1.hashCode, m2.hashCode);
- });
-}
diff --git a/test/import_test.dart b/test/import_test.dart
deleted file mode 100644
index 02b57c8..0000000
--- a/test/import_test.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library import_test;
-
-import 'package:test/test.dart';
-
-import '../out/protos/import_clash.pb.dart' as pb;
-import '../out/protos/foo.pb.dart' as foo;
-
-void main() {
- test('Import prefixes in generated files do not clash with fields', () {
- new pb.Clasher()..foo = new foo.Foo();
- });
-}
diff --git a/test/indenting_writer_test.dart b/test/indenting_writer_test.dart
deleted file mode 100755
index 61f0427..0000000
--- a/test/indenting_writer_test.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library indenting_writer_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:test/test.dart';
-
-void main() {
- test('IndentingWriter can indent a block', () {
- var out = new IndentingWriter();
- out.addBlock('class test {', '}', () {
- out.println('first;');
- out.println();
- out.println('second;');
- });
-
- expect(out.toString(), '''
-class test {
- first;
-
- second;
-}
-''');
- });
-}
diff --git a/test/json_test.dart b/test/json_test.dart
deleted file mode 100755
index e088614..0000000
--- a/test/json_test.dart
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library json_test;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-import 'test_util.dart';
-
-void main() {
- final String TEST_ALL_TYPES_JSON = '{"1":101,"2":"102","3":103,"4":"104",'
- '"5":105,"6":"106","7":107,"8":"108","9":109,"10":"110","11":111.0,'
- '"12":112.0,"13":true,"14":"115","15":"MTE2","16":{"17":117},'
- '"18":{"1":118},"19":{"1":119},"20":{"1":120},"21":3,"22":6,"23":9,'
- '"24":"124","25":"125","31":[201,301],"32":["202","302"],'
- '"33":[203,303],"34":["204","304"],"35":[205,305],"36":["206","306"],'
- '"37":[207,307],"38":["208","308"],"39":[209,309],"40":["210","310"],'
- '"41":[211.0,311.0],"42":[212.0,312.0],"43":[true,false],'
- '"44":["215","315"],"45":["MjE2","MzE2"],"46":[{"47":217},{"47":317}],'
- '"48":[{"1":218},{"1":318}],"49":[{"1":219},{"1":319}],'
- '"50":[{"1":220},{"1":320}],"51":[2,3],"52":[5,6],"53":[8,9],'
- '"54":["224","324"],"55":["225","325"],"61":401,"62":"402","63":403,'
- '"64":"404","65":405,"66":"406","67":407,"68":"408","69":409,'
- '"70":"410","71":411.0,"72":412.0,"73":false,"74":"415","75":"NDE2",'
- '"81":1,"82":4,"83":7,"84":"424","85":"425"}';
-
- /**
- * Checks that message once serialized to JSON
- * matches TEST_ALL_TYPES_JSON massaged with [:.replaceAll(from, to):].
- */
- expectedJson(from, to) {
- var expectedJson = TEST_ALL_TYPES_JSON.replaceAll(from, to);
- return predicate(
- (message) => message.writeToJson() == expectedJson, 'Incorrect output');
- }
-
- test('testOutput', () {
- expect(getAllSet().writeToJson(), TEST_ALL_TYPES_JSON);
-
- // Test empty list.
- expect(getAllSet()..repeatedBool.clear(),
- expectedJson('"43":[true,false],', ''));
-
- // Test negative number.
- expect(getAllSet()..optionalInt32 = -1234567,
- expectedJson(':101,', ':-1234567,'));
-
- // All 64-bit numbers are quoted.
- expect(getAllSet()..optionalInt64 = make64(0, 0x200000),
- expectedJson(':"102",', ':"9007199254740992",'));
- expect(getAllSet()..optionalInt64 = make64(1, 0x200000),
- expectedJson(':"102",', ':"9007199254740993",'));
- expect(getAllSet()..optionalInt64 = -make64(0, 0x200000),
- expectedJson(':"102",', ':"-9007199254740992",'));
- expect(getAllSet()..optionalInt64 = -make64(1, 0x200000),
- expectedJson(':"102",', ':"-9007199254740993",'));
-
- // Quotes, backslashes, and control characters in strings are quoted.
- expect(getAllSet()..optionalString = 'a\u0000b\u0001cd\\e\"fg',
- expectedJson(':"115",', ':"a\\u0000b\\u0001cd\\\\e\\"fg",'));
- });
-
- test('testBase64Encode', () {
- expect(getAllSet()..optionalBytes = 'Hello, world'.codeUnits,
- expectedJson(':"MTE2",', ':"SGVsbG8sIHdvcmxk",'));
-
- expect(getAllSet()..optionalBytes = 'Hello, world!'.codeUnits,
- expectedJson(':"MTE2",', ':"SGVsbG8sIHdvcmxkIQ==",'));
-
- expect(getAllSet()..optionalBytes = 'Hello, world!!'.codeUnits,
- expectedJson(':"MTE2",', ':"SGVsbG8sIHdvcmxkISE=",'));
-
- // An empty list should not appear in the output.
- expect(getAllSet()..optionalBytes = [], expectedJson('"15":"MTE2",', ''));
-
- expect(getAllSet()..optionalBytes = 'a'.codeUnits,
- expectedJson(':"MTE2",', ':"YQ==",'));
- });
-
- test('testBase64Decode', () {
- optionalBytes(from, to) {
- String json = TEST_ALL_TYPES_JSON.replaceAll(from, to);
- return new String.fromCharCodes(
- new TestAllTypes.fromJson(json).optionalBytes);
- }
-
- expect(optionalBytes(':"MTE2",', ':"SGVsbG8sIHdvcmxk",'), 'Hello, world');
-
- expect(
- optionalBytes(':"MTE2",', ':"SGVsbG8sIHdvcmxkIQ==",'), 'Hello, world!');
-
- expect(optionalBytes(':"MTE2",', ':"SGVsbG8sIHdvcmxkISE=",'),
- 'Hello, world!!');
-
- // Remove optionalBytes tag, reads back as empty list, hence empty string.
- expect(optionalBytes('"15":"MTE2",', ''), isEmpty);
-
- // Keep optionalBytes tag, set data to empty string, get back empty list.
- expect(optionalBytes(':"MTE2",', ':"",'), isEmpty);
-
- expect(optionalBytes(':"MTE2",', ':"YQ==",'), 'a');
- });
-
- test('testParse', () {
- expect(new TestAllTypes.fromJson(TEST_ALL_TYPES_JSON), getAllSet());
- });
-
- test('testExtensionsOutput', () {
- expect(getAllExtensionsSet().writeToJson(), TEST_ALL_TYPES_JSON);
- });
-
- test('testExtensionsParse', () {
- ExtensionRegistry registry = getExtensionRegistry();
- expect(new TestAllExtensions.fromJson(TEST_ALL_TYPES_JSON, registry),
- getAllExtensionsSet());
- });
-
- test('testUnknownEnumValueInOptionalField', () {
- // optional NestedEnum optional_nested_enum = 21;
- var message = new TestAllTypes.fromJson('{"21": 4}');
- // 4 is an unknown value.
- expect(message.optionalNestedEnum, equals(TestAllTypes_NestedEnum.FOO));
- });
-
- test('testUnknownEnumValueInRepeatedField', () {
- // repeated NestedEnum repeated_nested_enum = 51;
- var message = new TestAllTypes.fromJson('{"51": [4]}');
- // 4 is an unknown value.
- expect(message.repeatedNestedEnum, isEmpty);
-
- // 1 (FOO) and 2 (BAR) are known values.
- message = new TestAllTypes.fromJson('{"51": [1, 4, 2, 4, 1, 4]}');
- expect(
- message.repeatedNestedEnum,
- equals([
- TestAllTypes_NestedEnum.FOO,
- TestAllTypes_NestedEnum.BAR,
- TestAllTypes_NestedEnum.FOO
- ]));
- });
-}
diff --git a/test/leading_underscores_test.dart b/test/leading_underscores_test.dart
deleted file mode 100644
index 8227542..0000000
--- a/test/leading_underscores_test.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test/test.dart';
-import 'package:fixnum/fixnum.dart';
-
-import '../out/protos/_leading_underscores.pb.dart';
-
-void main() {
- test('can set, read and clear all fields and refer to types', () {
- A_ message = new A_();
- message.setExtension(Leading_underscores_.p, Int64(99));
- expect(message.getExtension(Leading_underscores_.p), Int64(99));
- message.f = 'foo';
- message.f_2 = 'foo2';
- expect(message.f, 'foo');
- expect(message.f_2, 'foo2');
- message.clearF();
- message.clearF_2();
- expect(message.hasF(), false);
- expect(message.hasF_2(), false);
- expect(message.f, '');
- expect(message.f_2, '');
- A messageA = new A();
- messageA.b = message;
- messageA.b_6 = message;
- expect(messageA.b_6, message);
- messageA.amap['foo'] = message;
- expect(messageA.amap['foo'], message);
-
- messageA.e = Enum_.constant;
- expect(messageA.e, Enum_.constant);
- messageA.clearE();
- expect(messageA.e, Enum_.constant_);
- messageA.r.add(message);
- expect(messageA.r, [message]);
- messageA.setExtension(Leading_underscores_.q, Int64(100));
- expect(messageA.getExtension(Leading_underscores_.q), Int64(100));
-
- A__ a = A__()..foo = 'hi';
- expect(a.foo, 'hi');
- });
-}
diff --git a/test/map_field_test.dart b/test/map_field_test.dart
deleted file mode 100644
index 594250f..0000000
--- a/test/map_field_test.dart
+++ /dev/null
@@ -1,271 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library map_field_test;
-
-import 'dart:convert';
-
-import 'package:test/test.dart';
-
-import '../out/protos/map_field.pb.dart';
-
-void main() {
- void _setValues(TestMap testMap) {
- testMap
- ..int32ToInt32Field[1] = 11
- ..int32ToInt32Field[2] = 22
- ..int32ToInt32Field[3] = 33
- ..int32ToStringField[1] = '11'
- ..int32ToStringField[2] = '22'
- ..int32ToStringField[3] = '33'
- ..int32ToBytesField[1] = utf8.encode('11')
- ..int32ToBytesField[2] = utf8.encode('22')
- ..int32ToBytesField[3] = utf8.encode('33')
- ..int32ToEnumField[1] = TestMap_EnumValue.FOO
- ..int32ToEnumField[2] = TestMap_EnumValue.BAR
- ..int32ToEnumField[3] = TestMap_EnumValue.BAZ
- ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 11)
- ..int32ToMessageField[2] = (TestMap_MessageValue()..value = 22)
- ..int32ToMessageField[3] = (TestMap_MessageValue()..value = 33)
- ..stringToInt32Field['1'] = 11
- ..stringToInt32Field['2'] = 22
- ..stringToInt32Field['3'] = 33;
- }
-
- void _updateValues(TestMap testMap) {
- testMap
- ..int32ToInt32Field[1] = 111
- ..int32ToInt32Field.remove(2)
- ..int32ToInt32Field[4] = 44
- ..int32ToStringField[1] = '111'
- ..int32ToStringField.remove(2)
- ..int32ToStringField[4] = '44'
- ..int32ToBytesField[1] = utf8.encode('111')
- ..int32ToBytesField.remove(2)
- ..int32ToBytesField[4] = utf8.encode('44')
- ..int32ToEnumField[1] = TestMap_EnumValue.BAR
- ..int32ToEnumField.remove(2)
- ..int32ToEnumField[4] = TestMap_EnumValue.ZOP
- ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 111)
- ..int32ToMessageField.remove(2)
- ..int32ToMessageField[4] = (TestMap_MessageValue()..value = 44)
- ..stringToInt32Field['1'] = 111
- ..stringToInt32Field.remove('2')
- ..stringToInt32Field['4'] = 44;
- }
-
- void _expectEmpty(TestMap testMap) {
- expect(testMap.int32ToInt32Field, isEmpty);
- expect(testMap.int32ToStringField, isEmpty);
- expect(testMap.int32ToBytesField, isEmpty);
- expect(testMap.int32ToEnumField, isEmpty);
- expect(testMap.int32ToMessageField, isEmpty);
- expect(testMap.stringToInt32Field, isEmpty);
- }
-
- void _expectMapValuesSet(TestMap testMap) {
- expect(testMap.int32ToInt32Field[1], 11);
- expect(testMap.int32ToInt32Field[2], 22);
- expect(testMap.int32ToInt32Field[3], 33);
-
- expect(testMap.int32ToStringField[1], '11');
- expect(testMap.int32ToStringField[2], '22');
- expect(testMap.int32ToStringField[3], '33');
-
- expect(testMap.int32ToBytesField[1], utf8.encode('11'));
- expect(testMap.int32ToBytesField[2], utf8.encode('22'));
- expect(testMap.int32ToBytesField[3], utf8.encode('33'));
-
- expect(testMap.int32ToEnumField[1], TestMap_EnumValue.FOO);
- expect(testMap.int32ToEnumField[2], TestMap_EnumValue.BAR);
- expect(testMap.int32ToEnumField[3], TestMap_EnumValue.BAZ);
-
- expect(testMap.int32ToMessageField[1].value, 11);
- expect(testMap.int32ToMessageField[2].value, 22);
- expect(testMap.int32ToMessageField[3].value, 33);
-
- expect(testMap.stringToInt32Field['1'], 11);
- expect(testMap.stringToInt32Field['2'], 22);
- expect(testMap.stringToInt32Field['3'], 33);
- }
-
- void _expectMapValuesUpdated(TestMap testMap) {
- expect(testMap.int32ToInt32Field.length, 3);
- expect(testMap.int32ToInt32Field[1], 111);
- expect(testMap.int32ToInt32Field[3], 33);
- expect(testMap.int32ToInt32Field[4], 44);
-
- expect(testMap.int32ToStringField.length, 3);
- expect(testMap.int32ToStringField[1], '111');
- expect(testMap.int32ToStringField[3], '33');
- expect(testMap.int32ToStringField[4], '44');
-
- expect(testMap.int32ToBytesField.length, 3);
- expect(testMap.int32ToBytesField[1], utf8.encode('111'));
- expect(testMap.int32ToBytesField[3], utf8.encode('33'));
- expect(testMap.int32ToBytesField[4], utf8.encode('44'));
-
- expect(testMap.int32ToEnumField.length, 3);
- expect(testMap.int32ToEnumField[1], TestMap_EnumValue.BAR);
- expect(testMap.int32ToEnumField[3], TestMap_EnumValue.BAZ);
- expect(testMap.int32ToEnumField[4], TestMap_EnumValue.ZOP);
-
- expect(testMap.int32ToMessageField.length, 3);
- expect(testMap.int32ToMessageField[1].value, 111);
- expect(testMap.int32ToMessageField[3].value, 33);
- expect(testMap.int32ToMessageField[4].value, 44);
-
- expect(testMap.stringToInt32Field.length, 3);
- expect(testMap.stringToInt32Field['1'], 111);
- expect(testMap.stringToInt32Field['3'], 33);
- expect(testMap.stringToInt32Field['4'], 44);
- }
-
- test('set and clear values', () {
- TestMap testMap = TestMap();
- _expectEmpty(testMap);
-
- _setValues(testMap);
- _expectMapValuesSet(testMap);
-
- testMap.clear();
- _expectEmpty(testMap);
- });
-
- test('update map values', () {
- TestMap testMap = TestMap();
- _setValues(testMap);
- _updateValues(testMap);
- _expectMapValuesUpdated(testMap);
- });
-
- test('null keys and value are not allowed', () {
- TestMap testMap = TestMap();
-
- try {
- testMap.stringToInt32Field[null] = 1;
- fail('Should have thrown an exception.');
- } on ArgumentError catch (e) {
- expect(e.message, "Can't add a null to a map field");
- }
-
- try {
- testMap.int32ToBytesField[1] = null;
- fail('Should have thrown an exception.');
- } on ArgumentError catch (e) {
- expect(e.message, "Can't add a null to a map field");
- }
-
- try {
- testMap.int32ToStringField[1] = null;
- fail('Should have thrown an exception.');
- } on ArgumentError catch (e) {
- expect(e.message, "Can't add a null to a map field");
- }
-
- try {
- testMap.int32ToEnumField[1] = null;
- fail('Should have thrown an exception.');
- } on ArgumentError catch (e) {
- expect(e.message, "Can't add a null to a map field");
- }
-
- try {
- testMap.int32ToMessageField[1] = null;
- fail('Should have thrown an exception.');
- } on ArgumentError catch (e) {
- expect(e.message, "Can't add a null to a map field");
- }
- });
-
- test('Serialize and parse map', () {
- TestMap testMap = TestMap();
- _setValues(testMap);
-
- testMap = TestMap.fromBuffer(testMap.writeToBuffer());
- _expectMapValuesSet(testMap);
-
- _updateValues(testMap);
- testMap = TestMap.fromBuffer(testMap.writeToBuffer());
- _expectMapValuesUpdated(testMap);
-
- testMap.clear();
- testMap = TestMap.fromBuffer(testMap.writeToBuffer());
- _expectEmpty(testMap);
- });
-
- test('json serialize map', () {
- TestMap testMap = TestMap();
- _setValues(testMap);
-
- testMap = TestMap.fromJson(testMap.writeToJson());
- _expectMapValuesSet(testMap);
-
- _updateValues(testMap);
- testMap = TestMap.fromJson(testMap.writeToJson());
- _expectMapValuesUpdated(testMap);
-
- testMap.clear();
- testMap = TestMap.fromJson(testMap.writeToJson());
- _expectEmpty(testMap);
- });
-
- test('merge from other message', () {
- TestMap testMap = TestMap();
- _setValues(testMap);
-
- TestMap other = TestMap();
- other.mergeFromMessage(testMap);
- _expectMapValuesSet(other);
-
- testMap = TestMap()
- ..int32ToMessageField[1] = (TestMap_MessageValue()..value = 42)
- ..int32ToMessageField[2] = (TestMap_MessageValue()..value = 44);
- other = TestMap()
- ..int32ToMessageField[1] = (TestMap_MessageValue()..secondValue = 43);
- testMap.mergeFromMessage(other);
-
- expect(testMap.int32ToMessageField[1].value, 0);
- expect(testMap.int32ToMessageField[1].secondValue, 43);
- expect(testMap.int32ToMessageField[2].value, 44);
- });
-
- test('parse duplicate keys', () {
- TestMap testMap = TestMap()..int32ToStringField[1] = 'foo';
- TestMap testMap2 = TestMap()..int32ToStringField[1] = 'bar';
-
- TestMap merge = TestMap.fromBuffer(
- []..addAll(testMap.writeToBuffer())..addAll(testMap2.writeToBuffer()));
-
- // When parsing from the wire, if there are duplicate map keys the last key
- // seen should be used.
- expect(merge.int32ToStringField.length, 1);
- expect(merge.int32ToStringField[1], 'bar');
- });
-
- // TODO(zarah): remove skip once https://github.com/dart-lang/protobuf/issues/139 is fixed.
- test('Deep merge from other message', () {
- Inner i1 = Inner()..innerMap['a'] = 'a';
- Inner i2 = Inner()..innerMap['b'] = 'b';
-
- Outer o1 = Outer()..i = i1;
- Outer o2 = Outer()..i = i2;
-
- o1.mergeFromMessage(o2);
- expect(o1.i.innerMap.length, 2);
- }, skip: true);
-
- test('retain explicit default values of sub-messages', () {
- TestMap testMap = TestMap()
- ..int32ToMessageField[1] = TestMap_MessageValue();
- expect(testMap.int32ToMessageField[1].secondValue, 42);
-
- TestMap testMap2 = TestMap()
- ..int32ToMessageField[2] = TestMap_MessageValue();
-
- testMap.mergeFromBuffer(testMap2.writeToBuffer());
- expect(testMap.int32ToMessageField[2].secondValue, 42);
- });
-}
diff --git a/test/map_test.dart b/test/map_test.dart
deleted file mode 100644
index b5837c7..0000000
--- a/test/map_test.dart
+++ /dev/null
@@ -1,151 +0,0 @@
-library map_test;
-
-import 'package:test/test.dart'
- show test, expect, predicate, same, throwsA, throwsArgumentError;
-
-import '../out/protos/map_api.pb.dart' as pb;
-import '../out/protos/map_api2.pb.dart' as pb2;
-
-throwsError(Type expectedType, String expectedMessage) =>
- throwsA(predicate((x) {
- expect(x.runtimeType, expectedType);
- expect(x.message, expectedMessage);
- return true;
- }));
-
-void main() {
- test("message doesn't implement Map when turned off", () {
- expect(new pb.NonMap(), predicate((x) => x is! Map));
- expect(new pb2.NonMap2(), predicate((x) => x is! Map));
- });
-
- test("message implements Map when turned on", () {
- expect(new pb.Rec(), predicate((x) => x is Map));
- expect(new pb2.Rec2(), predicate((x) => x is Map));
- });
-
- test('operator [] returns null for unrecognized keys', () {
- var rec = new pb.Rec();
- expect(rec["noSuchField"], null);
- expect(rec[1234], null);
- expect(rec[null], null);
- });
-
- test('operator [] returns default value when not set', () {
- var rec = new pb.Rec();
- expect(rec["num"], 0);
- expect(rec["nums"], []);
- expect(rec["str"], "");
- expect(rec["msg"], predicate((x) => x is pb.NonMap));
- });
-
- test('operator [] returns new value when set', () {
- var rec = new pb.Rec();
- rec.num = 42;
- expect(rec["num"], 42);
- rec.nums.add(123);
- expect(rec["nums"], [123]);
- rec.str = "hello";
- expect(rec["str"], "hello");
- var msg = new pb.NonMap();
- rec.msg = msg;
- expect(rec["msg"], same(msg));
- });
-
- test('operator []= throws exception for invalid key', () {
- var rec = new pb.Rec();
- expect(() {
- rec["unknown"] = 123;
- },
- throwsError(ArgumentError,
- "field 'unknown' not found in protobuf_unittest.Rec"));
- });
-
- test('operator []= throws exception for repeated field', () {
- // Copying the values would be confusing.
- var rec = new pb.Rec();
- expect(() {
- rec["nums"] = [1, 2];
- }, throwsArgumentError);
- });
-
- test('operator []= throws exception for invalid value type', () {
- var rec = new pb.Rec();
- expect(() {
- rec["num"] = "hello";
- }, throwsArgumentError);
- expect(() {
- rec["str"] = 123;
- }, throwsArgumentError);
- });
-
- test('operator []= sets the field', () {
- var rec = new pb.Rec();
- rec["num"] = 123;
- expect(rec.num, 123);
- rec["str"] = "hello";
- expect(rec.str, "hello");
- });
-
- test('keys returns each field name (even when unset)', () {
- var rec = new pb.Rec();
- expect(new Set.from(rec.keys), new Set.from(["msg", "num", "nums", "str"]));
- });
-
- test('containsKey returns true for fields that exist (even when unset)', () {
- var rec = new pb.Rec();
- expect(rec.containsKey("unknown"), false);
- expect(rec.containsKey("str"), true);
- expect(rec.containsKey("num"), true);
- expect(rec.containsKey("nums"), true);
- expect(rec.containsKey("msg"), true);
- });
-
- test('length is constant', () {
- var rec = new pb.Rec();
- expect(rec.length, 4);
- rec.str = "hello";
- expect(rec.length, 4);
- });
-
- test("remove isn't supported", () {
- var rec = new pb.Rec();
- rec.str = "hello";
- expect(() {
- rec.remove("str");
- },
- throwsError(UnsupportedError,
- "remove() not supported by protobuf_unittest.Rec"));
- expect(rec.str, "hello");
- });
-
- test("clear sets each field to its default value (unlike a regular Map)", () {
- // We have little choice here since the clear() method already existed.
- var rec = new pb.Rec();
- rec.str = "hello";
- rec.num = 123;
- rec.nums.add(456);
- rec.clear();
- expect(rec.length, 4);
- expect(rec["str"], "");
- expect(rec["num"], 0);
- expect(rec["nums"], []);
- });
-
- test("addAll sets each field to a new value", () {
- var rec = new pb.Rec();
- rec.addAll({"str": "hello", "num": 123});
- expect(rec["str"], "hello");
- expect(rec["num"], 123);
- });
-
- test("addAll doesn't work for repeated fields", () {
- // It would be confusing to copy the values.
- var rec = new pb.Rec();
- expect(() {
- rec.addAll({
- "nums": [1, 2, 3]
- });
- }, throwsArgumentError);
- });
-}
diff --git a/test/message_generator_test.dart b/test/message_generator_test.dart
deleted file mode 100755
index 70b0341..0000000
--- a/test/message_generator_test.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library message_generator_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:test/test.dart';
-
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-import 'package:protoc_plugin/src/plugin.pb.dart';
-
-import 'golden_file.dart';
-
-void main() {
- test('testMessageGenerator', () {
- FileDescriptorProto fd = new FileDescriptorProto();
- EnumDescriptorProto ed = new EnumDescriptorProto()
- ..name = 'PhoneType'
- ..value.addAll([
- new EnumValueDescriptorProto()
- ..name = 'MOBILE'
- ..number = 0,
- new EnumValueDescriptorProto()
- ..name = 'HOME'
- ..number = 1,
- new EnumValueDescriptorProto()
- ..name = 'WORK'
- ..number = 2,
- new EnumValueDescriptorProto()
- ..name = 'BUSINESS'
- ..number = 2
- ]);
- DescriptorProto md = new DescriptorProto()
- ..name = 'PhoneNumber'
- ..field.addAll([
- // optional PhoneType type = 2 [default = HOME];
- new FieldDescriptorProto()
- ..name = 'type'
- ..number = 2
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_ENUM
- ..typeName = '.PhoneNumber.PhoneType',
- // required string number = 1;
- new FieldDescriptorProto()
- ..name = 'number'
- ..number = 1
- ..label = FieldDescriptorProto_Label.LABEL_REQUIRED
- ..type = FieldDescriptorProto_Type.TYPE_STRING,
- new FieldDescriptorProto()
- ..name = 'name'
- ..number = 3
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_STRING
- ..defaultValue = r'$'
- ])
- ..enumType.add(ed);
- var options = parseGenerationOptions(
- new CodeGeneratorRequest(), new CodeGeneratorResponse());
-
- FileGenerator fg = new FileGenerator(fd, options);
- MessageGenerator mg =
- new MessageGenerator(md, fg, {}, null, new Set<String>());
-
- var ctx = new GenerationContext(options);
- mg.register(ctx);
- mg.resolve(ctx);
-
- var writer = new IndentingWriter();
- mg.generate(writer);
- expectMatchesGoldenFile(writer.toString(), 'test/goldens/messageGenerator');
-
- writer = new IndentingWriter();
- mg.generateEnums(writer);
- expectMatchesGoldenFile(
- writer.toString(), 'test/goldens/messageGeneratorEnums');
- });
-}
diff --git a/test/message_test.dart b/test/message_test.dart
deleted file mode 100755
index 7a933ab..0000000
--- a/test/message_test.dart
+++ /dev/null
@@ -1,256 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library message_test;
-
-import 'package:protoc_plugin/src/descriptor.pb.dart' show DescriptorProto;
-import 'package:test/test.dart';
-
-import 'test_util.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-import '../out/protos/google/protobuf/unittest.pbjson.dart';
-
-void main() {
- TestRequired TEST_REQUIRED_UNINITIALIZED = new TestRequired();
-
- TestRequired TEST_REQUIRED_INITIALIZED = new TestRequired()
- ..a = 1
- ..b = 2
- ..c = 3;
-
- test('testMergeFrom', () {
- TestAllTypes mergeSource = new TestAllTypes()
- ..optionalInt32 = 1
- ..optionalString = 'foo'
- ..optionalForeignMessage = new ForeignMessage()
- ..repeatedString.add('bar');
-
- TestAllTypes mergeDest = new TestAllTypes()
- ..optionalInt64 = make64(2)
- ..optionalString = 'baz'
- ..optionalForeignMessage = new ForeignMessage()
- ..optionalForeignMessage = (new ForeignMessage()..c = 3)
- ..repeatedString.add('qux');
-
- String mergeResultExpected = '''
-optionalInt32: 1
-optionalInt64: 2
-optionalString: baz
-optionalForeignMessage: {
- c: 3
-}
-repeatedString: bar
-repeatedString: qux
-''';
-
- TestAllTypes result = new TestAllTypes()
- ..mergeFromMessage(mergeSource)
- ..mergeFromMessage(mergeDest);
-
- expect(result.toString(), mergeResultExpected);
- });
-
- test('testRequired', () {
- TestRequired message = new TestRequired();
-
- expect(message.isInitialized(), isFalse, reason: 'no required fields set');
- message.a = 1;
- expect(message.isInitialized(), isFalse,
- reason: 'single required field set');
- message.b = 1;
- expect(message.isInitialized(), isFalse,
- reason: 'all but one required field set');
- message.c = 1;
- expect(message.isInitialized(), isTrue, reason: 'required fields set');
- });
-
- test('testRequiredForeign', () {
- TestRequiredForeign message = new TestRequiredForeign();
- expect(message.isInitialized(), isTrue,
- reason: 'TestRequiredForeign without children should be initialized');
-
- message.optionalMessage = TEST_REQUIRED_UNINITIALIZED;
- expect(message.isInitialized(), isFalse,
- reason: 'TestRequiredForeign with optional TEST_REQUIRED_UNINITIALIZED '
- 'should not be initialized');
-
- message.optionalMessage = TEST_REQUIRED_INITIALIZED;
- expect(message.isInitialized(), isTrue,
- reason: 'TestRequiredForeign with optional TEST_REQUIRED_INITIALIZED '
- 'should be initialized');
-
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- expect(message.isInitialized(), isFalse,
- reason:
- 'TestRequiredForeign with repeating TEST_REQUIRED_UNINITIALIZED '
- 'should not be initialized');
-
- message.repeatedMessage[0] = TEST_REQUIRED_INITIALIZED;
- expect(message.isInitialized(), isTrue,
- reason: 'TestRequiredForeign with repeating TEST_REQUIRED_INITIALIZED '
- 'should be initialized');
- });
-
- test('testRequiredExtension', () {
- TestAllExtensions message = new TestAllExtensions();
- expect(message.isInitialized(), isTrue);
-
- message.setExtension(TestRequired.single, TEST_REQUIRED_UNINITIALIZED);
- expect(message.isInitialized(), isFalse);
-
- message.setExtension(TestRequired.single, TEST_REQUIRED_INITIALIZED);
- expect(message.isInitialized(), isTrue);
-
- message.addExtension(TestRequired.multi, TEST_REQUIRED_UNINITIALIZED);
- expect(message.isInitialized(), isFalse);
-
- message.getExtension(TestRequired.multi)[0] = TEST_REQUIRED_INITIALIZED;
- expect(message.isInitialized(), isTrue);
- });
-
- test('testUninitializedException', () {
- try {
- new TestRequired().check();
- fail('Should have thrown an exception.');
- } on StateError catch (e) {
- expect(e.message, 'Message missing required fields: a, b, c');
- }
- });
-
- test('testBuildPartial', () {
- // We're mostly testing that no exception is thrown.
- TestRequired message = new TestRequired();
- expect(message.isInitialized(), isFalse);
- });
-
- test('testNestedUninitializedException', () {
- try {
- TestRequiredForeign message = new TestRequiredForeign();
- message.optionalMessage = TEST_REQUIRED_UNINITIALIZED;
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- message.check();
- fail('Should have thrown an exception.');
- } on StateError catch (e) {
- // NOTE: error message differs from Java in that
- // fields are referenced using Dart fieldnames r.t.
- // proto field names.
- expect(
- e.message,
- 'Message missing required fields: '
- 'optionalMessage.a, '
- 'optionalMessage.b, '
- 'optionalMessage.c, '
- 'repeatedMessage[0].a, '
- 'repeatedMessage[0].b, '
- 'repeatedMessage[0].c, '
- 'repeatedMessage[1].a, '
- 'repeatedMessage[1].b, '
- 'repeatedMessage[1].c');
- }
- });
-
- test('testBuildNestedPartial', () {
- // We're mostly testing that no exception is thrown.
- TestRequiredForeign message = new TestRequiredForeign();
- message.optionalMessage = TEST_REQUIRED_UNINITIALIZED;
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- expect(message.isInitialized(), isFalse);
- });
-
- test('testParseUnititialized', () {
- try {
- (new TestRequired.fromBuffer([])).check();
- fail('Should have thrown an exception.');
- } on StateError catch (e) {
- expect(e.message, 'Message missing required fields: a, b, c');
- }
- });
-
- test('testParseNestedUnititialized', () {
- TestRequiredForeign message = new TestRequiredForeign();
- message.optionalMessage = TEST_REQUIRED_UNINITIALIZED;
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- message.repeatedMessage.add(TEST_REQUIRED_UNINITIALIZED);
- List<int> buffer = message.writeToBuffer();
-
- try {
- (new TestRequiredForeign.fromBuffer(buffer)).check();
- fail('Should have thrown an exception.');
- } on StateError catch (e) {
- // NOTE: error message differs from Java in that
- // fields are referenced using Dart fieldnames r.t.
- // proto field names.
- expect(
- e.message,
- 'Message missing required fields: '
- 'optionalMessage.a, '
- 'optionalMessage.b, '
- 'optionalMessage.c, '
- 'repeatedMessage[0].a, '
- 'repeatedMessage[0].b, '
- 'repeatedMessage[0].c, '
- 'repeatedMessage[1].a, '
- 'repeatedMessage[1].b, '
- 'repeatedMessage[1].c');
- }
- });
-
- test('testClearField', () {
- int fieldNo;
- TestAllTypes message = new TestAllTypes();
-
- // Singular field with no default.
- fieldNo = 1;
- expect(message.hasField(fieldNo), isFalse);
- expect(message.getField(fieldNo), 0);
- message.clearField(fieldNo);
- expect(message.hasField(fieldNo), isFalse);
- message.setField(fieldNo, 0);
- expect(message.getField(fieldNo), 0);
- expect(message.hasField(fieldNo), isTrue);
- message.clearField(fieldNo);
- expect(message.hasField(fieldNo), isFalse);
-
- // Repeated field.
- fieldNo = 31;
- expect(message.hasField(fieldNo), isFalse);
- message.getField(fieldNo).add(1);
- expect(message.hasField(fieldNo), isTrue);
-
- // Singular field with default.
- fieldNo = 61;
- expect(message.hasField(fieldNo), isFalse);
- expect(message.getField(fieldNo), 41);
- message.clearField(fieldNo);
- message.setField(fieldNo, 41);
- expect(message.hasField(fieldNo), isTrue);
- message.setField(fieldNo, 42);
- expect(message.hasField(fieldNo), isTrue);
- expect(message.getField(fieldNo), 42);
- message.clearField(fieldNo);
- expect(message.hasField(fieldNo), isFalse);
- expect(message.getField(fieldNo), 41);
- });
-
- test('JSON constants share structure', () {
- const nestedTypeTag = 3;
- List fields = TestAllTypes$json['$nestedTypeTag'];
- expect(fields[0], same(TestAllTypes_NestedMessage$json));
-
- const enumTypeTag = 4;
- fields = TestAllTypes$json['$enumTypeTag'];
- expect(fields[0], same(TestAllTypes_NestedEnum$json));
- });
-
- test('Can read JSON constant into DescriptorProto', () {
- var d = new DescriptorProto()..mergeFromJsonMap(TestAllTypes$json);
- expect(d.name, "TestAllTypes");
- expect(d.field[0].name, "optional_int32");
- expect(d.nestedType[0].name, "NestedMessage");
- });
-}
diff --git a/test/mixin_test.dart b/test/mixin_test.dart
deleted file mode 100644
index 2e8c789..0000000
--- a/test/mixin_test.dart
+++ /dev/null
@@ -1,67 +0,0 @@
-import 'package:test/test.dart';
-
-import '../out/protos/mixins.pb.dart' as pb;
-import 'package:protoc_plugin/testing/mixins.dart';
-
-void main() {
- group('Proto with Mixin1', () {
- pb.Mixin1PB proto;
-
- setUp(() {
- proto = new pb.Mixin1PB();
- });
-
- test('is a Mixin1', () {
- expect(proto is Mixin1, isTrue);
- expect(proto is Mixin2, isFalse);
- });
-
- test('implements interface defined by mixins', () {
- proto.interfaceString = 'test';
- expect(proto.hasInterfaceString(), isTrue);
- expect(proto.interfaceString, equals('test'));
- });
- });
-
- group('Proto with Mixin2', () {
- pb.Mixin2PB proto;
-
- setUp(() {
- proto = new pb.Mixin2PB();
- });
-
- test('overrides has method', () {
- expect(proto.hasOverriddenHasMethod(), isFalse);
- proto.overriddenHasMethod = 'test';
-
- expect(proto.hasOverriddenHasMethod(), isTrue);
- });
- });
-
- group('Proto without mixins', () {
- pb.NoMixinPB proto;
-
- setUp(() {
- proto = new pb.NoMixinPB();
- });
-
- test('is neither Mixin1 nor Mixin2', () {
- expect(proto is Mixin1, isFalse);
- expect(proto is Mixin2, isFalse);
- });
- });
-
- group('Proto with Mixin3', () {
- pb.Mixin3PB proto;
-
- setUp(() {
- proto = new pb.Mixin3PB();
- });
-
- test('is both Mixin1 (from parent) and Mixin3', () {
- expect(proto is Mixin1, isTrue);
- expect(proto is Mixin2, isFalse);
- expect(proto is Mixin3, isTrue);
- });
- });
-}
diff --git a/test/names_test.dart b/test/names_test.dart
deleted file mode 100644
index 667d11d..0000000
--- a/test/names_test.dart
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart_name_test;
-
-import 'package:test/test.dart';
-import 'package:protoc_plugin/names.dart' as names;
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-import 'package:protoc_plugin/src/dart_options.pb.dart';
-
-import '../out/protos/dart_name.pb.dart' as pb;
-
-Matcher throwsMessage(String msg) => throwsA(new _ToStringMatcher(equals(msg)));
-
-class _ToStringMatcher extends CustomMatcher {
- _ToStringMatcher(Matcher matcher)
- : super("object where toString() returns", "toString()", matcher);
- featureValueOf(actual) => actual.toString();
-}
-
-void main() {
- test('Can access a field that was renamed using dart_name option', () {
- var msg = new pb.DartName();
- expect(msg.hasRenamedField(), false);
- msg.renamedField = 'test';
- expect(msg.hasRenamedField(), true);
- expect(msg.renamedField, 'test');
- msg.clearRenamedField();
- expect(msg.hasRenamedField(), false);
- });
-
- test('Can swap field names using dart_name option', () {
- var msg = new pb.SwapNames();
- msg.first = "one";
- msg.second = "two";
- expect(msg.getField(1), "two");
- expect(msg.getField(2), "one");
- });
-
- test("Can take another field's name using dart_name option", () {
- var msg = new pb.TakeExistingName();
- msg.first = "one";
- expect(msg.getField(2), "one");
- msg.first_1 = "renamed";
- expect(msg.getField(1), "renamed");
- });
-
- test('Throws exception for dart_name option containing a space', () {
- var descriptor = new DescriptorProto()
- ..name = 'Example'
- ..field.add(stringField("first", 1, "hello world"));
- expect(() {
- names.messageFieldNames(descriptor);
- },
- throwsMessage("Example.first: dart_name option is invalid: "
- "'hello world' is not a valid Dart field name"));
- });
-
- test('Throws exception for dart_name option set to reserved word', () {
- var descriptor = new DescriptorProto()
- ..name = 'Example'
- ..field.add(stringField("first", 1, "class"));
- expect(() {
- names.messageFieldNames(descriptor);
- },
- throwsMessage("Example.first: "
- "dart_name option is invalid: 'class' is already used"));
- });
-
- test('Throws exception for duplicate dart_name options', () {
- var descriptor = new DescriptorProto()
- ..name = 'Example'
- ..field.addAll([
- stringField("first", 1, "renamed"),
- stringField("second", 2, "renamed"),
- ]);
- expect(() {
- names.messageFieldNames(descriptor);
- },
- throwsMessage("Example.second: "
- "dart_name option is invalid: 'renamed' is already used"));
- });
-
- test('message classes renamed to avoid Function keyword', () {
- new pb.Function_()..fun = 'renamed';
- new pb.Function__()..fun1 = 'also renamed';
- });
-
- test('disambiguateName', () {
- Iterable<String> oneTwoThree() sync* {
- yield* ['_one', '_two', '_three'];
- }
-
- {
- final used = Set<String>.from(['moo']);
- expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo');
- expect(used, Set<String>.from(['moo', 'foo']));
- }
- {
- final used = Set<String>.from(['foo']);
- expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo_one');
- expect(used, Set<String>.from(['foo', 'foo_one']));
- }
- {
- final used = Set<String>.from(['foo', 'foo_one']);
- expect(names.disambiguateName('foo', used, oneTwoThree()), 'foo_two');
- expect(used, Set<String>.from(['foo', 'foo_one', 'foo_two']));
- }
-
- {
- List<String> variants(String s) {
- return ['a_' + s, 'b_' + s];
- }
-
- final used = Set<String>.from(['a_foo', 'b_foo_one']);
- expect(
- names.disambiguateName('foo', used, oneTwoThree(),
- generateVariants: variants),
- 'foo_two');
- expect(used,
- Set<String>.from(['a_foo', 'b_foo_one', 'a_foo_two', 'b_foo_two']));
- }
- });
-
- test('avoidInitialUnderscore', () {
- expect(names.avoidInitialUnderscore('foo'), 'foo');
- expect(names.avoidInitialUnderscore('foo_'), 'foo_');
- expect(names.avoidInitialUnderscore('_foo'), 'foo_');
- expect(names.avoidInitialUnderscore('__foo'), 'foo__');
- });
-
- test('legalDartIdentifier', () {
- expect(names.legalDartIdentifier("foo"), "foo");
- expect(names.legalDartIdentifier("_foo"), "_foo");
- expect(names.legalDartIdentifier("-foo"), "_foo");
- expect(names.legalDartIdentifier("foo.\$a{b}c(d)e_"), "foo_\$a_b_c_d_e_");
- });
-
- test('defaultSuffixes', () {
- expect(names.defaultSuffixes().take(5).toList(),
- ['_', '_0', '_1', '_2', '_3']);
- });
-}
-
-FieldDescriptorProto stringField(String name, int number, String dartName) {
- return new FieldDescriptorProto()
- ..name = name
- ..number = number
- ..label = FieldDescriptorProto_Label.LABEL_OPTIONAL
- ..type = FieldDescriptorProto_Type.TYPE_STRING
- ..options =
- (new FieldOptions()..setExtension(Dart_options.dartName, dartName));
-}
diff --git a/test/protoc_options_test.dart b/test/protoc_options_test.dart
deleted file mode 100644
index 8f531fc..0000000
--- a/test/protoc_options_test.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library protoc_options_test;
-
-import 'package:protoc_plugin/src/plugin.pb.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:test/test.dart';
-
-void main() {
- test('testValidGeneratorOptions', () {
- checkValid(String parameter) {
- var request = new CodeGeneratorRequest();
- if (parameter != null) request.parameter = parameter;
- var response = new CodeGeneratorResponse();
- var options = parseGenerationOptions(request, response);
- expect(options, new TypeMatcher<GenerationOptions>());
- expect(response.error, '');
- }
-
- checkValid(null);
- checkValid('');
- checkValid(',');
- checkValid(',,,');
- checkValid(' , , ,');
- });
-
- test('testInvalidGeneratorOptions', () {
- checkInvalid(String parameter) {
- var request = new CodeGeneratorRequest();
- if (parameter != null) request.parameter = parameter;
- var response = new CodeGeneratorResponse();
- var options = parseGenerationOptions(request, response);
- expect(options, isNull);
- }
-
- checkInvalid('abc');
- checkInvalid('abc,def');
- });
-}
diff --git a/test/protos/ExtensionEnumNameConflict.proto b/test/protos/ExtensionEnumNameConflict.proto
deleted file mode 100644
index e26f8d0..0000000
--- a/test/protos/ExtensionEnumNameConflict.proto
+++ /dev/null
@@ -1,16 +0,0 @@
-syntax = "proto2";
-
-package protobuf_unittest;
-
-// Cause a conflict with the auto-generated extension class.
-enum ExtensionEnumNameConflict {
- UNKNOWN = 0;
-}
-
-message YetAnotherMessageToBeExtended {
- extensions 1 to max;
-}
-
-extend YetAnotherMessageToBeExtended {
- optional int32 enumConflictExtension = 1;
-}
diff --git a/test/protos/ExtensionNameConflict.proto b/test/protos/ExtensionNameConflict.proto
deleted file mode 100644
index 21217eb..0000000
--- a/test/protos/ExtensionNameConflict.proto
+++ /dev/null
@@ -1,16 +0,0 @@
-syntax = "proto2";
-
-package protobuf_unittest;
-
-// Cause a conflict with the auto-generated extension class.
-message ExtensionNameConflict {
-}
-
-message AnotherMessageToBeExtended {
- extensions 1 to max;
-}
-
-extend AnotherMessageToBeExtended {
- optional int32 someExtension = 1;
-}
-
diff --git a/test/protos/_leading_underscores.proto b/test/protos/_leading_underscores.proto
deleted file mode 100644
index 35d7688..0000000
--- a/test/protos/_leading_underscores.proto
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package _leading_underscores;
-
-message _A {
- optional string _f = 1;
- optional string f = 2;
- extensions 3 to 4;
- extend A {
- optional int64 _q = 3;
- }
-}
-
-message A_ {
- optional string foo = 1;
-}
-
-message A {
- optional string _f = 1;
- optional string f = 2;
- extensions 3 to 4;
- optional _A b = 5;
- optional _A _b = 6;
- optional _A _c = 7;
- optional _Enum _e = 8;
- map<string, _A> _amap = 9;
- repeated _A _r = 10;
-}
-
-extend _A {
- optional int64 _p = 3;
- optional int64 p = 4;
-}
-
-extend A {
- optional int64 _q = 4;
-}
-
-enum _Enum {
- _constant = 0;
- constant = 1;
-}
-
-service _service {
- rpc _search (_A) returns (_A);
- rpc search (_A) returns (_A);
-}
diff --git a/test/protos/dart_name.proto b/test/protos/dart_name.proto
deleted file mode 100644
index 533d43c..0000000
--- a/test/protos/dart_name.proto
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-import "dart_options.proto";
-
-package dart_name;
-
-message DartName {
- optional string field = 1 [
- (dart_options.dart_name) = "renamedField"
- ];
-}
-
-message SwapNames {
- optional string first = 1 [
- (dart_options.dart_name) = "second"
- ];
- optional string second = 2 [
- (dart_options.dart_name) = "first"
- ];
-}
-
-message TakeExistingName {
- optional string first = 1;
- optional string second = 2 [
- (dart_options.dart_name) = "first"
- ];
-}
-
-message Function {
- optional string fun = 1;
-}
-
-message Function_ {
- optional string fun1 = 1;
-}
diff --git a/test/protos/duplicate_names_import.proto b/test/protos/duplicate_names_import.proto
deleted file mode 100644
index fc0e46a..0000000
--- a/test/protos/duplicate_names_import.proto
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package pkg;
-
-import "package1.proto";
-import "package2.proto";
-import "package3.proto";
-
-message M {
- optional pkg1.M m1 = 1;
- optional pkg1.M.M m1_m = 2;
- optional pkg1.pkg2.M m2 = 3;
- optional pkg1.pkg2.M.M m2_m = 4;
- optional pkg1_pkg2.M m3 = 5;
- optional pkg1_pkg2.M.M m3_m = 6;
-}
-
-message M2 {
- optional int32 pkg1 = 1;
-}
diff --git a/test/protos/enum_extension.proto b/test/protos/enum_extension.proto
deleted file mode 100644
index 7b09e3f..0000000
--- a/test/protos/enum_extension.proto
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package protobuf_unittest;
-
-message Extendable {
- extensions 1 to max;
-}
-
-enum Animal {
- CAT = 1;
- DOG = 2;
-}
-
-extend Extendable {
- optional Animal animal = 1;
-}
diff --git a/test/protos/foo.proto b/test/protos/foo.proto
deleted file mode 100644
index 2a4c36b..0000000
--- a/test/protos/foo.proto
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package foo;
-
-message Foo {
-}
diff --git a/test/protos/google/protobuf/any.proto b/test/protos/google/protobuf/any.proto
deleted file mode 100644
index 4932942..0000000
--- a/test/protos/google/protobuf/any.proto
+++ /dev/null
@@ -1,154 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option go_package = "github.com/golang/protobuf/ptypes/any";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "AnyProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
-// any, err := ptypes.MarshalAny(foo)
-// ...
-// foo := &pb.Foo{}
-// if err := ptypes.UnmarshalAny(any, foo); err != nil {
-// ...
-// }
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": <string>,
-// "lastName": <string>
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-message Any {
- // A URL/resource name that uniquely identifies the type of the serialized
- // protocol buffer message. The last segment of the URL's path must represent
- // the fully qualified name of the type (as in
- // `path/google.protobuf.Duration`). The name should be in a canonical form
- // (e.g., leading "." is not accepted).
- //
- // In practice, teams usually precompile into the binary all types that they
- // expect it to use in the context of Any. However, for URLs which use the
- // scheme `http`, `https`, or no scheme, one can optionally set up a type
- // server that maps type URLs to message definitions as follows:
- //
- // * If no scheme is provided, `https` is assumed.
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Note: this functionality is not currently available in the official
- // protobuf release, and it is not used for type URLs beginning with
- // type.googleapis.com.
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- string type_url = 1;
-
- // Must be a valid serialized protocol buffer of the above specified type.
- bytes value = 2;
-}
diff --git a/test/protos/google/protobuf/unittest.proto b/test/protos/google/protobuf/unittest.proto
deleted file mode 100644
index 2516bb3..0000000
--- a/test/protos/google/protobuf/unittest.proto
+++ /dev/null
@@ -1,633 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// A proto file we will use for unit testing.
-
-syntax = "proto2";
-
-// Some generic_services option(s) added automatically.
-// See: http://go/proto2-generic-services-default
-option cc_generic_services = true; // auto-added
-option java_generic_services = true; // auto-added
-option py_generic_services = true; // auto-added
-
-import "google/protobuf/unittest_import.proto";
-
-// We don't put this in a package within proto2 because we need to make sure
-// that the generated code doesn't depend on being in the proto2 namespace.
-// In test_util.h we do "using namespace unittest = protobuf_unittest".
-package protobuf_unittest;
-
-// Protos optimized for SPEED use a strict superset of the generated code
-// of equivalent ones optimized for CODE_SIZE, so we should optimize all our
-// tests for speed unless explicitly testing code size optimization.
-option optimize_for = SPEED;
-
-option java_outer_classname = "UnittestProto";
-
-// This proto includes every type of field in both singular and repeated
-// forms.
-message TestAllTypes {
- message NestedMessage {
- // The field name "b" fails to compile in proto1 because it conflicts with
- // a local variable named "b" in one of the generated methods. Doh.
- // This file needs to compile in proto1 to test backwards-compatibility.
- optional int32 bb = 1;
- }
-
- enum NestedEnum {
- FOO = 1;
- BAR = 2;
- BAZ = 3;
- }
-
- // Singular
- optional int32 optional_int32 = 1;
- optional int64 optional_int64 = 2;
- optional uint32 optional_uint32 = 3;
- optional uint64 optional_uint64 = 4;
- optional sint32 optional_sint32 = 5;
- optional sint64 optional_sint64 = 6;
- optional fixed32 optional_fixed32 = 7;
- optional fixed64 optional_fixed64 = 8;
- optional sfixed32 optional_sfixed32 = 9;
- optional sfixed64 optional_sfixed64 = 10;
- optional float optional_float = 11;
- optional double optional_double = 12;
- optional bool optional_bool = 13;
- optional string optional_string = 14;
- optional bytes optional_bytes = 15;
-
- optional group OptionalGroup = 16 {
- optional int32 a = 17;
- }
-
- optional NestedMessage optional_nested_message = 18;
- optional ForeignMessage optional_foreign_message = 19;
- optional protobuf_unittest_import.ImportMessage optional_import_message = 20;
-
- optional NestedEnum optional_nested_enum = 21;
- optional ForeignEnum optional_foreign_enum = 22;
- optional protobuf_unittest_import.ImportEnum optional_import_enum = 23;
-
- optional string optional_string_piece = 24 [ctype=STRING_PIECE];
- optional string optional_cord = 25 [ctype=CORD];
-
- // Repeated
- repeated int32 repeated_int32 = 31;
- repeated int64 repeated_int64 = 32;
- repeated uint32 repeated_uint32 = 33;
- repeated uint64 repeated_uint64 = 34;
- repeated sint32 repeated_sint32 = 35;
- repeated sint64 repeated_sint64 = 36;
- repeated fixed32 repeated_fixed32 = 37;
- repeated fixed64 repeated_fixed64 = 38;
- repeated sfixed32 repeated_sfixed32 = 39;
- repeated sfixed64 repeated_sfixed64 = 40;
- repeated float repeated_float = 41;
- repeated double repeated_double = 42;
- repeated bool repeated_bool = 43;
- repeated string repeated_string = 44;
- repeated bytes repeated_bytes = 45;
-
- repeated group RepeatedGroup = 46 {
- optional int32 a = 47;
- }
-
- repeated NestedMessage repeated_nested_message = 48;
- repeated ForeignMessage repeated_foreign_message = 49;
- repeated protobuf_unittest_import.ImportMessage repeated_import_message = 50;
-
- repeated NestedEnum repeated_nested_enum = 51;
- repeated ForeignEnum repeated_foreign_enum = 52;
- repeated protobuf_unittest_import.ImportEnum repeated_import_enum = 53;
-
- repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
- repeated string repeated_cord = 55 [ctype=CORD];
-
- // Singular with defaults
- optional int32 default_int32 = 61 [default = 41 ];
- optional int64 default_int64 = 62 [default = 42 ];
- optional uint32 default_uint32 = 63 [default = 43 ];
- optional uint64 default_uint64 = 64 [default = 44 ];
- optional sint32 default_sint32 = 65 [default = -45 ];
- optional sint64 default_sint64 = 66 [default = 46 ];
- optional fixed32 default_fixed32 = 67 [default = 47 ];
- optional fixed64 default_fixed64 = 68 [default = 48 ];
- optional sfixed32 default_sfixed32 = 69 [default = 49 ];
- optional sfixed64 default_sfixed64 = 70 [default = -50 ];
- optional float default_float = 71 [default = 51.5 ];
- optional double default_double = 72 [default = 52e3 ];
- optional bool default_bool = 73 [default = true ];
- optional string default_string = 74 [default = "hello"];
- optional bytes default_bytes = 75 [default = "world"];
-
- optional NestedEnum default_nested_enum = 81 [default = BAR ];
- optional ForeignEnum default_foreign_enum = 82 [default = FOREIGN_BAR];
- optional protobuf_unittest_import.ImportEnum
- default_import_enum = 83 [default = IMPORT_BAR];
-
- optional string default_string_piece = 84 [ctype=STRING_PIECE,default="abc"];
- optional string default_cord = 85 [ctype=CORD,default="123"];
-}
-
-message TestDeprecatedFields {
- optional int32 deprecated_int32 = 1 [deprecated=true];
-}
-
-// Define these after TestAllTypes to make sure the compiler can handle
-// that.
-message ForeignMessage {
- optional int32 c = 1;
-}
-
-enum ForeignEnum {
- FOREIGN_FOO = 4;
- FOREIGN_BAR = 5;
- FOREIGN_BAZ = 6;
-}
-
-message TestAllExtensions {
- extensions 1 to max;
-}
-
-extend TestAllExtensions {
- // Singular
- optional int32 optional_int32_extension = 1;
- optional int64 optional_int64_extension = 2;
- optional uint32 optional_uint32_extension = 3;
- optional uint64 optional_uint64_extension = 4;
- optional sint32 optional_sint32_extension = 5;
- optional sint64 optional_sint64_extension = 6;
- optional fixed32 optional_fixed32_extension = 7;
- optional fixed64 optional_fixed64_extension = 8;
- optional sfixed32 optional_sfixed32_extension = 9;
- optional sfixed64 optional_sfixed64_extension = 10;
- optional float optional_float_extension = 11;
- optional double optional_double_extension = 12;
- optional bool optional_bool_extension = 13;
- optional string optional_string_extension = 14;
- optional bytes optional_bytes_extension = 15;
-
- optional group OptionalGroup_extension = 16 {
- optional int32 a = 17;
- }
-
- optional TestAllTypes.NestedMessage optional_nested_message_extension = 18;
- optional ForeignMessage optional_foreign_message_extension = 19;
- optional protobuf_unittest_import.ImportMessage
- optional_import_message_extension = 20;
-
- optional TestAllTypes.NestedEnum optional_nested_enum_extension = 21;
- optional ForeignEnum optional_foreign_enum_extension = 22;
- optional protobuf_unittest_import.ImportEnum
- optional_import_enum_extension = 23;
-
- optional string optional_string_piece_extension = 24 [ctype=STRING_PIECE];
- optional string optional_cord_extension = 25 [ctype=CORD];
-
- // Repeated
- repeated int32 repeated_int32_extension = 31;
- repeated int64 repeated_int64_extension = 32;
- repeated uint32 repeated_uint32_extension = 33;
- repeated uint64 repeated_uint64_extension = 34;
- repeated sint32 repeated_sint32_extension = 35;
- repeated sint64 repeated_sint64_extension = 36;
- repeated fixed32 repeated_fixed32_extension = 37;
- repeated fixed64 repeated_fixed64_extension = 38;
- repeated sfixed32 repeated_sfixed32_extension = 39;
- repeated sfixed64 repeated_sfixed64_extension = 40;
- repeated float repeated_float_extension = 41;
- repeated double repeated_double_extension = 42;
- repeated bool repeated_bool_extension = 43;
- repeated string repeated_string_extension = 44;
- repeated bytes repeated_bytes_extension = 45;
-
- repeated group RepeatedGroup_extension = 46 {
- optional int32 a = 47;
- }
-
- repeated TestAllTypes.NestedMessage repeated_nested_message_extension = 48;
- repeated ForeignMessage repeated_foreign_message_extension = 49;
- repeated protobuf_unittest_import.ImportMessage
- repeated_import_message_extension = 50;
-
- repeated TestAllTypes.NestedEnum repeated_nested_enum_extension = 51;
- repeated ForeignEnum repeated_foreign_enum_extension = 52;
- repeated protobuf_unittest_import.ImportEnum
- repeated_import_enum_extension = 53;
-
- repeated string repeated_string_piece_extension = 54 [ctype=STRING_PIECE];
- repeated string repeated_cord_extension = 55 [ctype=CORD];
-
- // Singular with defaults
- optional int32 default_int32_extension = 61 [default = 41 ];
- optional int64 default_int64_extension = 62 [default = 42 ];
- optional uint32 default_uint32_extension = 63 [default = 43 ];
- optional uint64 default_uint64_extension = 64 [default = 44 ];
- optional sint32 default_sint32_extension = 65 [default = -45 ];
- optional sint64 default_sint64_extension = 66 [default = 46 ];
- optional fixed32 default_fixed32_extension = 67 [default = 47 ];
- optional fixed64 default_fixed64_extension = 68 [default = 48 ];
- optional sfixed32 default_sfixed32_extension = 69 [default = 49 ];
- optional sfixed64 default_sfixed64_extension = 70 [default = -50 ];
- optional float default_float_extension = 71 [default = 51.5 ];
- optional double default_double_extension = 72 [default = 52e3 ];
- optional bool default_bool_extension = 73 [default = true ];
- optional string default_string_extension = 74 [default = "hello"];
- optional bytes default_bytes_extension = 75 [default = "world"];
-
- optional TestAllTypes.NestedEnum
- default_nested_enum_extension = 81 [default = BAR];
- optional ForeignEnum
- default_foreign_enum_extension = 82 [default = FOREIGN_BAR];
- optional protobuf_unittest_import.ImportEnum
- default_import_enum_extension = 83 [default = IMPORT_BAR];
-
- optional string default_string_piece_extension = 84 [ctype=STRING_PIECE,
- default="abc"];
- optional string default_cord_extension = 85 [ctype=CORD, default="123"];
-}
-
-message TestNestedExtension {
- extend TestAllExtensions {
- // Check for bug where string extensions declared in tested scope did not
- // compile.
- optional string test = 1002 [default="test"];
- }
-}
-
-// We have separate messages for testing required fields because it's
-// annoying to have to fill in required fields in TestProto in order to
-// do anything with it. Note that we don't need to test every type of
-// required filed because the code output is basically identical to
-// optional fields for all types.
-message TestRequired {
- required int32 a = 1;
- optional int32 dummy2 = 2;
- required int32 b = 3;
-
- extend TestAllExtensions {
- optional TestRequired single = 1000;
- repeated TestRequired multi = 1001;
- }
-
- // Pad the field count to 32 so that we can test that IsInitialized()
- // properly checks multiple elements of has_bits_.
- optional int32 dummy4 = 4;
- optional int32 dummy5 = 5;
- optional int32 dummy6 = 6;
- optional int32 dummy7 = 7;
- optional int32 dummy8 = 8;
- optional int32 dummy9 = 9;
- optional int32 dummy10 = 10;
- optional int32 dummy11 = 11;
- optional int32 dummy12 = 12;
- optional int32 dummy13 = 13;
- optional int32 dummy14 = 14;
- optional int32 dummy15 = 15;
- optional int32 dummy16 = 16;
- optional int32 dummy17 = 17;
- optional int32 dummy18 = 18;
- optional int32 dummy19 = 19;
- optional int32 dummy20 = 20;
- optional int32 dummy21 = 21;
- optional int32 dummy22 = 22;
- optional int32 dummy23 = 23;
- optional int32 dummy24 = 24;
- optional int32 dummy25 = 25;
- optional int32 dummy26 = 26;
- optional int32 dummy27 = 27;
- optional int32 dummy28 = 28;
- optional int32 dummy29 = 29;
- optional int32 dummy30 = 30;
- optional int32 dummy31 = 31;
- optional int32 dummy32 = 32;
-
- required int32 c = 33;
-}
-
-message TestRequiredForeign {
- optional TestRequired optional_message = 1;
- repeated TestRequired repeated_message = 2;
- optional int32 dummy = 3;
-}
-
-// Test that we can use NestedMessage from outside TestAllTypes.
-message TestForeignNested {
- optional TestAllTypes.NestedMessage foreign_nested = 1;
-}
-
-// TestEmptyMessage is used to test unknown field support.
-message TestEmptyMessage {
-}
-
-// Like above, but declare all field numbers as potential extensions. No
-// actual extensions should ever be defined for this type.
-message TestEmptyMessageWithExtensions {
- extensions 1 to max;
-}
-
-message TestMultipleExtensionRanges {
- extensions 42;
- extensions 4143 to 4243;
- extensions 65536 to max;
-}
-
-// Test that really large tag numbers don't break anything.
-message TestReallyLargeTagNumber {
- // The largest possible tag number is 2^28 - 1, since the wire format uses
- // three bits to communicate wire type.
- optional int32 a = 1;
- optional int32 bb = 268435455;
-}
-
-message TestRecursiveMessage {
- optional TestRecursiveMessage a = 1;
- optional int32 i = 2;
-}
-
-// Test that mutual recursion works.
-message TestMutualRecursionA {
- optional TestMutualRecursionB bb = 1;
-}
-
-message TestMutualRecursionB {
- optional TestMutualRecursionA a = 1;
- optional int32 optional_int32 = 2;
-}
-
-// Test that groups have disjoint field numbers from their siblings and
-// parents. This is NOT possible in proto1; only proto2. When attempting
-// to compile with proto1, this will emit an error; so we only include it
-// in protobuf_unittest_proto.
-message TestDupFieldNumber { // NO_PROTO1
- optional int32 a = 1; // NO_PROTO1
- optional group Foo = 2 { optional int32 a = 1; } // NO_PROTO1
- optional group Bar = 3 { optional int32 a = 1; } // NO_PROTO1
-} // NO_PROTO1
-
-
-// Needed for a Python test.
-message TestNestedMessageHasBits {
- message NestedMessage {
- repeated int32 nestedmessage_repeated_int32 = 1;
- repeated ForeignMessage nestedmessage_repeated_foreignmessage = 2;
- }
- optional NestedMessage optional_nested_message = 1;
-}
-
-
-// Test an enum that has multiple values with the same number.
-enum TestEnumWithDupValue {
- option allow_alias = true;
-
- FOO1 = 1;
- BAR1 = 2;
- BAZ = 3;
- FOO2 = 1;
- BAR2 = 2;
-}
-
-// Test an enum with large, unordered values.
-enum TestSparseEnum {
- SPARSE_A = 123;
- SPARSE_B = 62374;
- SPARSE_C = 12589234;
- SPARSE_D = -15;
- SPARSE_E = -53452;
- SPARSE_F = 0;
- SPARSE_G = 2;
-}
-
-// Test message with CamelCase field names. This violates Protocol Buffer
-// standard style.
-message TestCamelCaseFieldNames {
- optional int32 PrimitiveField = 1;
- optional string StringField = 2;
- optional ForeignEnum EnumField = 3;
- optional ForeignMessage MessageField = 4;
- optional string StringPieceField = 5 [ctype=STRING_PIECE];
- optional string CordField = 6 [ctype=CORD];
-
- repeated int32 RepeatedPrimitiveField = 7;
- repeated string RepeatedStringField = 8;
- repeated ForeignEnum RepeatedEnumField = 9;
- repeated ForeignMessage RepeatedMessageField = 10;
- repeated string RepeatedStringPieceField = 11 [ctype=STRING_PIECE];
- repeated string RepeatedCordField = 12 [ctype=CORD];
-}
-
-
-// We list fields out of order, to ensure that we're using field number and not
-// field index to determine serialization order.
-message TestFieldOrderings {
- optional string my_string = 11;
- extensions 2 to 10;
- optional int64 my_int = 1;
- extensions 12 to 100;
- optional float my_float = 101;
-}
-
-
-extend TestFieldOrderings {
- optional string my_extension_string = 50;
- optional int32 my_extension_int = 5;
-}
-
-
-message TestExtremeDefaultValues {
- optional bytes escaped_bytes = 1 [default = "\0\001\a\b\f\n\r\t\v\\\'\"\xfe"];
- optional uint32 large_uint32 = 2 [default = 0xFFFFFFFF];
- optional uint64 large_uint64 = 3 [default = 0xFFFFFFFFFFFFFFFF];
- optional int32 small_int32 = 4 [default = -0x7FFFFFFF];
- optional int64 small_int64 = 5 [default = -0x7FFFFFFFFFFFFFFF];
-
- // The default value here is UTF-8 for "\u1234". (We could also just type
- // the UTF-8 text directly into this text file rather than escape it, but
- // lots of people use editors that would be confused by this.)
- optional string utf8_string = 6 [default = "\341\210\264"];
-
- // Tests for single-precision floating-point values.
- optional float zero_float = 7 [default = 0];
- optional float one_float = 8 [default = 1];
- optional float small_float = 9 [default = 1.5];
- optional float negative_one_float = 10 [default = -1];
- optional float negative_float = 11 [default = -1.5];
- // Using exponents
- optional float large_float = 12 [default = 2E8];
- optional float small_negative_float = 13 [default = -8e-28];
-
- // Text for nonfinite floating-point values.
- optional double inf_double = 14 [default = inf];
- optional double neg_inf_double = 15 [default = -inf];
- optional double nan_double = 16 [default = nan];
- optional float inf_float = 17 [default = inf];
- optional float neg_inf_float = 18 [default = -inf];
- optional float nan_float = 19 [default = nan];
-
- // Tests for C++ trigraphs.
- // Trigraphs should be escaped in C++ generated files, but they should not be
- // escaped for other languages.
- // Note that in .proto file, "\?" is a valid way to escape ? in string
- // literals.
- optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"];
-}
-
-message SparseEnumMessage {
- optional TestSparseEnum sparse_enum = 1;
-}
-
-// Test String and Bytes: string is for valid UTF-8 strings
-message OneString {
- optional string data = 1;
-}
-
-message OneBytes {
- optional bytes data = 1;
-}
-
-// Test messages for packed fields
-
-message TestPackedTypes {
- repeated int32 packed_int32 = 90 [packed = true];
- repeated int64 packed_int64 = 91 [packed = true];
- repeated uint32 packed_uint32 = 92 [packed = true];
- repeated uint64 packed_uint64 = 93 [packed = true];
- repeated sint32 packed_sint32 = 94 [packed = true];
- repeated sint64 packed_sint64 = 95 [packed = true];
- repeated fixed32 packed_fixed32 = 96 [packed = true];
- repeated fixed64 packed_fixed64 = 97 [packed = true];
- repeated sfixed32 packed_sfixed32 = 98 [packed = true];
- repeated sfixed64 packed_sfixed64 = 99 [packed = true];
- repeated float packed_float = 100 [packed = true];
- repeated double packed_double = 101 [packed = true];
- repeated bool packed_bool = 102 [packed = true];
- repeated ForeignEnum packed_enum = 103 [packed = true];
-}
-
-// A message with the same fields as TestPackedTypes, but without packing. Used
-// to test packed <-> unpacked wire compatibility.
-message TestUnpackedTypes {
- repeated int32 unpacked_int32 = 90 [packed = false];
- repeated int64 unpacked_int64 = 91 [packed = false];
- repeated uint32 unpacked_uint32 = 92 [packed = false];
- repeated uint64 unpacked_uint64 = 93 [packed = false];
- repeated sint32 unpacked_sint32 = 94 [packed = false];
- repeated sint64 unpacked_sint64 = 95 [packed = false];
- repeated fixed32 unpacked_fixed32 = 96 [packed = false];
- repeated fixed64 unpacked_fixed64 = 97 [packed = false];
- repeated sfixed32 unpacked_sfixed32 = 98 [packed = false];
- repeated sfixed64 unpacked_sfixed64 = 99 [packed = false];
- repeated float unpacked_float = 100 [packed = false];
- repeated double unpacked_double = 101 [packed = false];
- repeated bool unpacked_bool = 102 [packed = false];
- repeated ForeignEnum unpacked_enum = 103 [packed = false];
-}
-
-message TestPackedExtensions {
- extensions 1 to max;
-}
-
-extend TestPackedExtensions {
- repeated int32 packed_int32_extension = 90 [packed = true];
- repeated int64 packed_int64_extension = 91 [packed = true];
- repeated uint32 packed_uint32_extension = 92 [packed = true];
- repeated uint64 packed_uint64_extension = 93 [packed = true];
- repeated sint32 packed_sint32_extension = 94 [packed = true];
- repeated sint64 packed_sint64_extension = 95 [packed = true];
- repeated fixed32 packed_fixed32_extension = 96 [packed = true];
- repeated fixed64 packed_fixed64_extension = 97 [packed = true];
- repeated sfixed32 packed_sfixed32_extension = 98 [packed = true];
- repeated sfixed64 packed_sfixed64_extension = 99 [packed = true];
- repeated float packed_float_extension = 100 [packed = true];
- repeated double packed_double_extension = 101 [packed = true];
- repeated bool packed_bool_extension = 102 [packed = true];
- repeated ForeignEnum packed_enum_extension = 103 [packed = true];
-}
-
-// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
-// a set of extensions to TestAllExtensions dynamically, based on the fields
-// of this message type.
-message TestDynamicExtensions {
- enum DynamicEnumType {
- DYNAMIC_FOO = 2200;
- DYNAMIC_BAR = 2201;
- DYNAMIC_BAZ = 2202;
- }
- message DynamicMessageType {
- optional int32 dynamic_field = 2100;
- }
-
- optional fixed32 scalar_extension = 2000;
- optional ForeignEnum enum_extension = 2001;
- optional DynamicEnumType dynamic_enum_extension = 2002;
-
- optional ForeignMessage message_extension = 2003;
- optional DynamicMessageType dynamic_message_extension = 2004;
-
- repeated string repeated_extension = 2005;
- repeated sint32 packed_extension = 2006 [packed = true];
-}
-
-message TestRepeatedScalarDifferentTagSizes {
- // Parsing repeated fixed size values used to fail. This message needs to be
- // used in order to get a tag of the right size; all of the repeated fields
- // in TestAllTypes didn't trigger the check.
- repeated fixed32 repeated_fixed32 = 12;
- // Check for a varint type, just for good measure.
- repeated int32 repeated_int32 = 13;
-
- // These have two-byte tags.
- repeated fixed64 repeated_fixed64 = 2046;
- repeated int64 repeated_int64 = 2047;
-
- // Three byte tags.
- repeated float repeated_float = 262142;
- repeated uint64 repeated_uint64 = 262143;
-}
-
-
-// Test that RPC services work.
-message FooRequest {}
-message FooResponse {}
-
-service TestService {
- rpc Foo(FooRequest) returns (FooResponse);
- rpc Bar(BarRequest) returns (BarResponse);
-}
-
-
-message BarRequest {}
-message BarResponse {}
diff --git a/test/protos/google/protobuf/unittest_import.proto b/test/protos/google/protobuf/unittest_import.proto
deleted file mode 100644
index 1e64320..0000000
--- a/test/protos/google/protobuf/unittest_import.proto
+++ /dev/null
@@ -1,62 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// A proto file which is imported by unittest.proto to test importing.
-// We don't put this in a package within proto2 because we need to make sure
-// that the generated code doesn't depend on being in the proto2 namespace.
-// In test_util.h we do
-// "using namespace unittest_import = protobuf_unittest_import".
-
-syntax = "proto2";
-
-package protobuf_unittest_import;
-
-option optimize_for = SPEED;
-
-// Excercise the java_package option.
-option java_package = "com.google.protobuf.test";
-
-// Do not set a java_outer_classname here to verify that Proto2 works without
-// one.
-
-message ImportMessage {
- optional int32 d = 1;
-}
-
-enum ImportEnum {
- IMPORT_FOO = 7;
- IMPORT_BAR = 8;
- IMPORT_BAZ = 9;
-}
-
diff --git a/test/protos/google/protobuf/unittest_optimize_for.proto b/test/protos/google/protobuf/unittest_optimize_for.proto
deleted file mode 100644
index 2b36c60..0000000
--- a/test/protos/google/protobuf/unittest_optimize_for.proto
+++ /dev/null
@@ -1,63 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// A proto file which uses optimize_for = CODE_SIZE.
-
-syntax = "proto2";
-
-import "google/protobuf/unittest.proto";
-
-package protobuf_unittest;
-
-option optimize_for = CODE_SIZE;
-
-message TestOptimizedForSize {
- optional int32 i = 1;
- optional ForeignMessage msg = 19;
-
- extensions 1000 to max;
-
- extend TestOptimizedForSize {
- optional int32 test_extension = 1234;
- optional TestRequiredOptimizedForSize test_extension2 = 1235;
- }
-}
-
-message TestRequiredOptimizedForSize {
- required int32 x = 1;
-}
-
-message TestOptionalOptimizedForSize {
- optional TestRequiredOptimizedForSize o = 1;
-}
diff --git a/test/protos/import_clash.proto b/test/protos/import_clash.proto
deleted file mode 100644
index ae9ecd9..0000000
--- a/test/protos/import_clash.proto
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-import "foo.proto";
-
-package import_clash;
-
-message Clasher {
- required foo.Foo foo = 1;
-}
diff --git a/test/protos/map_api.proto b/test/protos/map_api.proto
deleted file mode 100644
index 5a3ddb4..0000000
--- a/test/protos/map_api.proto
+++ /dev/null
@@ -1,19 +0,0 @@
-syntax = "proto2";
-
-package protobuf_unittest;
-
-import "dart_options.proto";
-
-message Rec {
- option (dart_options.mixin) = "PbMapMixin";
-
- optional int32 num = 1;
- repeated int32 nums = 2;
- optional string str = 3;
- optional NonMap msg = 4;
-}
-
-message NonMap {
- optional string str = 1;
- optional NonMap child = 2;
-}
diff --git a/test/protos/map_api2.proto b/test/protos/map_api2.proto
deleted file mode 100644
index 509904d..0000000
--- a/test/protos/map_api2.proto
+++ /dev/null
@@ -1,17 +0,0 @@
-syntax = "proto2";
-
-package protobuf_unittest;
-
-import "dart_options.proto";
-
-option (dart_options.default_mixin) = "PbMapMixin";
-
-message Rec2 {
- optional int32 num = 1;
- repeated int32 nums = 2;
- optional string str = 3;
-}
-
-message NonMap2 {
- option (dart_options.mixin) = "";
-}
diff --git a/test/protos/map_field.proto b/test/protos/map_field.proto
deleted file mode 100644
index d5af64f..0000000
--- a/test/protos/map_field.proto
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package protobuf_unittest;
-
-message TestMap {
- message MessageValue {
- optional int32 value = 1;
- optional int32 secondValue = 2 [default = 42];
- }
-
- enum EnumValue {
- FOO = 0;
- BAR = 1;
- BAZ = 2;
- ZOP = 3;
- }
-
- map<int32, int32> int32_to_int32_field = 1;
- map<int32, string> int32_to_string_field = 2;
- map<int32, bytes> int32_to_bytes_field = 3;
- map<int32, EnumValue> int32_to_enum_field = 4;
- map<int32, MessageValue> int32_to_message_field = 5;
- map<string, int32> string_to_int32_field = 6;
- map<uint32, int32> uint32_to_int32_field = 7;
- map<int64, int32> int64_to_int32_field = 8;
-}
-
-message Inner {
- map<string, string> inner_map = 1;
-}
-
-message Outer {
- optional Inner i = 1;
-}
diff --git a/test/protos/mixins.proto b/test/protos/mixins.proto
deleted file mode 100644
index 9395e52..0000000
--- a/test/protos/mixins.proto
+++ /dev/null
@@ -1,51 +0,0 @@
-syntax = "proto2";
-
-import "dart_options.proto";
-
-option (dart_options.imports) = {
- mixins: [{
- name: "Mixin1"
- import_from: "package:protoc_plugin/testing/mixins.dart"
- },
- {
- name: "Mixin2"
- import_from: "package:protoc_plugin/testing/mixins.dart"
- },
- {
- name: "Mixin3"
- import_from: "package:protoc_plugin/testing/mixins.dart"
- parent: "Mixin1"
- }];
-};
-
-option (dart_options.default_mixin) = "Mixin1";
-
-message NoMixinPB {
- option (dart_options.mixin) = "";
-}
-
-message Mixin1PB {
- optional string interface_string = 1 [
- (dart_options.override_getter) = true,
- (dart_options.override_setter) = true,
- (dart_options.override_has_method) = true
- ];
-}
-
-message Mixin2PB {
- option (dart_options.mixin) = "Mixin2";
-
- optional string overridden_has_method = 3 [
- (dart_options.override_has_method) = true
- ];
-}
-
-message Mixin3PB {
- option (dart_options.mixin) = "Mixin3";
-
- optional string interface_string = 1 [
- (dart_options.override_getter) = true,
- (dart_options.override_setter) = true,
- (dart_options.override_has_method) = true
- ];
-}
diff --git a/test/protos/multiple_files_test.proto b/test/protos/multiple_files_test.proto
deleted file mode 100644
index 19414e5..0000000
--- a/test/protos/multiple_files_test.proto
+++ /dev/null
@@ -1,72 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-//
-// A proto file which tests the java_multiple_files option.
-
-syntax = "proto2";
-
-// Some generic_services option(s) added automatically.
-// See: http://go/proto2-generic-services-default
-option java_generic_services = true; // auto-added
-
-import "google/protobuf/unittest.proto";
-
-package protobuf_unittest;
-
-option java_multiple_files = true;
-option java_outer_classname = "MultipleFilesTestProto";
-
-message MessageWithNoOuter {
- message NestedMessage {
- optional int32 i = 1;
- }
- enum NestedEnum {
- BAZ = 3;
- }
- optional NestedMessage nested = 1;
- repeated TestAllTypes foreign = 2;
- optional NestedEnum nested_enum = 3;
- optional EnumWithNoOuter foreign_enum = 4;
-}
-
-enum EnumWithNoOuter {
- FOO = 1;
- BAR = 2;
-}
-
-service ServiceWithNoOuter {
- rpc Foo(MessageWithNoOuter) returns(TestAllTypes);
-}
-
-extend TestAllExtensions {
- optional int32 extension_with_outer = 1234567;
-}
diff --git a/test/protos/nested_extension.proto b/test/protos/nested_extension.proto
deleted file mode 100644
index 4478006..0000000
--- a/test/protos/nested_extension.proto
+++ /dev/null
@@ -1,46 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: Darick Tong (darick@google.com)
-//
-// A proto file with nested extensions. Note that this must be defined in
-// a separate file to properly test the initialization of the outer class.
-
-syntax = "proto2";
-
-import "non_nested_extension.proto";
-
-package protobuf_unittest;
-
-message MyNestedExtension {
- extend MessageToBeExtended {
- optional MessageToBeExtended recursiveExtension = 2;
- }
-}
diff --git a/test/protos/non_nested_extension.proto b/test/protos/non_nested_extension.proto
deleted file mode 100644
index c3cdb95..0000000
--- a/test/protos/non_nested_extension.proto
+++ /dev/null
@@ -1,49 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: Darick Tong (darick@google.com)
-//
-// A proto file with extensions.
-
-syntax = "proto2";
-
-package protobuf_unittest;
-
-message MessageToBeExtended {
- extensions 1 to max;
-}
-
-message MyNonNestedExtension {
-}
-
-extend MessageToBeExtended {
- optional MyNonNestedExtension nonNestedExtension = 1;
-}
-
diff --git a/test/protos/package1.proto b/test/protos/package1.proto
deleted file mode 100644
index 7578110..0000000
--- a/test/protos/package1.proto
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package pkg1;
-
-message M {
- message M {
- optional int32 x = 1;
- }
- optional int32 a = 1;
- optional string b = 2;
-}
diff --git a/test/protos/package2.proto b/test/protos/package2.proto
deleted file mode 100644
index e8c7133..0000000
--- a/test/protos/package2.proto
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package pkg1.pkg2;
-
-message M {
- message M {
- optional int32 x = 1;
- }
- optional int32 a = 1;
- optional string b = 2;
-}
diff --git a/test/protos/package3.proto b/test/protos/package3.proto
deleted file mode 100644
index d650ef2..0000000
--- a/test/protos/package3.proto
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package pkg1_pkg2;
-
-message M {
- message M {
- optional int32 x = 1;
- }
- optional int32 a = 1;
- optional string b = 2;
-}
diff --git a/test/protos/reserved_names.proto b/test/protos/reserved_names.proto
deleted file mode 100644
index fcee7c5..0000000
--- a/test/protos/reserved_names.proto
+++ /dev/null
@@ -1,253 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package protobuf_unittest;
-
-message ReservedNamesOptional {
- // Conflicts with Object.
- optional int32 hash_code = 1;
- optional int32 no_such_method = 2;
- optional int32 runtime_type = 3;
- optional int32 to_string = 4;
-
- // Conflicts with GeneratedMessage.
- optional int32 from_buffer = 10;
- optional int32 from_json = 11;
- optional int32 has_required_fields = 12;
- optional int32 is_initialized = 13;
- optional int32 clear = 14;
- optional int32 get_tag_number = 15;
- optional int32 check = 16;
- optional int32 write_to_buffer = 17;
- optional int32 write_to_coded_buffer_writer = 18;
- optional int32 merge_from_coded_buffer_reader = 19;
- optional int32 merge_from_buffer = 20;
- optional int32 write_to_json = 21;
- optional int32 merge_from_json = 22;
- optional int32 add_extension = 23;
- optional int32 get_extension = 24;
- optional int32 set_extension = 25;
- optional int32 has_extension = 26;
- optional int32 clear_extension = 27;
- optional int32 get_field = 28;
- optional int32 set_field = 29;
- optional int32 has_field = 30;
- optional int32 clear_field = 31;
- optional int32 extensions_are_initialized = 32;
- optional int32 merge_from_message = 33;
- optional int32 merge_unknown_fields = 34;
-
- // Other conflicts.
- optional int32 hash_code_1 = 40;
- optional int32 create = 41;
- optional int32 create_repeated = 42;
-
- optional int32 x = 50;
- optional int32 has_x = 51;
- optional int32 clear_x = 53;
- optional int32 has_x_51 = 54;
- optional int32 clear_x_53 = 55;
-}
-
-message ReservedNamesRepeated {
- // Conflicts with Object.
- repeated int32 hash_code = 1;
- repeated int32 no_such_method = 2;
- repeated int32 runtime_type = 3;
- repeated int32 to_string = 4;
-
- // Conflicts with GeneratedMessage.
- repeated int32 from_buffer = 10;
- repeated int32 from_json = 11;
- repeated int32 has_required_fields = 12;
- repeated int32 is_initialized = 13;
- repeated int32 clear = 14;
- repeated int32 get_tag_number = 15;
- repeated int32 check = 16;
- repeated int32 write_to_buffer = 17;
- repeated int32 write_to_coded_buffer_writer = 18;
- repeated int32 merge_from_coded_buffer_reader = 19;
- repeated int32 merge_from_buffer = 20;
- repeated int32 write_to_json = 21;
- repeated int32 merge_from_json = 22;
- repeated int32 add_extension = 23;
- repeated int32 get_extension = 24;
- repeated int32 set_extension = 25;
- repeated int32 has_extension = 26;
- repeated int32 clear_extension = 27;
- repeated int32 get_field = 28;
- repeated int32 set_field = 29;
- repeated int32 has_field = 30;
- repeated int32 clear_field = 31;
- repeated int32 extensions_are_initialized = 32;
- repeated int32 merge_from_message = 33;
- repeated int32 merge_unknown_fields = 34;
-
- // Other conflicts.
- repeated int32 hash_code_1 = 40;
- repeated int32 create = 41;
- repeated int32 create_repeated = 42;
-
- repeated int32 x = 50;
- repeated int32 has_x = 51;
- repeated int32 clear_x = 53;
- repeated int32 has_x_51 = 54;
- repeated int32 clear_x_53 = 55;
-}
-
-message ReservedNamesRequired {
- // Conflicts with Object.
- required int32 hash_code = 1;
- required int32 no_such_method = 2;
- required int32 runtime_type = 3;
- required int32 to_string = 4;
-
- // Conflicts with GeneratedMessage.
- required int32 from_buffer = 10;
- required int32 from_json = 11;
- required int32 has_required_fields = 12;
- required int32 is_initialized = 13;
- required int32 clear = 14;
- required int32 get_tag_number = 15;
- required int32 check = 16;
- required int32 write_to_buffer = 17;
- required int32 write_to_coded_buffer_writer = 18;
- required int32 merge_from_coded_buffer_reader = 19;
- required int32 merge_from_buffer = 20;
- required int32 write_to_json = 21;
- required int32 merge_from_json = 22;
- required int32 add_extension = 23;
- required int32 get_extension = 24;
- required int32 set_extension = 25;
- required int32 has_extension = 26;
- required int32 clear_extension = 27;
- required int32 get_field = 28;
- required int32 set_field = 29;
- required int32 has_field = 30;
- required int32 clear_field = 31;
- required int32 extensions_are_initialized = 32;
- required int32 merge_from_message = 33;
- required int32 merge_unknown_fields = 34;
-
- // Other conflicts.
- required int32 hash_code_1 = 40;
- required int32 create = 41;
- required int32 create_repeated = 42;
-
- required int32 x = 50;
- required int32 has_x = 51;
- required int32 clear_x = 53;
- required int32 has_x_51 = 54;
- required int32 clear_x_53 = 55;
-}
-
-message ReservedWordsOptional {
- optional int32 assert = 1;
- optional int32 break = 2;
- optional int32 case = 3;
- optional int32 catch = 4;
- optional int32 class = 5;
- optional int32 const = 6;
- optional int32 continue = 7;
- optional int32 default = 8;
- optional int32 do = 9;
- optional int32 else = 10;
- optional int32 enum = 11;
- optional int32 extends = 12;
- optional int32 false = 13;
- optional int32 final = 14;
- optional int32 finally = 15;
- optional int32 for = 16;
- optional int32 if = 17;
- optional int32 in = 18;
- optional int32 is = 19;
- optional int32 new = 20;
- optional int32 null = 21;
- optional int32 rethrow = 22;
- optional int32 return = 23;
- optional int32 super = 24;
- optional int32 switch = 25;
- optional int32 this = 26;
- optional int32 throw = 27;
- optional int32 true = 28;
- optional int32 try = 29;
- optional int32 var = 30;
- optional int32 void = 31;
- optional int32 while = 32;
- optional int32 with = 33;
-}
-
-message ReservedWordsRepeated {
- repeated int32 assert = 1;
- repeated int32 break = 2;
- repeated int32 case = 3;
- repeated int32 catch = 4;
- repeated int32 class = 5;
- repeated int32 const = 6;
- repeated int32 continue = 7;
- repeated int32 default = 8;
- repeated int32 do = 9;
- repeated int32 else = 10;
- repeated int32 enum = 11;
- repeated int32 extends = 12;
- repeated int32 false = 13;
- repeated int32 final = 14;
- repeated int32 finally = 15;
- repeated int32 for = 16;
- repeated int32 if = 17;
- repeated int32 in = 18;
- repeated int32 is = 19;
- repeated int32 new = 20;
- repeated int32 null = 21;
- repeated int32 rethrow = 22;
- repeated int32 return = 23;
- repeated int32 super = 24;
- repeated int32 switch = 25;
- repeated int32 this = 26;
- repeated int32 throw = 27;
- repeated int32 true = 28;
- repeated int32 try = 29;
- repeated int32 var = 30;
- repeated int32 void = 31;
- repeated int32 while = 32;
- repeated int32 with = 33;
-}
-
-message ReservedWordsRequired {
- required int32 assert = 1;
- required int32 break = 2;
- required int32 case = 3;
- required int32 catch = 4;
- required int32 class = 5;
- required int32 const = 6;
- required int32 continue = 7;
- required int32 default = 8;
- required int32 do = 9;
- required int32 else = 10;
- required int32 enum = 11;
- required int32 extends = 12;
- required int32 false = 13;
- required int32 final = 14;
- required int32 finally = 15;
- required int32 for = 16;
- required int32 if = 17;
- required int32 in = 18;
- required int32 is = 19;
- required int32 new = 20;
- required int32 null = 21;
- required int32 rethrow = 22;
- required int32 return = 23;
- required int32 super = 24;
- required int32 switch = 25;
- required int32 this = 26;
- required int32 throw = 27;
- required int32 true = 28;
- required int32 try = 29;
- required int32 var = 30;
- required int32 void = 31;
- required int32 while = 32;
- required int32 with = 33;
-}
diff --git a/test/protos/service.proto b/test/protos/service.proto
deleted file mode 100644
index 6cbb64a..0000000
--- a/test/protos/service.proto
+++ /dev/null
@@ -1,16 +0,0 @@
-syntax = "proto2";
-
-import "service2.proto";
-
-message SearchRequest {
- optional string query = 1;
-}
-
-message SearchResponse {
- repeated string result = 1;
-}
-
-service SearchService {
- rpc Search (SearchRequest) returns (SearchResponse);
- rpc Search2 (service2.SearchRequest) returns (service2.SearchResponse);
-}
diff --git a/test/protos/service2.proto b/test/protos/service2.proto
deleted file mode 100644
index 18a2bbb..0000000
--- a/test/protos/service2.proto
+++ /dev/null
@@ -1,13 +0,0 @@
-syntax = "proto2";
-
-package service2;
-
-import "service3.proto";
-
-message SearchRequest {
- optional string query = 1;
-}
-
-message SearchResponse {
- repeated service3.SearchResult results = 1;
-}
diff --git a/test/protos/service3.proto b/test/protos/service3.proto
deleted file mode 100644
index d5a5ce9..0000000
--- a/test/protos/service3.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-syntax = "proto2";
-
-package service3;
-
-message SearchResult {
- optional string url = 1;
- optional string snippet = 2;
-}
diff --git a/test/protos/toplevel.proto b/test/protos/toplevel.proto
deleted file mode 100644
index b15f091..0000000
--- a/test/protos/toplevel.proto
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-message T {
- optional int32 a = 1;
- optional string b = 2;
-}
diff --git a/test/protos/toplevel_import.proto b/test/protos/toplevel_import.proto
deleted file mode 100644
index b025a2a..0000000
--- a/test/protos/toplevel_import.proto
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto2";
-
-package toplevel.import;
-
-import "toplevel.proto";
-
-message M {
- optional T t = 1;
-}
-
-service S {
- rpc Foo (T) returns (M);
-}
diff --git a/test/protos/using_any.proto b/test/protos/using_any.proto
deleted file mode 100644
index 8cfd0cb..0000000
--- a/test/protos/using_any.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-syntax = "proto3";
-
-package protobuf_unittest;
-
-import "google/protobuf/any.proto";
-
-message TestAny {
- int32 int32_value = 1;
- google.protobuf.Any any_value = 2;
- repeated google.protobuf.Any repeated_any_value = 3;
-}
-
-message Container {
- message Nested {
- int32 int32_value = 1;
- }
-}
diff --git a/test/repeated_field_test.dart b/test/repeated_field_test.dart
deleted file mode 100644
index 77e97ed..0000000
--- a/test/repeated_field_test.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library repeated_field_test;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-import 'test_util.dart';
-
-// Suppress an analyzer warning for a deliberate type mismatch.
-cast(x) => x;
-
-void main() {
- test("checkItems works for messages", () {
- expect(() {
- TestAllTypes.$checkItem(new TestAllTypes());
- }, returnsNormally);
-
- expect(() {
- TestAllTypes.$checkItem(cast(new TestAllTypes_NestedMessage()));
- }, throwsATypeError);
- });
-
- test("checkItems works for groups", () {
- expect(() {
- TestAllTypes_RepeatedGroup.$checkItem(new TestAllTypes_RepeatedGroup());
- }, returnsNormally);
-
- expect(() {
- TestAllTypes_RepeatedGroup.$checkItem(
- cast(new TestAllTypes_OptionalGroup()));
- }, throwsATypeError);
- });
-
- test("checkItems works for enums", () {
- expect(() {
- TestAllTypes_NestedEnum.$checkItem(TestAllTypes_NestedEnum.FOO);
- }, returnsNormally);
-
- expect(() {
- TestAllTypes_NestedEnum.$checkItem(cast(ForeignEnum.FOREIGN_FOO));
- }, throwsATypeError);
- });
-
- test("check properties are initialized for repeated fields", () {
- var msg = new TestAllTypes();
- expect(
- (msg.info_.byName["repeatedNestedMessage"]
- as FieldInfo<TestAllTypes_NestedMessage>)
- .check,
- same(TestAllTypes_NestedMessage.$checkItem));
-
- expect(
- (msg.info_.byName["repeatedGroup"]
- as FieldInfo<TestAllTypes_RepeatedGroup>)
- .check,
- same(TestAllTypes_RepeatedGroup.$checkItem));
-
- expect(
- (msg.info_.byName["repeatedNestedEnum"]
- as FieldInfo<TestAllTypes_NestedEnum>)
- .check,
- same(TestAllTypes_NestedEnum.$checkItem));
- });
-}
diff --git a/test/service_generator_test.dart b/test/service_generator_test.dart
deleted file mode 100644
index ca15923..0000000
--- a/test/service_generator_test.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library service_generator_test;
-
-import 'package:protoc_plugin/indenting_writer.dart';
-import 'package:protoc_plugin/protoc.dart';
-import 'package:test/test.dart';
-import 'service_util.dart';
-
-import 'golden_file.dart';
-
-void main() {
- test('testServiceGenerator', () {
- var options = new GenerationOptions();
- var fd = buildFileDescriptor(
- "testpkg", "testpkg.proto", ["SomeRequest", "SomeReply"]);
- fd.service.add(buildServiceDescriptor());
- var fg = new FileGenerator(fd, options);
-
- var fd2 = buildFileDescriptor(
- "foo.bar", "foobar.proto", ["EmptyMessage", "AnotherReply"]);
- var fg2 = new FileGenerator(fd2, options);
-
- link(new GenerationOptions(), [fg, fg2]);
-
- var serviceWriter = new IndentingWriter();
- fg.serviceGenerators[0].generate(serviceWriter);
- expectMatchesGoldenFile(
- serviceWriter.toString(), 'test/goldens/serviceGenerator');
- expectMatchesGoldenFile(
- fg.generateJsonFile(), 'test/goldens/serviceGenerator.pb.json');
- });
-}
diff --git a/test/service_test.dart b/test/service_test.dart
deleted file mode 100644
index 82b52c0..0000000
--- a/test/service_test.dart
+++ /dev/null
@@ -1,121 +0,0 @@
-library service_test;
-
-import 'dart:async' show Future;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:protoc_plugin/src/descriptor.pb.dart'
- show DescriptorProto, ServiceDescriptorProto;
-import 'package:test/test.dart';
-
-import '../out/protos/service.pbserver.dart' as pb;
-import '../out/protos/service2.pb.dart' as pb2;
-import '../out/protos/service3.pb.dart' as pb3;
-
-class SearchService extends pb.SearchServiceBase {
- Future<pb.SearchResponse> search(
- ServerContext ctx, pb.SearchRequest request) async {
- var out = new pb.SearchResponse();
- if (request.query == 'hello' || request.query == 'world') {
- out.result.add('hello, world!');
- }
- return out;
- }
-
- Future<pb2.SearchResponse> search2(
- ServerContext ctx, pb2.SearchRequest request) async {
- var out = new pb2.SearchResponse();
- if (request.query == '2') {
- var result = new pb3.SearchResult()
- ..url = 'http://example.com/'
- ..snippet = 'hello world (2)!';
- out.results.add(result);
- }
- return out;
- }
-}
-
-class FakeJsonServer {
- final GeneratedService searchService;
- FakeJsonServer(this.searchService);
-
- Future<String> messageHandler(
- String serviceName, String methodName, String requestJson) async {
- if (serviceName == 'SearchService') {
- GeneratedMessage request = searchService.createRequest(methodName);
- request.mergeFromJson(requestJson);
- var ctx = new ServerContext();
- var reply = await searchService.handleCall(ctx, methodName, request);
- return reply.writeToJson();
- } else {
- throw 'unknown service: $serviceName';
- }
- }
-}
-
-class FakeJsonClient implements RpcClient {
- final FakeJsonServer server;
-
- FakeJsonClient(this.server);
-
- Future<T> invoke<T extends GeneratedMessage>(
- ClientContext ctx,
- String serviceName,
- String methodName,
- GeneratedMessage request,
- T response) async {
- String requestJson = request.writeToJson();
- String replyJson =
- await server.messageHandler(serviceName, methodName, requestJson);
- response.mergeFromJson(replyJson);
- return response;
- }
-}
-
-void main() {
- var service = new SearchService();
- var server = new FakeJsonServer(service);
- var api = new pb.SearchServiceApi(new FakeJsonClient(server));
-
- test('end to end RPC using JSON', () async {
- var request = new pb.SearchRequest()..query = 'hello';
- var reply = await api.search(new ClientContext(), request);
- expect(reply.result, ['hello, world!']);
- });
-
- test('end to end RPC using message from a different package', () async {
- var request = new pb2.SearchRequest()..query = "2";
- var reply = await api.search2(new ClientContext(), request);
- expect(reply.results.length, 1);
- expect(reply.results[0].url, 'http://example.com/');
- expect(reply.results[0].snippet, 'hello world (2)!');
- });
-
- test('can read service descriptor from JSON', () {
- var descriptor = new ServiceDescriptorProto()
- ..mergeFromJsonMap(service.$json);
- expect(descriptor.name, "SearchService");
- var methodNames = descriptor.method.map((m) => m.name).toList();
- expect(methodNames, ["Search", "Search2"]);
- });
-
- test('can read message descriptors from JSON', () {
- var map = service.$messageJson;
- expect(map.keys, [
- '.SearchRequest',
- '.SearchResponse',
- '.service2.SearchRequest',
- '.service2.SearchResponse',
- '.service3.SearchResult',
- ]);
-
- String readMessageName(fqname) {
- var json = map[fqname];
- var descriptor = new DescriptorProto()..mergeFromJsonMap(json);
- return descriptor.name;
- }
-
- expect(readMessageName('.SearchRequest'), "SearchRequest");
- expect(readMessageName('.service2.SearchRequest'), "SearchRequest");
- expect(readMessageName('.service3.SearchResult'), "SearchResult");
- });
-}
diff --git a/test/service_util.dart b/test/service_util.dart
deleted file mode 100644
index 0f8ffec..0000000
--- a/test/service_util.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library service_util;
-
-import 'package:protoc_plugin/src/descriptor.pb.dart';
-
-ServiceDescriptorProto buildServiceDescriptor() {
- ServiceDescriptorProto sd = new ServiceDescriptorProto()
- ..name = 'Test'
- ..method.addAll([
- new MethodDescriptorProto()
- ..name = 'AMethod'
- ..inputType = '.testpkg.SomeRequest'
- ..outputType = '.testpkg.SomeReply',
- new MethodDescriptorProto()
- ..name = 'AnotherMethod'
- ..inputType = '.foo.bar.EmptyMessage'
- ..outputType = '.foo.bar.AnotherReply',
- ]);
- return sd;
-}
-
-FileDescriptorProto buildFileDescriptor(
- String package, String fileUri, List<String> messages) {
- var fd = new FileDescriptorProto()
- ..package = package
- ..name = fileUri;
- for (var name in messages) {
- var md = new DescriptorProto()..name = name;
-
- fd.messageType.add(md);
- }
- return fd;
-}
diff --git a/test/test_util.dart b/test/test_util.dart
deleted file mode 100644
index b30ae40..0000000
--- a/test/test_util.dart
+++ /dev/null
@@ -1,1824 +0,0 @@
-// Copyright(c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test_util;
-
-import 'package:fixnum/fixnum.dart';
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest_import.pb.dart';
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-final Matcher throwsATypeError = throwsA(new TypeMatcher<TypeError>());
-
-Int64 make64(lo, [hi = null]) {
- if (hi == null) hi = lo < 0 ? -1 : 0;
- return new Int64.fromInts(hi, lo);
-}
-
-expect64(lo, [hi = null]) {
- final Int64 expected = make64(lo, hi);
- return predicate((Int64 actual) => actual == expected);
-}
-
-void assertAllExtensionsSet(TestAllExtensions message) {
- // TODO(antonm): introduce hasExtension matcher and other domain
- // specific ones.
- expect(message.hasExtension(Unittest.optionalInt32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalInt64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalUint32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalUint64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSint32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSint64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSfixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSfixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFloatExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalDoubleExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalBoolExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalStringExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalBytesExtension), isTrue);
-
- expect(message.hasExtension(Unittest.optionalGroupExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalNestedMessageExtension), isTrue);
- expect(
- message.hasExtension(Unittest.optionalForeignMessageExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalImportMessageExtension), isTrue);
-
- expect(message.getExtension(Unittest.optionalGroupExtension).hasA(), isTrue);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),
- isTrue);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),
- isTrue);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).hasD(),
- isTrue);
-
- expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalImportEnumExtension), isTrue);
-
- expect(message.hasExtension(Unittest.optionalStringPieceExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalCordExtension), isTrue);
-
- expect(message.getExtension(Unittest.optionalInt32Extension), 101);
- expect(message.getExtension(Unittest.optionalInt64Extension), expect64(102));
- expect(message.getExtension(Unittest.optionalUint32Extension), 103);
- expect(message.getExtension(Unittest.optionalUint64Extension), expect64(104));
- expect(message.getExtension(Unittest.optionalSint32Extension), 105);
- expect(message.getExtension(Unittest.optionalSint64Extension), expect64(106));
- expect(message.getExtension(Unittest.optionalFixed32Extension), 107);
- expect(
- message.getExtension(Unittest.optionalFixed64Extension), expect64(108));
- expect(message.getExtension(Unittest.optionalSfixed32Extension), 109);
- expect(
- message.getExtension(Unittest.optionalSfixed64Extension), expect64(110));
- expect(message.getExtension(Unittest.optionalFloatExtension), 111.0);
- expect(message.getExtension(Unittest.optionalDoubleExtension), 112.0);
- expect(message.getExtension(Unittest.optionalBoolExtension), true);
- expect(message.getExtension(Unittest.optionalStringExtension), '115');
- expect(
- message.getExtension(Unittest.optionalBytesExtension), '116'.codeUnits);
-
- expect(message.getExtension(Unittest.optionalGroupExtension).a, 117);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 118);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 119);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 120);
-
- expect(message.getExtension(Unittest.optionalNestedEnumExtension),
- TestAllTypes_NestedEnum.BAZ);
- expect(message.getExtension(Unittest.optionalForeignEnumExtension),
- ForeignEnum.FOREIGN_BAZ);
- expect(message.getExtension(Unittest.optionalImportEnumExtension),
- ImportEnum.IMPORT_BAZ);
-
- expect(message.getExtension(Unittest.optionalStringPieceExtension), '124');
- expect(message.getExtension(Unittest.optionalCordExtension), '125');
-
- // -----------------------------------------------------------------
-
- expect(message.getExtension(Unittest.repeatedInt32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedInt64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedUint32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedUint64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSint32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSint64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFloatExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedBoolExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedStringExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedBytesExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedCordExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedInt32Extension)[0], 201);
- expect(
- message.getExtension(Unittest.repeatedInt64Extension)[0], expect64(202));
- expect(message.getExtension(Unittest.repeatedUint32Extension)[0], 203);
- expect(
- message.getExtension(Unittest.repeatedUint64Extension)[0], expect64(204));
- expect(message.getExtension(Unittest.repeatedSint32Extension)[0], 205);
- expect(
- message.getExtension(Unittest.repeatedSint64Extension)[0], expect64(206));
- expect(message.getExtension(Unittest.repeatedFixed32Extension)[0], 207);
- expect(message.getExtension(Unittest.repeatedFixed64Extension)[0],
- expect64(208));
- expect(message.getExtension(Unittest.repeatedSfixed32Extension)[0], 209);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension)[0],
- expect64(210));
- expect(message.getExtension(Unittest.repeatedFloatExtension)[0], 211.0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension)[0], 212.0);
- expect(message.getExtension(Unittest.repeatedBoolExtension)[0], true);
- expect(message.getExtension(Unittest.repeatedStringExtension)[0], '215');
- expect(message.getExtension(Unittest.repeatedBytesExtension)[0],
- '216'.codeUnits);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension)[0].a, 217);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension)[0].bb, 218);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension)[0].c, 219);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension)[0].d, 220);
-
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension)[0],
- TestAllTypes_NestedEnum.BAR);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension)[0],
- ForeignEnum.FOREIGN_BAR);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension)[0],
- ImportEnum.IMPORT_BAR);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension)[0], '224');
- expect(message.getExtension(Unittest.repeatedCordExtension)[0], '225');
-
- expect(message.getExtension(Unittest.repeatedInt32Extension)[1], 301);
- expect(
- message.getExtension(Unittest.repeatedInt64Extension)[1], expect64(302));
- expect(message.getExtension(Unittest.repeatedUint32Extension)[1], 303);
- expect(
- message.getExtension(Unittest.repeatedUint64Extension)[1], expect64(304));
- expect(message.getExtension(Unittest.repeatedSint32Extension)[1], 305);
- expect(
- message.getExtension(Unittest.repeatedSint64Extension)[1], expect64(306));
- expect(message.getExtension(Unittest.repeatedFixed32Extension)[1], 307);
- expect(message.getExtension(Unittest.repeatedFixed64Extension)[1],
- expect64(308));
- expect(message.getExtension(Unittest.repeatedSfixed32Extension)[1], 309);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension)[1],
- expect64(310));
- expect(message.getExtension(Unittest.repeatedFloatExtension)[1], 311.0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension)[1], 312.0);
- expect(message.getExtension(Unittest.repeatedBoolExtension)[1], false);
- expect(message.getExtension(Unittest.repeatedStringExtension)[1], '315');
- expect(message.getExtension(Unittest.repeatedBytesExtension)[1],
- '316'.codeUnits);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension)[1].a, 317);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension)[1].bb, 318);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension)[1].c, 319);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension)[1].d, 320);
-
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension)[1],
- TestAllTypes_NestedEnum.BAZ);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension)[1],
- ForeignEnum.FOREIGN_BAZ);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension)[1],
- ImportEnum.IMPORT_BAZ);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension)[1], '324');
- expect(message.getExtension(Unittest.repeatedCordExtension)[1], '325');
-
- // -----------------------------------------------------------------
-
- expect(message.hasExtension(Unittest.defaultInt32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultInt64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultUint32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultUint64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSint32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSint64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSfixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSfixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFloatExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultDoubleExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultBoolExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultStringExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultBytesExtension), isTrue);
-
- expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultImportEnumExtension), isTrue);
-
- expect(message.hasExtension(Unittest.defaultStringPieceExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultCordExtension), isTrue);
- expect(message.getExtension(Unittest.defaultInt32Extension), 401);
- expect(message.getExtension(Unittest.defaultInt64Extension), expect64(402));
- expect(message.getExtension(Unittest.defaultUint32Extension), 403);
- expect(message.getExtension(Unittest.defaultUint64Extension), expect64(404));
- expect(message.getExtension(Unittest.defaultSint32Extension), 405);
- expect(message.getExtension(Unittest.defaultSint64Extension), expect64(406));
- expect(message.getExtension(Unittest.defaultFixed32Extension), 407);
- expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(408));
- expect(message.getExtension(Unittest.defaultSfixed32Extension), 409);
- expect(
- message.getExtension(Unittest.defaultSfixed64Extension), expect64(410));
- expect(message.getExtension(Unittest.defaultFloatExtension), 411.0);
- expect(message.getExtension(Unittest.defaultDoubleExtension), 412.0);
- expect(message.getExtension(Unittest.defaultBoolExtension), false);
- expect(message.getExtension(Unittest.defaultStringExtension), '415');
- expect(message.getExtension(Unittest.defaultBytesExtension), '416'.codeUnits);
-
- expect(message.getExtension(Unittest.defaultNestedEnumExtension),
- TestAllTypes_NestedEnum.FOO);
- expect(message.getExtension(Unittest.defaultForeignEnumExtension),
- ForeignEnum.FOREIGN_FOO);
- expect(message.getExtension(Unittest.defaultImportEnumExtension),
- ImportEnum.IMPORT_FOO);
-
- expect(message.getExtension(Unittest.defaultStringPieceExtension), '424');
- expect(message.getExtension(Unittest.defaultCordExtension), '425');
-}
-
-void assertAllFieldsSet(TestAllTypes message) {
- expect(message.hasOptionalInt32(), isTrue);
- expect(message.hasOptionalInt64(), isTrue);
- expect(message.hasOptionalUint32(), isTrue);
- expect(message.hasOptionalUint64(), isTrue);
- expect(message.hasOptionalSint32(), isTrue);
- expect(message.hasOptionalSint64(), isTrue);
- expect(message.hasOptionalFixed32(), isTrue);
- expect(message.hasOptionalFixed64(), isTrue);
- expect(message.hasOptionalSfixed32(), isTrue);
- expect(message.hasOptionalSfixed64(), isTrue);
- expect(message.hasOptionalFloat(), isTrue);
- expect(message.hasOptionalDouble(), isTrue);
- expect(message.hasOptionalBool(), isTrue);
- expect(message.hasOptionalString(), isTrue);
- expect(message.hasOptionalBytes(), isTrue);
-
- expect(message.hasOptionalGroup(), isTrue);
- expect(message.hasOptionalNestedMessage(), isTrue);
- expect(message.hasOptionalForeignMessage(), isTrue);
- expect(message.hasOptionalImportMessage(), isTrue);
-
- expect(message.optionalGroup.hasA(), isTrue);
- expect(message.optionalNestedMessage.hasBb(), isTrue);
- expect(message.optionalForeignMessage.hasC(), isTrue);
- expect(message.optionalImportMessage.hasD(), isTrue);
-
- expect(message.hasOptionalNestedEnum(), isTrue);
- expect(message.hasOptionalForeignEnum(), isTrue);
- expect(message.hasOptionalImportEnum(), isTrue);
-
- expect(message.hasOptionalStringPiece(), isTrue);
- expect(message.hasOptionalCord(), isTrue);
-
- expect(message.optionalInt32, 101);
- expect(message.optionalInt64, expect64(102));
- expect(message.optionalUint32, 103);
- expect(message.optionalUint64, expect64(104));
- expect(message.optionalSint32, 105);
- expect(message.optionalSint64, expect64(106));
- expect(message.optionalFixed32, 107);
- expect(message.optionalFixed64, expect64(108));
- expect(message.optionalSfixed32, 109);
- expect(message.optionalSfixed64, expect64(110));
- expect(message.optionalFloat, 111.0);
- expect(message.optionalDouble, 112.0);
- expect(message.optionalBool, true);
- expect(message.optionalString, '115');
- expect(message.optionalBytes, '116'.codeUnits);
-
- expect(message.optionalGroup.a, 117);
- expect(message.optionalNestedMessage.bb, 118);
- expect(message.optionalForeignMessage.c, 119);
- expect(message.optionalImportMessage.d, 120);
-
- expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.BAZ);
- expect(message.optionalForeignEnum, ForeignEnum.FOREIGN_BAZ);
- expect(message.optionalImportEnum, ImportEnum.IMPORT_BAZ);
-
- expect(message.optionalStringPiece, '124');
- expect(message.optionalCord, '125');
-
- // -----------------------------------------------------------------
-
- expect(message.repeatedInt32.length, 2);
- expect(message.repeatedInt64.length, 2);
- expect(message.repeatedUint32.length, 2);
- expect(message.repeatedUint64.length, 2);
- expect(message.repeatedSint32.length, 2);
- expect(message.repeatedSint64.length, 2);
- expect(message.repeatedFixed32.length, 2);
- expect(message.repeatedFixed64.length, 2);
- expect(message.repeatedSfixed32.length, 2);
- expect(message.repeatedSfixed64.length, 2);
- expect(message.repeatedFloat.length, 2);
- expect(message.repeatedDouble.length, 2);
- expect(message.repeatedBool.length, 2);
- expect(message.repeatedString.length, 2);
- expect(message.repeatedBytes.length, 2);
-
- expect(message.repeatedGroup.length, 2);
- expect(message.repeatedNestedMessage.length, 2);
- expect(message.repeatedForeignMessage.length, 2);
- expect(message.repeatedImportMessage.length, 2);
- expect(message.repeatedNestedEnum.length, 2);
- expect(message.repeatedForeignEnum.length, 2);
- expect(message.repeatedImportEnum.length, 2);
-
- expect(message.repeatedStringPiece.length, 2);
- expect(message.repeatedCord.length, 2);
-
- expect(message.repeatedInt32[0], 201);
- expect(message.repeatedInt64[0], expect64(202));
- expect(message.repeatedUint32[0], 203);
- expect(message.repeatedUint64[0], expect64(204));
- expect(message.repeatedSint32[0], 205);
- expect(message.repeatedSint64[0], expect64(206));
- expect(message.repeatedFixed32[0], 207);
- expect(message.repeatedFixed64[0], expect64(208));
- expect(message.repeatedSfixed32[0], 209);
- expect(message.repeatedSfixed64[0], expect64(210));
- expect(message.repeatedFloat[0], 211.0);
- expect(message.repeatedDouble[0], 212.0);
- expect(message.repeatedBool[0], true);
- expect(message.repeatedString[0], '215');
- expect(message.repeatedBytes[0], '216'.codeUnits);
-
- expect(message.repeatedGroup[0].a, 217);
- expect(message.repeatedNestedMessage[0].bb, 218);
- expect(message.repeatedForeignMessage[0].c, 219);
- expect(message.repeatedImportMessage[0].d, 220);
-
- expect(message.repeatedNestedEnum[0], TestAllTypes_NestedEnum.BAR);
- expect(message.repeatedForeignEnum[0], ForeignEnum.FOREIGN_BAR);
- expect(message.repeatedImportEnum[0], ImportEnum.IMPORT_BAR);
-
- expect(message.repeatedStringPiece[0], '224');
- expect(message.repeatedCord[0], '225');
-
- expect(message.repeatedInt32[1], 301);
- expect(message.repeatedInt64[1], expect64(302));
- expect(message.repeatedUint32[1], 303);
- expect(message.repeatedUint64[1], expect64(304));
- expect(message.repeatedSint32[1], 305);
- expect(message.repeatedSint64[1], expect64(306));
- expect(message.repeatedFixed32[1], 307);
- expect(message.repeatedFixed64[1], expect64(308));
- expect(message.repeatedSfixed32[1], 309);
- expect(message.repeatedSfixed64[1], expect64(310));
- expect(message.repeatedFloat[1], 311.0);
- expect(message.repeatedDouble[1], 312.0);
- expect(message.repeatedBool[1], false);
- expect(message.repeatedString[1], '315');
- expect(message.repeatedBytes[1], '316'.codeUnits);
-
- expect(message.repeatedGroup[1].a, 317);
- expect(message.repeatedNestedMessage[1].bb, 318);
- expect(message.repeatedForeignMessage[1].c, 319);
- expect(message.repeatedImportMessage[1].d, 320);
-
- expect(message.repeatedNestedEnum[1], TestAllTypes_NestedEnum.BAZ);
- expect(message.repeatedForeignEnum[1], ForeignEnum.FOREIGN_BAZ);
- expect(message.repeatedImportEnum[1], ImportEnum.IMPORT_BAZ);
-
- expect(message.repeatedStringPiece[1], '324');
- expect(message.repeatedCord[1], '325');
-
- // -----------------------------------------------------------------
-
- expect(message.hasDefaultInt32(), isTrue);
- expect(message.hasDefaultInt64(), isTrue);
- expect(message.hasDefaultUint32(), isTrue);
- expect(message.hasDefaultUint64(), isTrue);
- expect(message.hasDefaultSint32(), isTrue);
- expect(message.hasDefaultSint64(), isTrue);
- expect(message.hasDefaultFixed32(), isTrue);
- expect(message.hasDefaultFixed64(), isTrue);
- expect(message.hasDefaultSfixed32(), isTrue);
- expect(message.hasDefaultSfixed64(), isTrue);
- expect(message.hasDefaultFloat(), isTrue);
- expect(message.hasDefaultDouble(), isTrue);
- expect(message.hasDefaultBool(), isTrue);
- expect(message.hasDefaultString(), isTrue);
- expect(message.hasDefaultBytes(), isTrue);
-
- expect(message.hasDefaultNestedEnum(), isTrue);
- expect(message.hasDefaultForeignEnum(), isTrue);
- expect(message.hasDefaultImportEnum(), isTrue);
-
- expect(message.hasDefaultStringPiece(), isTrue);
- expect(message.hasDefaultCord(), isTrue);
-
- expect(message.defaultInt32, 401);
- expect(message.defaultInt64, expect64(402));
- expect(message.defaultUint32, 403);
- expect(message.defaultUint64, expect64(404));
- expect(message.defaultSint32, 405);
- expect(message.defaultSint64, expect64(406));
- expect(message.defaultFixed32, 407);
- expect(message.defaultFixed64, expect64(408));
- expect(message.defaultSfixed32, 409);
- expect(message.defaultSfixed64, expect64(410));
- expect(message.defaultFloat, 411.0);
- expect(message.defaultDouble, 412.0);
- expect(message.defaultBool, false);
- expect(message.defaultString, '415');
- expect(message.defaultBytes, '416'.codeUnits);
-
- expect(message.defaultNestedEnum, TestAllTypes_NestedEnum.FOO);
- expect(message.defaultForeignEnum, ForeignEnum.FOREIGN_FOO);
- expect(message.defaultImportEnum, ImportEnum.IMPORT_FOO);
-
- expect(message.defaultStringPiece, '424');
- expect(message.defaultCord, '425');
-}
-
-void assertClear(TestAllTypes message) {
- // hasBlah() should initially be false for all optional fields.
- expect(message.hasOptionalInt32(), isFalse);
- expect(message.hasOptionalInt64(), isFalse);
- expect(message.hasOptionalUint32(), isFalse);
- expect(message.hasOptionalUint64(), isFalse);
- expect(message.hasOptionalSint32(), isFalse);
- expect(message.hasOptionalSint64(), isFalse);
- expect(message.hasOptionalFixed32(), isFalse);
- expect(message.hasOptionalFixed64(), isFalse);
- expect(message.hasOptionalSfixed32(), isFalse);
- expect(message.hasOptionalSfixed64(), isFalse);
- expect(message.hasOptionalFloat(), isFalse);
- expect(message.hasOptionalDouble(), isFalse);
- expect(message.hasOptionalBool(), isFalse);
- expect(message.hasOptionalString(), isFalse);
- expect(message.hasOptionalBytes(), isFalse);
-
- expect(message.hasOptionalGroup(), isFalse);
- expect(message.hasOptionalNestedMessage(), isFalse);
- expect(message.hasOptionalForeignMessage(), isFalse);
- expect(message.hasOptionalImportMessage(), isFalse);
-
- expect(message.hasOptionalNestedEnum(), isFalse);
- expect(message.hasOptionalForeignEnum(), isFalse);
- expect(message.hasOptionalImportEnum(), isFalse);
-
- expect(message.hasOptionalStringPiece(), isFalse);
- expect(message.hasOptionalCord(), isFalse);
-
- // Optional fields without defaults are set to zero or something like it.
- expect(message.optionalInt32, 0);
- expect(message.optionalInt64, expect64(0));
- expect(message.optionalUint32, 0);
- expect(message.optionalUint64, expect64(0));
- expect(message.optionalSint32, 0);
- expect(message.optionalSint64, expect64(0));
- expect(message.optionalFixed32, 0);
- expect(message.optionalFixed64, expect64(0));
- expect(message.optionalSfixed32, 0);
- expect(message.optionalSfixed64, expect64(0));
- expect(message.optionalFloat, 0);
- expect(message.optionalDouble, 0);
- expect(message.optionalBool, false);
- expect(message.optionalString, '');
- expect(message.optionalBytes, <int>[]);
-
- // Embedded messages should also be clear.
- expect(message.optionalGroup.hasA(), isFalse);
- expect(message.optionalNestedMessage.hasBb(), isFalse);
- expect(message.optionalForeignMessage.hasC(), isFalse);
- expect(message.optionalImportMessage.hasD(), isFalse);
-
- expect(message.optionalGroup.a, 0);
- expect(message.optionalNestedMessage.bb, 0);
- expect(message.optionalForeignMessage.c, 0);
- expect(message.optionalImportMessage.d, 0);
-
- // Enums without defaults are set to the first value in the enum.
- expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.FOO);
- expect(message.optionalForeignEnum, ForeignEnum.FOREIGN_FOO);
- expect(message.optionalImportEnum, ImportEnum.IMPORT_FOO);
-
- expect(message.optionalStringPiece, '');
- expect(message.optionalCord, '');
-
- // Repeated fields are empty.
- expect(message.repeatedInt32.length, 0);
- expect(message.repeatedInt64.length, 0);
- expect(message.repeatedUint32.length, 0);
- expect(message.repeatedUint64.length, 0);
- expect(message.repeatedSint32.length, 0);
- expect(message.repeatedSint64.length, 0);
- expect(message.repeatedFixed32.length, 0);
- expect(message.repeatedFixed64.length, 0);
- expect(message.repeatedSfixed32.length, 0);
- expect(message.repeatedSfixed64.length, 0);
- expect(message.repeatedFloat.length, 0);
- expect(message.repeatedDouble.length, 0);
- expect(message.repeatedBool.length, 0);
- expect(message.repeatedString.length, 0);
- expect(message.repeatedBytes.length, 0);
-
- expect(message.repeatedGroup.length, 0);
- expect(message.repeatedNestedMessage.length, 0);
- expect(message.repeatedForeignMessage.length, 0);
- expect(message.repeatedImportMessage.length, 0);
- expect(message.repeatedNestedEnum.length, 0);
- expect(message.repeatedForeignEnum.length, 0);
- expect(message.repeatedImportEnum.length, 0);
-
- expect(message.repeatedStringPiece.length, 0);
- expect(message.repeatedCord.length, 0);
-
- // hasBlah() should also be false for all default fields.
- expect(message.hasDefaultInt32(), isFalse);
- expect(message.hasDefaultInt64(), isFalse);
- expect(message.hasDefaultUint32(), isFalse);
- expect(message.hasDefaultUint64(), isFalse);
- expect(message.hasDefaultSint32(), isFalse);
- expect(message.hasDefaultSint64(), isFalse);
- expect(message.hasDefaultFixed32(), isFalse);
- expect(message.hasDefaultFixed64(), isFalse);
- expect(message.hasDefaultSfixed32(), isFalse);
- expect(message.hasDefaultSfixed64(), isFalse);
- expect(message.hasDefaultFloat(), isFalse);
- expect(message.hasDefaultDouble(), isFalse);
- expect(message.hasDefaultBool(), isFalse);
- expect(message.hasDefaultString(), isFalse);
- expect(message.hasDefaultBytes(), isFalse);
-
- expect(message.hasDefaultNestedEnum(), isFalse);
- expect(message.hasDefaultForeignEnum(), isFalse);
- expect(message.hasDefaultImportEnum(), isFalse);
-
- expect(message.hasDefaultStringPiece(), isFalse);
- expect(message.hasDefaultCord(), isFalse);
-
- // Fields with defaults have their default values(duh).
- expect(message.defaultInt32, 41);
- expect(message.defaultInt64, expect64(42));
- expect(message.defaultUint32, 43);
- expect(message.defaultUint64, expect64(44));
- expect(message.defaultSint32, -45);
- expect(message.defaultSint64, expect64(46));
- expect(message.defaultFixed32, 47);
- expect(message.defaultFixed64, expect64(48));
- expect(message.defaultSfixed32, 49);
- expect(message.defaultSfixed64, expect64(-50));
- expect(message.defaultFloat, 51.5);
- expect(message.defaultDouble, 52e3);
- expect(message.defaultBool, isTrue);
- expect(message.defaultString, 'hello');
- expect(message.defaultBytes, 'world'.codeUnits);
-
- expect(message.defaultNestedEnum, TestAllTypes_NestedEnum.BAR);
- expect(message.defaultForeignEnum, ForeignEnum.FOREIGN_BAR);
- expect(message.defaultImportEnum, ImportEnum.IMPORT_BAR);
-
- expect(message.defaultStringPiece, 'abc');
- expect(message.defaultCord, '123');
-}
-
-void assertExtensionsClear(TestAllExtensions message) {
- // hasBlah() should initially be false for all optional fields.
- expect(message.hasExtension(Unittest.optionalInt32Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalInt64Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalUint32Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalUint64Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalSint32Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalSint64Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalFixed32Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalFixed64Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalSfixed32Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalSfixed64Extension), isFalse);
- expect(message.hasExtension(Unittest.optionalFloatExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalDoubleExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalBoolExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalStringExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalBytesExtension), isFalse);
-
- expect(message.hasExtension(Unittest.optionalGroupExtension), isFalse);
- expect(
- message.hasExtension(Unittest.optionalNestedMessageExtension), isFalse);
- expect(
- message.hasExtension(Unittest.optionalForeignMessageExtension), isFalse);
- expect(
- message.hasExtension(Unittest.optionalImportMessageExtension), isFalse);
-
- expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalImportEnumExtension), isFalse);
-
- expect(message.hasExtension(Unittest.optionalStringPieceExtension), isFalse);
- expect(message.hasExtension(Unittest.optionalCordExtension), isFalse);
-
- // Optional fields without defaults are set to zero or something like it.
- expect(message.getExtension(Unittest.optionalInt32Extension), 0);
- expect(message.getExtension(Unittest.optionalInt64Extension), expect64(0));
- expect(message.getExtension(Unittest.optionalUint32Extension), 0);
- expect(message.getExtension(Unittest.optionalUint64Extension), expect64(0));
- expect(message.getExtension(Unittest.optionalSint32Extension), 0);
- expect(message.getExtension(Unittest.optionalSint64Extension), expect64(0));
- expect(message.getExtension(Unittest.optionalFixed32Extension), 0);
- expect(message.getExtension(Unittest.optionalFixed64Extension), expect64(0));
- expect(message.getExtension(Unittest.optionalSfixed32Extension), 0);
- expect(message.getExtension(Unittest.optionalSfixed64Extension), expect64(0));
- expect(message.getExtension(Unittest.optionalFloatExtension), 0.0);
- expect(message.getExtension(Unittest.optionalDoubleExtension), 0.0);
- expect(message.getExtension(Unittest.optionalBoolExtension), false);
- expect(message.getExtension(Unittest.optionalStringExtension), '');
- expect(message.getExtension(Unittest.optionalBytesExtension), <int>[]);
-
- // Embedded messages should also be clear.
- expect(message.getExtension(Unittest.optionalGroupExtension).hasA(), isFalse);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),
- isFalse);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),
- isFalse);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).hasD(),
- isFalse);
-
- expect(message.getExtension(Unittest.optionalGroupExtension).a, 0);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 0);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 0);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 0);
-
- // Enums without defaults are set to the first value in the enum.
- expect(message.getExtension(Unittest.optionalNestedEnumExtension),
- TestAllTypes_NestedEnum.FOO);
- expect(message.getExtension(Unittest.optionalForeignEnumExtension),
- ForeignEnum.FOREIGN_FOO);
- expect(message.getExtension(Unittest.optionalImportEnumExtension),
- ImportEnum.IMPORT_FOO);
-
- expect(message.getExtension(Unittest.optionalStringPieceExtension), '');
- expect(message.getExtension(Unittest.optionalCordExtension), '');
-
- // Repeated fields are empty.
- expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedInt64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedUint32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedUint64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSint32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSint64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFloatExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedBoolExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedStringExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedBytesExtension).length, 0);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 0);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedCordExtension).length, 0);
-
- // Repeated fields are empty via getExtension().length.
- expect(message.getExtension(Unittest.repeatedInt32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedInt64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedUint32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedUint64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSint32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSint64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 0);
- expect(message.getExtension(Unittest.repeatedFloatExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedBoolExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedStringExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedBytesExtension).length, 0);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension).length, 0);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 0);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 0);
- expect(message.getExtension(Unittest.repeatedCordExtension).length, 0);
-
- // hasBlah() should also be false for all default fields.
- expect(message.hasExtension(Unittest.defaultInt32Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultInt64Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultUint32Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultUint64Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultSint32Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultSint64Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultFixed32Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultFixed64Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultSfixed32Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultSfixed64Extension), isFalse);
- expect(message.hasExtension(Unittest.defaultFloatExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultDoubleExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultBoolExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultStringExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultBytesExtension), isFalse);
-
- expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultImportEnumExtension), isFalse);
-
- expect(message.hasExtension(Unittest.defaultStringPieceExtension), isFalse);
- expect(message.hasExtension(Unittest.defaultCordExtension), isFalse);
-
- // Fields with defaults have their default values (duh).
- expect(message.getExtension(Unittest.defaultInt32Extension), 41);
- expect(message.getExtension(Unittest.defaultInt64Extension), expect64(42));
- expect(message.getExtension(Unittest.defaultUint32Extension), 43);
- expect(message.getExtension(Unittest.defaultUint64Extension), expect64(44));
- expect(message.getExtension(Unittest.defaultSint32Extension), -45);
- expect(message.getExtension(Unittest.defaultSint64Extension), expect64(46));
- expect(message.getExtension(Unittest.defaultFixed32Extension), 47);
- expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(48));
- expect(message.getExtension(Unittest.defaultSfixed32Extension), 49);
- expect(
- message.getExtension(Unittest.defaultSfixed64Extension), expect64(-50));
- expect(message.getExtension(Unittest.defaultFloatExtension), 51.5);
- expect(message.getExtension(Unittest.defaultDoubleExtension), 52e3);
- expect(message.getExtension(Unittest.defaultBoolExtension), true);
- expect(message.getExtension(Unittest.defaultStringExtension), 'hello');
- expect(
- message.getExtension(Unittest.defaultBytesExtension), 'world'.codeUnits);
-
- expect(message.getExtension(Unittest.defaultNestedEnumExtension),
- TestAllTypes_NestedEnum.BAR);
- expect(message.getExtension(Unittest.defaultForeignEnumExtension),
- ForeignEnum.FOREIGN_BAR);
- expect(message.getExtension(Unittest.defaultImportEnumExtension),
- ImportEnum.IMPORT_BAR);
-
- expect(message.getExtension(Unittest.defaultStringPieceExtension), 'abc');
- expect(message.getExtension(Unittest.defaultCordExtension), '123');
-}
-
-void assertPackedExtensionsSet(TestPackedExtensions message) {
- expect(message.getExtension(Unittest.packedInt32Extension).length, 2);
- expect(message.getExtension(Unittest.packedInt64Extension).length, 2);
- expect(message.getExtension(Unittest.packedUint32Extension).length, 2);
- expect(message.getExtension(Unittest.packedUint64Extension).length, 2);
- expect(message.getExtension(Unittest.packedSint32Extension).length, 2);
- expect(message.getExtension(Unittest.packedSint64Extension).length, 2);
- expect(message.getExtension(Unittest.packedFixed32Extension).length, 2);
- expect(message.getExtension(Unittest.packedFixed64Extension).length, 2);
- expect(message.getExtension(Unittest.packedSfixed32Extension).length, 2);
- expect(message.getExtension(Unittest.packedSfixed64Extension).length, 2);
- expect(message.getExtension(Unittest.packedFloatExtension).length, 2);
- expect(message.getExtension(Unittest.packedDoubleExtension).length, 2);
- expect(message.getExtension(Unittest.packedBoolExtension).length, 2);
- expect(message.getExtension(Unittest.packedEnumExtension).length, 2);
- expect(message.getExtension(Unittest.packedInt32Extension)[0], 601);
- expect(message.getExtension(Unittest.packedInt64Extension)[0], expect64(602));
- expect(message.getExtension(Unittest.packedUint32Extension)[0], 603);
- expect(
- message.getExtension(Unittest.packedUint64Extension)[0], expect64(604));
- expect(message.getExtension(Unittest.packedSint32Extension)[0], 605);
- expect(
- message.getExtension(Unittest.packedSint64Extension)[0], expect64(606));
- expect(message.getExtension(Unittest.packedFixed32Extension)[0], 607);
- expect(
- message.getExtension(Unittest.packedFixed64Extension)[0], expect64(608));
- expect(message.getExtension(Unittest.packedSfixed32Extension)[0], 609);
- expect(
- message.getExtension(Unittest.packedSfixed64Extension)[0], expect64(610));
- expect(message.getExtension(Unittest.packedFloatExtension)[0], 611.0);
- expect(message.getExtension(Unittest.packedDoubleExtension)[0], 612.0);
- expect(message.getExtension(Unittest.packedBoolExtension)[0], true);
- expect(message.getExtension(Unittest.packedEnumExtension)[0],
- ForeignEnum.FOREIGN_BAR);
- expect(message.getExtension(Unittest.packedInt32Extension)[1], 701);
- expect(message.getExtension(Unittest.packedInt64Extension)[1], expect64(702));
- expect(message.getExtension(Unittest.packedUint32Extension)[1], 703);
- expect(
- message.getExtension(Unittest.packedUint64Extension)[1], expect64(704));
- expect(message.getExtension(Unittest.packedSint32Extension)[1], 705);
- expect(
- message.getExtension(Unittest.packedSint64Extension)[1], expect64(706));
- expect(message.getExtension(Unittest.packedFixed32Extension)[1], 707);
- expect(
- message.getExtension(Unittest.packedFixed64Extension)[1], expect64(708));
- expect(message.getExtension(Unittest.packedSfixed32Extension)[1], 709);
- expect(
- message.getExtension(Unittest.packedSfixed64Extension)[1], expect64(710));
- expect(message.getExtension(Unittest.packedFloatExtension)[1], 711.0);
- expect(message.getExtension(Unittest.packedDoubleExtension)[1], 712.0);
- expect(message.getExtension(Unittest.packedBoolExtension)[1], false);
- expect(message.getExtension(Unittest.packedEnumExtension)[1],
- ForeignEnum.FOREIGN_BAZ);
-}
-
-/**
- * Assert (using expect} that all fields of [message] are set to the values
- * assigned by [setPackedFields].
- */
-void assertPackedFieldsSet(TestPackedTypes message) {
- expect(message.packedInt32.length, 2);
- expect(message.packedInt64.length, 2);
- expect(message.packedUint32.length, 2);
- expect(message.packedUint64.length, 2);
- expect(message.packedSint32.length, 2);
- expect(message.packedSint64.length, 2);
- expect(message.packedFixed32.length, 2);
- expect(message.packedFixed64.length, 2);
- expect(message.packedSfixed32.length, 2);
- expect(message.packedSfixed64.length, 2);
- expect(message.packedFloat.length, 2);
- expect(message.packedDouble.length, 2);
- expect(message.packedBool.length, 2);
- expect(message.packedEnum.length, 2);
- expect(message.packedInt32[0], 601);
- expect(message.packedInt64[0], expect64(602));
- expect(message.packedUint32[0], 603);
- expect(message.packedUint64[0], expect64(604));
- expect(message.packedSint32[0], 605);
- expect(message.packedSint64[0], expect64(606));
- expect(message.packedFixed32[0], 607);
- expect(message.packedFixed64[0], expect64(608));
- expect(message.packedSfixed32[0], 609);
- expect(message.packedSfixed64[0], expect64(610));
- expect(message.packedFloat[0], 611.0);
- expect(message.packedDouble[0], 612.0);
- expect(message.packedBool[0], true);
- expect(message.packedEnum[0], ForeignEnum.FOREIGN_BAR);
- expect(message.packedInt32[1], 701);
- expect(message.packedInt64[1], expect64(702));
- expect(message.packedUint32[1], 703);
- expect(message.packedUint64[1], expect64(704));
- expect(message.packedSint32[1], 705);
- expect(message.packedSint64[1], expect64(706));
- expect(message.packedFixed32[1], 707);
- expect(message.packedFixed64[1], expect64(708));
- expect(message.packedSfixed32[1], 709);
- expect(message.packedSfixed64[1], expect64(710));
- expect(message.packedFloat[1], 711.0);
- expect(message.packedDouble[1], 712.0);
- expect(message.packedBool[1], false);
- expect(message.packedEnum[1], ForeignEnum.FOREIGN_BAZ);
-}
-
-void assertRepeatedExtensionsModified(TestAllExtensions message) {
- expect(message.hasExtension(Unittest.optionalInt32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalInt64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalUint32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalUint64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSint32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSint64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSfixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalSfixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.optionalFloatExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalDoubleExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalBoolExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalStringExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalBytesExtension), isTrue);
-
- expect(message.hasExtension(Unittest.optionalGroupExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalNestedMessageExtension), isTrue);
- expect(
- message.hasExtension(Unittest.optionalForeignMessageExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalImportMessageExtension), isTrue);
-
- expect(message.getExtension(Unittest.optionalGroupExtension).hasA(), isTrue);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).hasBb(),
- isTrue);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).hasC(),
- isTrue);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).hasD(),
- isTrue);
-
- expect(message.hasExtension(Unittest.optionalNestedEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalForeignEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalImportEnumExtension), isTrue);
-
- expect(message.hasExtension(Unittest.optionalStringPieceExtension), isTrue);
- expect(message.hasExtension(Unittest.optionalCordExtension), isTrue);
-
- expect(message.getExtension(Unittest.optionalInt32Extension), 101);
- expect(message.getExtension(Unittest.optionalInt64Extension), expect64(102));
- expect(message.getExtension(Unittest.optionalUint32Extension), 103);
- expect(message.getExtension(Unittest.optionalUint64Extension), expect64(104));
- expect(message.getExtension(Unittest.optionalSint32Extension), 105);
- expect(message.getExtension(Unittest.optionalSint64Extension), expect64(106));
- expect(message.getExtension(Unittest.optionalFixed32Extension), 107);
- expect(
- message.getExtension(Unittest.optionalFixed64Extension), expect64(108));
- expect(message.getExtension(Unittest.optionalSfixed32Extension), 109);
- expect(
- message.getExtension(Unittest.optionalSfixed64Extension), expect64(110));
- expect(message.getExtension(Unittest.optionalFloatExtension), 111.0);
- expect(message.getExtension(Unittest.optionalDoubleExtension), 112.0);
- expect(message.getExtension(Unittest.optionalBoolExtension), true);
- expect(message.getExtension(Unittest.optionalStringExtension), '115');
- expect(
- message.getExtension(Unittest.optionalBytesExtension), '116'.codeUnits);
-
- expect(message.getExtension(Unittest.optionalGroupExtension).a, 117);
- expect(message.getExtension(Unittest.optionalNestedMessageExtension).bb, 118);
- expect(message.getExtension(Unittest.optionalForeignMessageExtension).c, 119);
- expect(message.getExtension(Unittest.optionalImportMessageExtension).d, 120);
-
- expect(message.getExtension(Unittest.optionalNestedEnumExtension),
- TestAllTypes_NestedEnum.BAZ);
- expect(message.getExtension(Unittest.optionalForeignEnumExtension),
- ForeignEnum.FOREIGN_BAZ);
- expect(message.getExtension(Unittest.optionalImportEnumExtension),
- ImportEnum.IMPORT_BAZ);
-
- expect(message.getExtension(Unittest.optionalStringPieceExtension), '124');
- expect(message.getExtension(Unittest.optionalCordExtension), '125');
-
- // -----------------------------------------------------------------
-
- expect(message.getExtension(Unittest.repeatedInt32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedInt64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedUint32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedUint64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSint32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSint64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFixed32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFixed64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSfixed32Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension).length, 2);
- expect(message.getExtension(Unittest.repeatedFloatExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedDoubleExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedBoolExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedStringExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedBytesExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension).length, 2);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension).length, 2);
- expect(message.getExtension(Unittest.repeatedCordExtension).length, 2);
-
- expect(message.getExtension(Unittest.repeatedInt32Extension)[0], 201);
- expect(
- message.getExtension(Unittest.repeatedInt64Extension)[0], expect64(202));
- expect(message.getExtension(Unittest.repeatedUint32Extension)[0], 203);
- expect(
- message.getExtension(Unittest.repeatedUint64Extension)[0], expect64(204));
- expect(message.getExtension(Unittest.repeatedSint32Extension)[0], 205);
- expect(
- message.getExtension(Unittest.repeatedSint64Extension)[0], expect64(206));
- expect(message.getExtension(Unittest.repeatedFixed32Extension)[0], 207);
- expect(message.getExtension(Unittest.repeatedFixed64Extension)[0],
- expect64(208));
- expect(message.getExtension(Unittest.repeatedSfixed32Extension)[0], 209);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension)[0],
- expect64(210));
- expect(message.getExtension(Unittest.repeatedFloatExtension)[0], 211.0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension)[0], 212.0);
- expect(message.getExtension(Unittest.repeatedBoolExtension)[0], true);
- expect(message.getExtension(Unittest.repeatedStringExtension)[0], '215');
- expect(message.getExtension(Unittest.repeatedBytesExtension)[0],
- '216'.codeUnits);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension)[0].a, 217);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension)[0].bb, 218);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension)[0].c, 219);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension)[0].d, 220);
-
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension)[0],
- TestAllTypes_NestedEnum.BAR);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension)[0],
- ForeignEnum.FOREIGN_BAR);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension)[0],
- ImportEnum.IMPORT_BAR);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension)[0], '224');
- expect(message.getExtension(Unittest.repeatedCordExtension)[0], '225');
-
- expect(message.getExtension(Unittest.repeatedInt32Extension)[1], 501);
- expect(
- message.getExtension(Unittest.repeatedInt64Extension)[1], expect64(502));
- expect(message.getExtension(Unittest.repeatedUint32Extension)[1], 503);
- expect(
- message.getExtension(Unittest.repeatedUint64Extension)[1], expect64(504));
- expect(message.getExtension(Unittest.repeatedSint32Extension)[1], 505);
- expect(
- message.getExtension(Unittest.repeatedSint64Extension)[1], expect64(506));
- expect(message.getExtension(Unittest.repeatedFixed32Extension)[1], 507);
- expect(message.getExtension(Unittest.repeatedFixed64Extension)[1],
- expect64(508));
- expect(message.getExtension(Unittest.repeatedSfixed32Extension)[1], 509);
- expect(message.getExtension(Unittest.repeatedSfixed64Extension)[1],
- expect64(510));
- expect(message.getExtension(Unittest.repeatedFloatExtension)[1], 511.0);
- expect(message.getExtension(Unittest.repeatedDoubleExtension)[1], 512.0);
- expect(message.getExtension(Unittest.repeatedBoolExtension)[1], true);
- expect(message.getExtension(Unittest.repeatedStringExtension)[1], '515');
- expect(message.getExtension(Unittest.repeatedBytesExtension)[1],
- '516'.codeUnits);
-
- expect(message.getExtension(Unittest.repeatedGroupExtension)[1].a, 517);
- expect(
- message.getExtension(Unittest.repeatedNestedMessageExtension)[1].bb, 518);
- expect(
- message.getExtension(Unittest.repeatedForeignMessageExtension)[1].c, 519);
- expect(
- message.getExtension(Unittest.repeatedImportMessageExtension)[1].d, 520);
-
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension)[1],
- TestAllTypes_NestedEnum.FOO);
- expect(message.getExtension(Unittest.repeatedForeignEnumExtension)[1],
- ForeignEnum.FOREIGN_FOO);
- expect(message.getExtension(Unittest.repeatedImportEnumExtension)[1],
- ImportEnum.IMPORT_FOO);
-
- expect(message.getExtension(Unittest.repeatedStringPieceExtension)[1], '524');
- expect(message.getExtension(Unittest.repeatedCordExtension)[1], '525');
-
- // -----------------------------------------------------------------
-
- expect(message.hasExtension(Unittest.defaultInt32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultInt64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultUint32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultUint64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSint32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSint64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSfixed32Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultSfixed64Extension), isTrue);
- expect(message.hasExtension(Unittest.defaultFloatExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultDoubleExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultBoolExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultStringExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultBytesExtension), isTrue);
-
- expect(message.hasExtension(Unittest.defaultNestedEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultForeignEnumExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultImportEnumExtension), isTrue);
-
- expect(message.hasExtension(Unittest.defaultStringPieceExtension), isTrue);
- expect(message.hasExtension(Unittest.defaultCordExtension), isTrue);
-
- expect(message.getExtension(Unittest.defaultInt32Extension), 401);
- expect(message.getExtension(Unittest.defaultInt64Extension), expect64(402));
- expect(message.getExtension(Unittest.defaultUint32Extension), 403);
- expect(message.getExtension(Unittest.defaultUint64Extension), expect64(404));
- expect(message.getExtension(Unittest.defaultSint32Extension), 405);
- expect(message.getExtension(Unittest.defaultSint64Extension), expect64(406));
- expect(message.getExtension(Unittest.defaultFixed32Extension), 407);
- expect(message.getExtension(Unittest.defaultFixed64Extension), expect64(408));
- expect(message.getExtension(Unittest.defaultSfixed32Extension), 409);
- expect(
- message.getExtension(Unittest.defaultSfixed64Extension), expect64(410));
- expect(message.getExtension(Unittest.defaultFloatExtension), 411.0);
- expect(message.getExtension(Unittest.defaultDoubleExtension), 412.0);
- expect(message.getExtension(Unittest.defaultBoolExtension), false);
- expect(message.getExtension(Unittest.defaultStringExtension), '415');
- expect(message.getExtension(Unittest.defaultBytesExtension), '416'.codeUnits);
-
- expect(message.getExtension(Unittest.defaultNestedEnumExtension),
- TestAllTypes_NestedEnum.FOO);
- expect(message.getExtension(Unittest.defaultForeignEnumExtension),
- ForeignEnum.FOREIGN_FOO);
- expect(message.getExtension(Unittest.defaultImportEnumExtension),
- ImportEnum.IMPORT_FOO);
-
- expect(message.getExtension(Unittest.defaultStringPieceExtension), '424');
- expect(message.getExtension(Unittest.defaultCordExtension), '425');
-}
-
-void assertRepeatedFieldsModified(TestAllTypes message) {
- // ModifyRepeatedFields only sets the second repeated element of each
- // field. In addition to verifying this, we also verify that the first
- // element and size were *not* modified.
- expect(message.repeatedInt32.length, 2);
- expect(message.repeatedInt64.length, 2);
- expect(message.repeatedUint32.length, 2);
- expect(message.repeatedUint64.length, 2);
- expect(message.repeatedSint32.length, 2);
- expect(message.repeatedSint64.length, 2);
- expect(message.repeatedFixed32.length, 2);
- expect(message.repeatedFixed64.length, 2);
- expect(message.repeatedSfixed32.length, 2);
- expect(message.repeatedSfixed64.length, 2);
- expect(message.repeatedFloat.length, 2);
- expect(message.repeatedDouble.length, 2);
- expect(message.repeatedBool.length, 2);
- expect(message.repeatedString.length, 2);
- expect(message.repeatedBytes.length, 2);
-
- expect(message.repeatedGroup.length, 2);
- expect(message.repeatedNestedMessage.length, 2);
- expect(message.repeatedForeignMessage.length, 2);
- expect(message.repeatedImportMessage.length, 2);
- expect(message.repeatedNestedEnum.length, 2);
- expect(message.repeatedForeignEnum.length, 2);
- expect(message.repeatedImportEnum.length, 2);
-
- expect(message.repeatedStringPiece.length, 2);
- expect(message.repeatedCord.length, 2);
-
- expect(message.repeatedInt32[0], 201);
- expect(message.repeatedInt64[0], expect64(202));
- expect(message.repeatedUint32[0], 203);
- expect(message.repeatedUint64[0], expect64(204));
- expect(message.repeatedSint32[0], 205);
- expect(message.repeatedSint64[0], expect64(206));
- expect(message.repeatedFixed32[0], 207);
- expect(message.repeatedFixed64[0], expect64(208));
- expect(message.repeatedSfixed32[0], 209);
- expect(message.repeatedSfixed64[0], expect64(210));
- expect(message.repeatedFloat[0], 211.0);
- expect(message.repeatedDouble[0], 212.0);
- expect(message.repeatedBool[0], true);
- expect(message.repeatedString[0], '215');
- expect(message.repeatedBytes[0], '216'.codeUnits);
-
- expect(message.repeatedGroup[0].a, 217);
- expect(message.repeatedNestedMessage[0].bb, 218);
- expect(message.repeatedForeignMessage[0].c, 219);
- expect(message.repeatedImportMessage[0].d, 220);
-
- expect(message.repeatedNestedEnum[0], TestAllTypes_NestedEnum.BAR);
- expect(message.repeatedForeignEnum[0], ForeignEnum.FOREIGN_BAR);
- expect(message.repeatedImportEnum[0], ImportEnum.IMPORT_BAR);
-
- expect(message.repeatedStringPiece[0], '224');
- expect(message.repeatedCord[0], '225');
-
- // Actually verify the second(modified) elements now.
- expect(message.repeatedInt32[1], 501);
- expect(message.repeatedInt64[1], expect64(502));
- expect(message.repeatedUint32[1], 503);
- expect(message.repeatedUint64[1], expect64(504));
- expect(message.repeatedSint32[1], 505);
- expect(message.repeatedSint64[1], expect64(506));
- expect(message.repeatedFixed32[1], 507);
- expect(message.repeatedFixed64[1], expect64(508));
- expect(message.repeatedSfixed32[1], 509);
- expect(message.repeatedSfixed64[1], expect64(510));
- expect(message.repeatedFloat[1], 511.0);
- expect(message.repeatedDouble[1], 512.0);
- expect(message.repeatedBool[1], true);
- expect(message.repeatedString[1], '515');
- expect(message.repeatedBytes[1], '516'.codeUnits);
-
- expect(message.repeatedGroup[1].a, 517);
- expect(message.repeatedNestedMessage[1].bb, 518);
- expect(message.repeatedForeignMessage[1].c, 519);
- expect(message.repeatedImportMessage[1].d, 520);
-
- expect(message.repeatedNestedEnum[1], TestAllTypes_NestedEnum.BAR);
- expect(message.repeatedForeignEnum[1], ForeignEnum.FOREIGN_BAR);
- expect(message.repeatedImportEnum[1], ImportEnum.IMPORT_BAR);
-
- expect(message.repeatedStringPiece[1], '524');
- expect(message.repeatedCord[1], '525');
-}
-
-/**
- * Assert (using expect} that all fields of [message] are set to the values
- * assigned by [setUnpackedFields].
- */
-void assertUnpackedFieldsSet(TestUnpackedTypes message) {
- expect(message.unpackedInt32.length, 2);
- expect(message.unpackedInt64.length, 2);
- expect(message.unpackedUint32.length, 2);
- expect(message.unpackedUint64.length, 2);
- expect(message.unpackedSint32.length, 2);
- expect(message.unpackedSint64.length, 2);
- expect(message.unpackedFixed32.length, 2);
- expect(message.unpackedFixed64.length, 2);
- expect(message.unpackedSfixed32.length, 2);
- expect(message.unpackedSfixed64.length, 2);
- expect(message.unpackedFloat.length, 2);
- expect(message.unpackedDouble.length, 2);
- expect(message.unpackedBool.length, 2);
- expect(message.unpackedEnum.length, 2);
- expect(message.unpackedInt32[0], 601);
- expect(message.unpackedInt64[0], expect64(602));
- expect(message.unpackedUint32[0], 603);
- expect(message.unpackedUint64[0], expect64(604));
- expect(message.unpackedSint32[0], 605);
- expect(message.unpackedSint64[0], expect64(606));
- expect(message.unpackedFixed32[0], 607);
- expect(message.unpackedFixed64[0], expect64(608));
- expect(message.unpackedSfixed32[0], 609);
- expect(message.unpackedSfixed64[0], expect64(610));
- expect(message.unpackedFloat[0], 611.0);
- expect(message.unpackedDouble[0], 612.0);
- expect(message.unpackedBool[0], true);
- expect(message.unpackedEnum[0], ForeignEnum.FOREIGN_BAR);
- expect(message.unpackedInt32[1], 701);
- expect(message.unpackedInt64[1], expect64(702));
- expect(message.unpackedUint32[1], 703);
- expect(message.unpackedUint64[1], expect64(704));
- expect(message.unpackedSint32[1], 705);
- expect(message.unpackedSint64[1], expect64(706));
- expect(message.unpackedFixed32[1], 707);
- expect(message.unpackedFixed64[1], expect64(708));
- expect(message.unpackedSfixed32[1], 709);
- expect(message.unpackedSfixed64[1], expect64(710));
- expect(message.unpackedFloat[1], 711.0);
- expect(message.unpackedDouble[1], 712.0);
- expect(message.unpackedBool[1], false);
- expect(message.unpackedEnum[1], ForeignEnum.FOREIGN_BAZ);
-}
-
-TestAllExtensions getAllExtensionsSet() {
- TestAllExtensions message = new TestAllExtensions();
- setAllExtensions(message);
- return message;
-}
-
-/**
- * Get a [TestAllTypes] with all fields set as they would
- * be by [setAllFields(TestAllTypes)].
- */
-TestAllTypes getAllSet() {
- TestAllTypes message = new TestAllTypes();
- setAllFields(message);
- return message;
-}
-
-ExtensionRegistry getExtensionRegistry() {
- ExtensionRegistry registry = new ExtensionRegistry();
- registerAllExtensions(registry);
- return registry /*.getUnmodifiable()*/;
-}
-
-TestPackedExtensions getPackedExtensionsSet() {
- TestPackedExtensions message = new TestPackedExtensions();
- setPackedExtensions(message);
- return message;
-}
-
-TestPackedTypes getPackedSet() {
- TestPackedTypes message = new TestPackedTypes();
- setPackedFields(message);
- return message;
-}
-
-TestUnpackedTypes getUnpackedSet() {
- TestUnpackedTypes message = new TestUnpackedTypes();
- setUnpackedFields(message);
- return message;
-}
-
-void modifyRepeatedExtensions(TestAllExtensions message) {
- message.getExtension(Unittest.repeatedInt32Extension)[1] = 501;
- message.getExtension(Unittest.repeatedInt64Extension)[1] = make64(502);
- message.getExtension(Unittest.repeatedUint32Extension)[1] = 503;
- message.getExtension(Unittest.repeatedUint64Extension)[1] = make64(504);
- message.getExtension(Unittest.repeatedSint32Extension)[1] = 505;
- message.getExtension(Unittest.repeatedSint64Extension)[1] = make64(506);
- message.getExtension(Unittest.repeatedFixed32Extension)[1] = 507;
- message.getExtension(Unittest.repeatedFixed64Extension)[1] = make64(508);
- message.getExtension(Unittest.repeatedSfixed32Extension)[1] = 509;
- message.getExtension(Unittest.repeatedSfixed64Extension)[1] = make64(510);
- message.getExtension(Unittest.repeatedFloatExtension)[1] = 511.0;
- message.getExtension(Unittest.repeatedDoubleExtension)[1] = 512.0;
- message.getExtension(Unittest.repeatedBoolExtension)[1] = true;
- message.getExtension(Unittest.repeatedStringExtension)[1] = '515';
- message.getExtension(Unittest.repeatedBytesExtension)[1] = '516'.codeUnits;
-
- var msg;
-
- msg = new RepeatedGroup_extension();
- msg.a = 517;
- message.getExtension(Unittest.repeatedGroupExtension)[1] = msg;
-
- msg = new TestAllTypes_NestedMessage();
- msg.bb = 518;
- message.getExtension(Unittest.repeatedNestedMessageExtension)[1] = msg;
-
- msg = new ForeignMessage();
- msg.c = 519;
- message.getExtension(Unittest.repeatedForeignMessageExtension)[1] = msg;
-
- msg = new ImportMessage();
- msg.d = 520;
- message.getExtension(Unittest.repeatedImportMessageExtension)[1] = msg;
-
- message.getExtension(Unittest.repeatedNestedEnumExtension)[1] =
- TestAllTypes_NestedEnum.FOO;
- message.getExtension(Unittest.repeatedForeignEnumExtension)[1] =
- ForeignEnum.FOREIGN_FOO;
- message.getExtension(Unittest.repeatedImportEnumExtension)[1] =
- ImportEnum.IMPORT_FOO;
-
- message.getExtension(Unittest.repeatedStringPieceExtension)[1] = '524';
- message.getExtension(Unittest.repeatedCordExtension)[1] = '525';
-}
-
-/**
- * Modify the repeated fields of {@code message} to contain the values
- * expected by {@code assertRepeatedFieldsModified()}.
- */
-void modifyRepeatedFields(TestAllTypes message) {
- message.repeatedInt32[1] = 501;
- message.repeatedInt64[1] = make64(502);
- message.repeatedUint32[1] = 503;
- message.repeatedUint64[1] = make64(504);
- message.repeatedSint32[1] = 505;
- message.repeatedSint64[1] = make64(506);
- message.repeatedFixed32[1] = 507;
- message.repeatedFixed64[1] = make64(508);
- message.repeatedSfixed32[1] = 509;
- message.repeatedSfixed64[1] = make64(510);
- message.repeatedFloat[1] = 511.0;
- message.repeatedDouble[1] = 512.0;
- message.repeatedBool[1] = true;
- message.repeatedString[1] = '515';
- message.repeatedBytes[1] = '516'.codeUnits;
-
- TestAllTypes_RepeatedGroup repeatedGroup = new TestAllTypes_RepeatedGroup();
- repeatedGroup.a = 517;
- message.repeatedGroup[1] = repeatedGroup;
-
- TestAllTypes_NestedMessage optionalNestedMessage =
- new TestAllTypes_NestedMessage();
- optionalNestedMessage.bb = 518;
- message.repeatedNestedMessage[1] = optionalNestedMessage;
-
- ForeignMessage optionalForeignMessage = new ForeignMessage();
- optionalForeignMessage.c = 519;
- message.repeatedForeignMessage[1] = optionalForeignMessage;
-
- ImportMessage optionalImportMessage = new ImportMessage();
- optionalImportMessage.d = 520;
- message.repeatedImportMessage[1] = optionalImportMessage;
-
- message.repeatedNestedEnum[1] = TestAllTypes_NestedEnum.BAR;
- message.repeatedForeignEnum[1] = ForeignEnum.FOREIGN_BAR;
- message.repeatedImportEnum[1] = ImportEnum.IMPORT_BAR;
-
- message.repeatedStringPiece[1] = '524';
- message.repeatedCord[1] = '525';
-}
-
-void registerAllExtensions(ExtensionRegistry registry) {
- Unittest.registerAllExtensions(registry);
-}
-
-void setAllExtensions(TestAllExtensions message) {
- message.setExtension(Unittest.optionalInt32Extension, 101);
- message.setExtension(Unittest.optionalInt64Extension, make64(102));
- message.setExtension(Unittest.optionalUint32Extension, 103);
- message.setExtension(Unittest.optionalUint64Extension, make64(104));
- message.setExtension(Unittest.optionalSint32Extension, 105);
- message.setExtension(Unittest.optionalSint64Extension, make64(106));
- message.setExtension(Unittest.optionalFixed32Extension, 107);
- message.setExtension(Unittest.optionalFixed64Extension, make64(108));
- message.setExtension(Unittest.optionalSfixed32Extension, 109);
- message.setExtension(Unittest.optionalSfixed64Extension, make64(110));
- message.setExtension(Unittest.optionalFloatExtension, 111.0);
- message.setExtension(Unittest.optionalDoubleExtension, 112.0);
- message.setExtension(Unittest.optionalBoolExtension, true);
- message.setExtension(Unittest.optionalStringExtension, '115');
- message.setExtension(Unittest.optionalBytesExtension, '116'.codeUnits);
-
- var msg;
-
- msg = new OptionalGroup_extension();
- msg.a = 117;
- message.setExtension(Unittest.optionalGroupExtension, msg);
-
- msg = new TestAllTypes_NestedMessage();
- msg.bb = 118;
- message.setExtension(Unittest.optionalNestedMessageExtension, msg);
-
- msg = new ForeignMessage();
- msg.c = 119;
- message.setExtension(Unittest.optionalForeignMessageExtension, msg);
-
- msg = new ImportMessage();
- msg.d = 120;
- message.setExtension(Unittest.optionalImportMessageExtension, msg);
-
- message.setExtension(
- Unittest.optionalNestedEnumExtension, TestAllTypes_NestedEnum.BAZ);
- message.setExtension(
- Unittest.optionalForeignEnumExtension, ForeignEnum.FOREIGN_BAZ);
- message.setExtension(
- Unittest.optionalImportEnumExtension, ImportEnum.IMPORT_BAZ);
-
- message.setExtension(Unittest.optionalStringPieceExtension, '124');
- message.setExtension(Unittest.optionalCordExtension, '125');
-
- // -----------------------------------------------------------------
-
- message.addExtension(Unittest.repeatedInt32Extension, 201);
- message.addExtension(Unittest.repeatedInt64Extension, make64(202));
- message.addExtension(Unittest.repeatedUint32Extension, 203);
- message.addExtension(Unittest.repeatedUint64Extension, make64(204));
- message.addExtension(Unittest.repeatedSint32Extension, 205);
- message.addExtension(Unittest.repeatedSint64Extension, make64(206));
- message.addExtension(Unittest.repeatedFixed32Extension, 207);
- message.addExtension(Unittest.repeatedFixed64Extension, make64(208));
- message.addExtension(Unittest.repeatedSfixed32Extension, 209);
- message.addExtension(Unittest.repeatedSfixed64Extension, make64(210));
- message.addExtension(Unittest.repeatedFloatExtension, 211.0);
- message.addExtension(Unittest.repeatedDoubleExtension, 212.0);
- message.addExtension(Unittest.repeatedBoolExtension, true);
- message.addExtension(Unittest.repeatedStringExtension, '215');
- message.addExtension(Unittest.repeatedBytesExtension, '216'.codeUnits);
-
- msg = new RepeatedGroup_extension();
- msg.a = 217;
- message.addExtension(Unittest.repeatedGroupExtension, msg);
-
- msg = new TestAllTypes_NestedMessage();
- msg.bb = 218;
- message.addExtension(Unittest.repeatedNestedMessageExtension, msg);
-
- msg = new ForeignMessage();
- msg.c = 219;
- message.addExtension(Unittest.repeatedForeignMessageExtension, msg);
-
- msg = new ImportMessage();
- msg.d = 220;
- message.addExtension(Unittest.repeatedImportMessageExtension, msg);
-
- message.addExtension(
- Unittest.repeatedNestedEnumExtension, TestAllTypes_NestedEnum.BAR);
- message.addExtension(
- Unittest.repeatedForeignEnumExtension, ForeignEnum.FOREIGN_BAR);
- message.addExtension(
- Unittest.repeatedImportEnumExtension, ImportEnum.IMPORT_BAR);
-
- message.addExtension(Unittest.repeatedStringPieceExtension, '224');
- message.addExtension(Unittest.repeatedCordExtension, '225');
-
- // Add a second one of each field.
- message.addExtension(Unittest.repeatedInt32Extension, 301);
- message.addExtension(Unittest.repeatedInt64Extension, make64(302));
- message.addExtension(Unittest.repeatedUint32Extension, 303);
- message.addExtension(Unittest.repeatedUint64Extension, make64(304));
- message.addExtension(Unittest.repeatedSint32Extension, 305);
- message.addExtension(Unittest.repeatedSint64Extension, make64(306));
- message.addExtension(Unittest.repeatedFixed32Extension, 307);
- message.addExtension(Unittest.repeatedFixed64Extension, make64(308));
- message.addExtension(Unittest.repeatedSfixed32Extension, 309);
- message.addExtension(Unittest.repeatedSfixed64Extension, make64(310));
- message.addExtension(Unittest.repeatedFloatExtension, 311.0);
- message.addExtension(Unittest.repeatedDoubleExtension, 312.0);
- message.addExtension(Unittest.repeatedBoolExtension, false);
- message.addExtension(Unittest.repeatedStringExtension, '315');
- message.addExtension(Unittest.repeatedBytesExtension, '316'.codeUnits);
-
- msg = new RepeatedGroup_extension();
- msg.a = 317;
- message.addExtension(Unittest.repeatedGroupExtension, msg);
-
- msg = new TestAllTypes_NestedMessage();
- msg.bb = 318;
- message.addExtension(Unittest.repeatedNestedMessageExtension, msg);
-
- msg = new ForeignMessage();
- msg.c = 319;
- message.addExtension(Unittest.repeatedForeignMessageExtension, msg);
-
- msg = new ImportMessage();
- msg.d = 320;
- message.addExtension(Unittest.repeatedImportMessageExtension, msg);
-
- message.addExtension(
- Unittest.repeatedNestedEnumExtension, TestAllTypes_NestedEnum.BAZ);
- message.addExtension(
- Unittest.repeatedForeignEnumExtension, ForeignEnum.FOREIGN_BAZ);
- message.addExtension(
- Unittest.repeatedImportEnumExtension, ImportEnum.IMPORT_BAZ);
-
- message.addExtension(Unittest.repeatedStringPieceExtension, '324');
- message.addExtension(Unittest.repeatedCordExtension, '325');
-
- // -----------------------------------------------------------------
-
- message.setExtension(Unittest.defaultInt32Extension, 401);
- message.setExtension(Unittest.defaultInt64Extension, make64(402));
- message.setExtension(Unittest.defaultUint32Extension, 403);
- message.setExtension(Unittest.defaultUint64Extension, make64(404));
- message.setExtension(Unittest.defaultSint32Extension, 405);
- message.setExtension(Unittest.defaultSint64Extension, make64(406));
- message.setExtension(Unittest.defaultFixed32Extension, 407);
- message.setExtension(Unittest.defaultFixed64Extension, make64(408));
- message.setExtension(Unittest.defaultSfixed32Extension, 409);
- message.setExtension(Unittest.defaultSfixed64Extension, make64(410));
- message.setExtension(Unittest.defaultFloatExtension, 411.0);
- message.setExtension(Unittest.defaultDoubleExtension, 412.0);
- message.setExtension(Unittest.defaultBoolExtension, false);
- message.setExtension(Unittest.defaultStringExtension, '415');
- message.setExtension(Unittest.defaultBytesExtension, '416'.codeUnits);
-
- message.setExtension(
- Unittest.defaultNestedEnumExtension, TestAllTypes_NestedEnum.FOO);
- message.setExtension(
- Unittest.defaultForeignEnumExtension, ForeignEnum.FOREIGN_FOO);
- message.setExtension(
- Unittest.defaultImportEnumExtension, ImportEnum.IMPORT_FOO);
-
- message.setExtension(Unittest.defaultStringPieceExtension, '424');
- message.setExtension(Unittest.defaultCordExtension, '425');
-}
-
-/**
- * Set every field of {@code message} to the values expected by
- * {@code assertAllFieldsSet()}.
- */
-void setAllFields(TestAllTypes message) {
- message.optionalInt32 = 101;
- message.optionalInt64 = make64(102);
- message.optionalUint32 = 103;
- message.optionalUint64 = make64(104);
- message.optionalSint32 = 105;
- message.optionalSint64 = make64(106);
- message.optionalFixed32 = 107;
- message.optionalFixed64 = make64(108);
- message.optionalSfixed32 = 109;
- message.optionalSfixed64 = make64(110);
- message.optionalFloat = 111.0;
- message.optionalDouble = 112.0;
- message.optionalBool = true;
- message.optionalString = '115';
- message.optionalBytes = '116'.codeUnits;
-
- TestAllTypes_OptionalGroup optionalGroup = new TestAllTypes_OptionalGroup();
- optionalGroup.a = 117;
- message.optionalGroup = optionalGroup;
-
- TestAllTypes_NestedMessage optionalNestedMessage =
- new TestAllTypes_NestedMessage();
- optionalNestedMessage.bb = 118;
- message.optionalNestedMessage = optionalNestedMessage;
-
- ForeignMessage optionalForeignMessage = new ForeignMessage();
- optionalForeignMessage.c = 119;
- message.optionalForeignMessage = optionalForeignMessage;
-
- ImportMessage optionalImportMessage = new ImportMessage();
- optionalImportMessage.d = 120;
- message.optionalImportMessage = optionalImportMessage;
-
- message.optionalNestedEnum = TestAllTypes_NestedEnum.BAZ;
- message.optionalForeignEnum = ForeignEnum.FOREIGN_BAZ;
- message.optionalImportEnum = ImportEnum.IMPORT_BAZ;
-
- message.optionalStringPiece = '124';
- message.optionalCord = '125';
-
- // -----------------------------------------------------------------
-
- message.repeatedInt32.add(201);
- message.repeatedInt64.add(make64(202));
- message.repeatedUint32.add(203);
- message.repeatedUint64.add(make64(204));
- message.repeatedSint32.add(205);
- message.repeatedSint64.add(make64(206));
- message.repeatedFixed32.add(207);
- message.repeatedFixed64.add(make64(208));
- message.repeatedSfixed32.add(209);
- message.repeatedSfixed64.add(make64(210));
- message.repeatedFloat.add(211.0);
- message.repeatedDouble.add(212.0);
- message.repeatedBool.add(true);
- message.repeatedString.add('215');
- message.repeatedBytes.add('216'.codeUnits);
-
- TestAllTypes_RepeatedGroup repeatedGroup = new TestAllTypes_RepeatedGroup();
- repeatedGroup.a = 217;
- message.repeatedGroup.add(repeatedGroup);
-
- TestAllTypes_NestedMessage repeatedNested = new TestAllTypes_NestedMessage();
- repeatedNested.bb = 218;
- message.repeatedNestedMessage.add(repeatedNested);
-
- ForeignMessage repeatedForeignMessage = new ForeignMessage();
- repeatedForeignMessage.c = 219;
- message.repeatedForeignMessage.add(repeatedForeignMessage);
-
- ImportMessage repeatedImportMessage = new ImportMessage();
- repeatedImportMessage.d = 220;
- message.repeatedImportMessage.add(repeatedImportMessage);
-
- message.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAR);
- message.repeatedForeignEnum.add(ForeignEnum.FOREIGN_BAR);
- message.repeatedImportEnum.add(ImportEnum.IMPORT_BAR);
-
- message.repeatedStringPiece.add('224');
- message.repeatedCord.add('225');
-
- // Add a second one of each field.
- message.repeatedInt32.add(301);
- message.repeatedInt64.add(make64(302));
- message.repeatedUint32.add(303);
- message.repeatedUint64.add(make64(304));
- message.repeatedSint32.add(305);
- message.repeatedSint64.add(make64(306));
- message.repeatedFixed32.add(307);
- message.repeatedFixed64.add(make64(308));
- message.repeatedSfixed32.add(309);
- message.repeatedSfixed64.add(make64(310));
- message.repeatedFloat.add(311.0);
- message.repeatedDouble.add(312.0);
- message.repeatedBool.add(false);
- message.repeatedString.add('315');
- message.repeatedBytes.add('316'.codeUnits);
-
- repeatedGroup = new TestAllTypes_RepeatedGroup();
- repeatedGroup.a = 317;
- message.repeatedGroup.add(repeatedGroup);
-
- repeatedNested = new TestAllTypes_NestedMessage();
- repeatedNested.bb = 318;
- message.repeatedNestedMessage.add(repeatedNested);
-
- repeatedForeignMessage = new ForeignMessage();
- repeatedForeignMessage.c = 319;
- message.repeatedForeignMessage.add(repeatedForeignMessage);
-
- repeatedImportMessage = new ImportMessage();
- repeatedImportMessage.d = 320;
- message.repeatedImportMessage.add(repeatedImportMessage);
-
- message.repeatedNestedEnum.add(TestAllTypes_NestedEnum.BAZ);
- message.repeatedForeignEnum.add(ForeignEnum.FOREIGN_BAZ);
- message.repeatedImportEnum.add(ImportEnum.IMPORT_BAZ);
-
- message.repeatedStringPiece.add('324');
- message.repeatedCord.add('325');
-
- // -----------------------------------------------------------------
-
- message.defaultInt32 = 401;
- message.defaultInt64 = make64(402);
- message.defaultUint32 = 403;
- message.defaultUint64 = make64(404);
- message.defaultSint32 = 405;
- message.defaultSint64 = make64(406);
- message.defaultFixed32 = 407;
- message.defaultFixed64 = make64(408);
- message.defaultSfixed32 = 409;
- message.defaultSfixed64 = make64(410);
- message.defaultFloat = 411.0;
- message.defaultDouble = 412.0;
- message.defaultBool = false;
- message.defaultString = '415';
- message.defaultBytes = '416'.codeUnits;
-
- message.defaultNestedEnum = TestAllTypes_NestedEnum.FOO;
- message.defaultForeignEnum = ForeignEnum.FOREIGN_FOO;
- message.defaultImportEnum = ImportEnum.IMPORT_FOO;
-
- message.defaultStringPiece = '424';
- message.defaultCord = '425';
-}
-
-void setPackedExtensions(TestPackedExtensions message) {
- message.addExtension(Unittest.packedInt32Extension, 601);
- message.addExtension(Unittest.packedInt64Extension, make64(602));
- message.addExtension(Unittest.packedUint32Extension, 603);
- message.addExtension(Unittest.packedUint64Extension, make64(604));
- message.addExtension(Unittest.packedSint32Extension, 605);
- message.addExtension(Unittest.packedSint64Extension, make64(606));
- message.addExtension(Unittest.packedFixed32Extension, 607);
- message.addExtension(Unittest.packedFixed64Extension, make64(608));
- message.addExtension(Unittest.packedSfixed32Extension, 609);
- message.addExtension(Unittest.packedSfixed64Extension, make64(610));
- message.addExtension(Unittest.packedFloatExtension, 611.0);
- message.addExtension(Unittest.packedDoubleExtension, 612.0);
- message.addExtension(Unittest.packedBoolExtension, true);
- message.addExtension(Unittest.packedEnumExtension, ForeignEnum.FOREIGN_BAR);
- // Add a second one of each field.
- message.addExtension(Unittest.packedInt32Extension, 701);
- message.addExtension(Unittest.packedInt64Extension, make64(702));
- message.addExtension(Unittest.packedUint32Extension, 703);
- message.addExtension(Unittest.packedUint64Extension, make64(704));
- message.addExtension(Unittest.packedSint32Extension, 705);
- message.addExtension(Unittest.packedSint64Extension, make64(706));
- message.addExtension(Unittest.packedFixed32Extension, 707);
- message.addExtension(Unittest.packedFixed64Extension, make64(708));
- message.addExtension(Unittest.packedSfixed32Extension, 709);
- message.addExtension(Unittest.packedSfixed64Extension, make64(710));
- message.addExtension(Unittest.packedFloatExtension, 711.0);
- message.addExtension(Unittest.packedDoubleExtension, 712.0);
- message.addExtension(Unittest.packedBoolExtension, false);
- message.addExtension(Unittest.packedEnumExtension, ForeignEnum.FOREIGN_BAZ);
-}
-
-/**
- * Set every field of [message] to a unique value. Must correspond with
- * the values applied by [setUnpackedFields].
- */
-void setPackedFields(TestPackedTypes message) {
- message.packedInt32.add(601);
- message.packedInt64.add(make64(602));
- message.packedUint32.add(603);
- message.packedUint64.add(make64(604));
- message.packedSint32.add(605);
- message.packedSint64.add(make64(606));
- message.packedFixed32.add(607);
- message.packedFixed64.add(make64(608));
- message.packedSfixed32.add(609);
- message.packedSfixed64.add(make64(610));
- message.packedFloat.add(611.0);
- message.packedDouble.add(612.0);
- message.packedBool.add(true);
- message.packedEnum.add(ForeignEnum.FOREIGN_BAR);
- // Add a second one of each field.
- message.packedInt32.add(701);
- message.packedInt64.add(make64(702));
- message.packedUint32.add(703);
- message.packedUint64.add(make64(704));
- message.packedSint32.add(705);
- message.packedSint64.add(make64(706));
- message.packedFixed32.add(707);
- message.packedFixed64.add(make64(708));
- message.packedSfixed32.add(709);
- message.packedSfixed64.add(make64(710));
- message.packedFloat.add(711.0);
- message.packedDouble.add(712.0);
- message.packedBool.add(false);
- message.packedEnum.add(ForeignEnum.FOREIGN_BAZ);
-}
-
-/**
- * Set every field of [message] to a unique value. Must correspond with
- * the values applied by [setPackedFields].
- */
-void setUnpackedFields(TestUnpackedTypes message) {
- message.unpackedInt32.add(601);
- message.unpackedInt64.add(make64(602));
- message.unpackedUint32.add(603);
- message.unpackedUint64.add(make64(604));
- message.unpackedSint32.add(605);
- message.unpackedSint64.add(make64(606));
- message.unpackedFixed32.add(607);
- message.unpackedFixed64.add(make64(608));
- message.unpackedSfixed32.add(609);
- message.unpackedSfixed64.add(make64(610));
- message.unpackedFloat.add(611.0);
- message.unpackedDouble.add(612.0);
- message.unpackedBool.add(true);
- message.unpackedEnum.add(ForeignEnum.FOREIGN_BAR);
- // Add a second one of each field.
- message.unpackedInt32.add(701);
- message.unpackedInt64.add(make64(702));
- message.unpackedUint32.add(703);
- message.unpackedUint64.add(make64(704));
- message.unpackedSint32.add(705);
- message.unpackedSint64.add(make64(706));
- message.unpackedFixed32.add(707);
- message.unpackedFixed64.add(make64(708));
- message.unpackedSfixed32.add(709);
- message.unpackedSfixed64.add(make64(710));
- message.unpackedFloat.add(711.0);
- message.unpackedDouble.add(712.0);
- message.unpackedBool.add(false);
- message.unpackedEnum.add(ForeignEnum.FOREIGN_BAZ);
-}
diff --git a/test/unknown_field_set_test.dart b/test/unknown_field_set_test.dart
deleted file mode 100755
index b0305a4..0000000
--- a/test/unknown_field_set_test.dart
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library unknown_field_set_test;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-import 'test_util.dart';
-
-void main() {
- TestAllTypes testAllTypes = getAllSet();
- List<int> allFieldsData = testAllTypes.writeToBuffer();
- TestEmptyMessage emptyMessage =
- new TestEmptyMessage.fromBuffer(allFieldsData);
- UnknownFieldSet unknownFields = emptyMessage.unknownFields;
-
- UnknownFieldSetField getField(String name) {
- int tagNumber = testAllTypes.getTagNumber(name);
- assert(unknownFields.hasField(tagNumber));
- return unknownFields.getField(tagNumber);
- }
-
- /**
- * Asserts that the given field sets are not equal and have different
- * hash codes.
- *
- * N.B.: It is valid for non-equal objects to have the same hash code, so
- * this test is more strict than necessary. However, in the test cases
- * identifies, the hash codes should differ, and as a matter of principle
- * hash collisions should be relatively rare.
- */
- void _checkNotEqual(UnknownFieldSet s1, UnknownFieldSet s2) {
- expect(s1 == s2, isFalse);
- expect(s2 == s1, isFalse);
-
- expect(s1.hashCode == s2.hashCode, isFalse,
- reason: '${s1.toString()} should have a different hash code '
- 'from ${s2.toString()}');
- }
-
- /**
- * Asserts that the given field sets are equal and have identical hash codes.
- */
- void _checkEqualsIsConsistent(UnknownFieldSet set) {
- // Object should be equal to itself.
- expect(set, set);
-
- // Object should be equal to a copy of itself.
- UnknownFieldSet copy = set.clone();
- expect(copy, set);
- expect(set, copy);
- }
-
- test('testVarint', () {
- UnknownFieldSetField optionalInt32 = getField('optionalInt32');
- expect(optionalInt32.varints[0], expect64(testAllTypes.optionalInt32));
- });
-
- test('testFixed32', () {
- UnknownFieldSetField optionalFixed32 = getField('optionalFixed32');
- expect(optionalFixed32.fixed32s[0], testAllTypes.optionalFixed32);
- });
-
- test('testFixed64', () {
- UnknownFieldSetField optionalFixed64 = getField('optionalFixed64');
- expect(optionalFixed64.fixed64s[0], testAllTypes.optionalFixed64);
- });
-
- test('testLengthDelimited', () {
- UnknownFieldSetField optionalBytes = getField('optionalBytes');
- expect(optionalBytes.lengthDelimited[0], testAllTypes.optionalBytes);
- });
-
- test('testGroup', () {
- int tagNumberA = new TestAllTypes_OptionalGroup().getTagNumber('a');
- expect(tagNumberA != null, isTrue);
-
- UnknownFieldSetField optionalGroupField = getField('optionalGroup');
- expect(optionalGroupField.groups.length, 1);
- UnknownFieldSet group = optionalGroupField.groups[0];
- expect(group.hasField(tagNumberA), isTrue);
- expect(group.getField(tagNumberA).varints[0],
- expect64(testAllTypes.optionalGroup.a));
- });
-
- test('testSerialize', () {
- expect(emptyMessage.writeToBuffer(), allFieldsData);
- });
-
- test('testCopyFrom', () {
- TestEmptyMessage message = emptyMessage.clone();
- expect(message.toString(), emptyMessage.toString());
- expect(emptyMessage.toString().isEmpty, isFalse);
- });
-
- test('testMergeFrom', () {
- // Source.
- UnknownFieldSet sourceFieldSet = new UnknownFieldSet()
- ..addField(2, new UnknownFieldSetField()..addVarint(make64(2)))
- ..addField(3, new UnknownFieldSetField()..addVarint(make64(3)));
-
- TestEmptyMessage source = new TestEmptyMessage()
- ..mergeUnknownFields(sourceFieldSet);
-
- // Destination.
- UnknownFieldSet destinationFieldSet = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addVarint(make64(1)))
- ..addField(3, new UnknownFieldSetField()..addVarint(make64(4)));
-
- TestEmptyMessage destination = new TestEmptyMessage()
- ..mergeUnknownFields(destinationFieldSet)
- ..mergeFromMessage(source);
-
- expect(
- destination.toString(),
- '1: 1\n'
- '2: 2\n'
- '3: 4\n'
- '3: 3\n');
- });
-
- test('testClear', () {
- UnknownFieldSet fsb = unknownFields.clone()..clear();
- expect(fsb.asMap(), isEmpty);
- });
-
- test('testEmpty', () {
- expect(new UnknownFieldSet().asMap(), isEmpty);
- });
-
- test('testClearMessage', () {
- TestEmptyMessage message = emptyMessage.clone();
- message.clear();
- expect(message.writeToBuffer(), isEmpty);
- });
-
- test('testParseKnownAndUnknown', () {
- // Test mixing known and unknown fields when parsing.
- UnknownFieldSet fields = unknownFields.clone()
- ..addField(123456, new UnknownFieldSetField()..addVarint(make64(654321)));
-
- CodedBufferWriter writer = new CodedBufferWriter();
- fields.writeToCodedBufferWriter(writer);
-
- TestAllTypes destination = new TestAllTypes.fromBuffer(writer.toBuffer());
-
- assertAllFieldsSet(destination);
- expect(destination.unknownFields.asMap().length, 1);
-
- UnknownFieldSetField field = destination.unknownFields.getField(123456);
- expect(field.varints.length, 1);
- expect(field.varints[0], expect64(654321));
- });
-
- // Constructs a protocol buffer which contains fields with all the same
- // numbers as allFieldsData except that each field is some other wire
- // type.
- List<int> getBizarroData() {
- UnknownFieldSet bizarroFields = new UnknownFieldSet();
-
- UnknownFieldSetField varintField = new UnknownFieldSetField()
- ..addVarint(make64(1));
-
- UnknownFieldSetField fixed32Field = new UnknownFieldSetField()
- ..addFixed32(1);
-
- unknownFields.asMap().forEach((int tag, UnknownFieldSetField value) {
- if (value.varints.isEmpty) {
- // Original field is not a varint, so use a varint.
- bizarroFields.addField(tag, varintField);
- } else {
- // Original field *is* a varint, so use something else.
- bizarroFields.addField(tag, fixed32Field);
- }
- });
- CodedBufferWriter writer = new CodedBufferWriter();
- bizarroFields.writeToCodedBufferWriter(writer);
- return writer.toBuffer();
- }
-
- test('testWrongTypeTreatedAsUnknown', () {
- // Test that fields of the wrong wire type are treated like unknown fields
- // when parsing.
- List<int> bizarroData = getBizarroData();
- TestAllTypes allTypesMessage = new TestAllTypes.fromBuffer(bizarroData);
- TestEmptyMessage emptyMessage_ =
- new TestEmptyMessage.fromBuffer(bizarroData);
- // All fields should have been interpreted as unknown, so the debug strings
- // should be the same.
- expect(allTypesMessage.toString(), emptyMessage_.toString());
- });
-
- test('testUnknownExtensions', () {
- // Make sure fields are properly parsed to the UnknownFieldSet even when
- // they are declared as extension numbers.
- TestEmptyMessageWithExtensions message =
- new TestEmptyMessageWithExtensions.fromBuffer(allFieldsData);
-
- expect(message.unknownFields.asMap().length, unknownFields.asMap().length);
- expect(message.writeToBuffer(), allFieldsData);
- });
-
- test('testWrongExtensionTypeTreatedAsUnknown', () {
- // Test that fields of the wrong wire type are treated like unknown fields
- // when parsing extensions.
-
- List<int> bizarroData = getBizarroData();
- TestAllExtensions allExtensionsMessage =
- new TestAllExtensions.fromBuffer(bizarroData);
- TestEmptyMessage emptyMessage_ =
- new TestEmptyMessage.fromBuffer(bizarroData);
-
- // All fields should have been interpreted as unknown, so the debug strings
- // should be the same.
- expect(allExtensionsMessage.toString(), emptyMessage_.toString());
- });
-
- test('testParseUnknownEnumValue', () {
- int singularFieldNum = testAllTypes.getTagNumber('optionalNestedEnum');
- int repeatedFieldNum = testAllTypes.getTagNumber('repeatedNestedEnum');
- expect(singularFieldNum, isNotNull);
- expect(repeatedFieldNum, isNotNull);
-
- UnknownFieldSet fieldSet = new UnknownFieldSet()
- ..addField(
- singularFieldNum,
- new UnknownFieldSetField()
- ..addVarint(make64(TestAllTypes_NestedEnum.BAR.value))
- ..addVarint(make64(5)))
- ..addField(
- repeatedFieldNum,
- new UnknownFieldSetField()
- ..addVarint(make64(TestAllTypes_NestedEnum.FOO.value))
- ..addVarint(make64(4))
- ..addVarint(make64(TestAllTypes_NestedEnum.BAZ.value))
- ..addVarint(make64(6)));
-
- CodedBufferWriter writer = new CodedBufferWriter();
- fieldSet.writeToCodedBufferWriter(writer);
- {
- TestAllTypes message = new TestAllTypes.fromBuffer(writer.toBuffer());
- expect(message.optionalNestedEnum, TestAllTypes_NestedEnum.BAR);
- expect(message.repeatedNestedEnum,
- [TestAllTypes_NestedEnum.FOO, TestAllTypes_NestedEnum.BAZ]);
- final singularVarints =
- message.unknownFields.getField(singularFieldNum).varints;
- expect(singularVarints.length, 1);
- expect(singularVarints[0], expect64(5));
- final repeatedVarints =
- message.unknownFields.getField(repeatedFieldNum).varints;
- expect(repeatedVarints.length, 2);
- expect(repeatedVarints[0], expect64(4));
- expect(repeatedVarints[1], expect64(6));
- }
- {
- TestAllExtensions message = new TestAllExtensions.fromBuffer(
- writer.toBuffer(), getExtensionRegistry());
- expect(message.getExtension(Unittest.optionalNestedEnumExtension),
- TestAllTypes_NestedEnum.BAR);
-
- expect(message.getExtension(Unittest.repeatedNestedEnumExtension),
- [TestAllTypes_NestedEnum.FOO, TestAllTypes_NestedEnum.BAZ]);
- final singularVarints =
- message.unknownFields.getField(singularFieldNum).varints;
- expect(singularVarints.length, 1);
- expect(singularVarints[0], expect64(5));
- final repeatedVarints =
- message.unknownFields.getField(repeatedFieldNum).varints;
- expect(repeatedVarints.length, 2);
- expect(repeatedVarints[0], expect64(4));
- expect(repeatedVarints[1], expect64(6));
- }
- });
-
- test('testLargeVarint', () {
- UnknownFieldSet unknownFieldSet = new UnknownFieldSet()
- ..addField(
- 1,
- new UnknownFieldSetField()
- ..addVarint(make64(0x7FFFFFFF, 0xFFFFFFFF)));
- CodedBufferWriter writer = new CodedBufferWriter();
- unknownFieldSet.writeToCodedBufferWriter(writer);
-
- var parsed = new UnknownFieldSet()
- ..mergeFromCodedBufferReader(new CodedBufferReader(writer.toBuffer()));
- var field = parsed.getField(1);
- expect(field.varints.length, 1);
- expect(field.varints[0], expect64(0x7FFFFFFF, 0xFFFFFFFFF));
- });
-
- test('testEquals', () {
- UnknownFieldSet a = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addFixed32(1));
-
- UnknownFieldSet b = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addFixed64(make64(1)));
-
- UnknownFieldSet c = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addVarint(make64(1)));
-
- UnknownFieldSet d = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addLengthDelimited([]));
-
- UnknownFieldSet e = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addGroup(unknownFields));
-
- _checkEqualsIsConsistent(a);
- _checkEqualsIsConsistent(b);
- _checkEqualsIsConsistent(c);
- _checkEqualsIsConsistent(d);
- _checkEqualsIsConsistent(e);
-
- _checkNotEqual(a, b);
- _checkNotEqual(a, c);
- _checkNotEqual(a, d);
- _checkNotEqual(a, e);
- _checkNotEqual(b, c);
- _checkNotEqual(b, d);
- _checkNotEqual(b, e);
- _checkNotEqual(c, d);
- _checkNotEqual(c, e);
- _checkNotEqual(d, e);
-
- UnknownFieldSet f1 = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addLengthDelimited([1, 2]));
- UnknownFieldSet f2 = new UnknownFieldSet()
- ..addField(1, new UnknownFieldSetField()..addLengthDelimited([2, 1]));
-
- _checkEqualsIsConsistent(f1);
- _checkEqualsIsConsistent(f2);
-
- _checkNotEqual(f1, f2);
- });
-}
diff --git a/test/validate_fail_test.dart b/test/validate_fail_test.dart
deleted file mode 100755
index fee3a11..0000000
--- a/test/validate_fail_test.dart
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library validate_fail_test;
-
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-// [ArgumentError] in production mode, [TypeError] in checked.
-final invalidArgumentException =
- predicate((e) => e is ArgumentError || e is TypeError);
-final badArgument = throwsA(invalidArgumentException);
-
-// Suppress an analyzer warning for a deliberate type mismatch.
-cast(x) => x;
-
-void main() {
- test('testValidationFailureMessages', () {
- TestAllTypes builder = new TestAllTypes();
-
- expect(() {
- builder.optionalInt32 = null;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalInt32 = cast('101');
- }, badArgument);
- expect(() {
- builder.optionalInt32 = -2147483649;
- }, throwsArgumentError);
- expect(() {
- builder.optionalInt32 = 2147483648;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalInt64 = cast('102');
- }, badArgument);
- expect(() {
- builder.optionalInt64 = cast(-9223372036854775808);
- }, badArgument);
- expect(() {
- builder.optionalInt64 = cast(9223372036854775807);
- }, badArgument);
-
- expect(() {
- builder.optionalUint32 = cast('103');
- }, badArgument);
- expect(() {
- builder.optionalUint32 = -1;
- }, throwsArgumentError);
- expect(() {
- builder.optionalUint32 = 4294967296;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalUint64 = cast('104');
- }, badArgument);
- expect(() {
- builder.optionalUint64 = cast(-1);
- }, badArgument);
- expect(() {
- builder.optionalUint64 = cast(8446744073709551616);
- }, badArgument);
-
- expect(() {
- builder.optionalSint32 = cast('105');
- }, badArgument);
- expect(() {
- builder.optionalSint32 = -2147483649;
- }, throwsArgumentError);
- expect(() {
- builder.optionalSint32 = 2147483648;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalSint64 = cast('106');
- }, badArgument);
- expect(() {
- builder.optionalSint64 = cast(-9223372036854775808);
- }, badArgument);
- expect(() {
- builder.optionalSint64 = cast(9223372036854775807);
- }, badArgument);
-
- expect(() {
- builder.optionalFixed32 = cast('107');
- }, badArgument);
- expect(() {
- builder.optionalFixed32 = -1;
- }, throwsArgumentError);
- expect(() {
- builder.optionalFixed32 = 4294967296;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalFixed64 = cast('108');
- }, badArgument);
- expect(() {
- builder.optionalFixed64 = cast(-1);
- }, badArgument);
- expect(() {
- builder.optionalFixed64 = cast(8446744073709551616);
- }, badArgument);
-
- expect(() {
- builder.optionalSfixed32 = cast('109');
- }, badArgument);
- expect(() {
- builder.optionalSfixed32 = -2147483649;
- }, throwsArgumentError);
- expect(() {
- builder.optionalSfixed32 = 2147483648;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalSfixed64 = cast('110');
- }, badArgument);
- expect(() {
- builder.optionalSfixed64 = cast(-9223372036854775808);
- }, badArgument);
- expect(() {
- builder.optionalSfixed64 = cast(9223372036854775807);
- }, badArgument);
-
- expect(() {
- builder.optionalFloat = cast('111');
- }, badArgument);
- expect(() {
- builder.optionalFloat = -3.4028234663852886E39;
- }, throwsArgumentError);
- expect(() {
- builder.optionalFloat = 3.4028234663852886E39;
- }, throwsArgumentError);
-
- expect(() {
- builder.optionalDouble = cast('112');
- }, badArgument);
-
- expect(() {
- builder.optionalBool = cast('113');
- }, badArgument);
-
- expect(() {
- builder.optionalString = cast(false);
- }, badArgument);
-
- // Can't test this easily in strong mode.
- // expect(() {
- // builder.optionalBytes = cast('115');
- // }, badArgument);
-
- expect(() {
- builder.optionalNestedMessage = cast('118');
- }, badArgument);
-
- expect(() {
- builder.optionalNestedEnum = cast('121');
- }, badArgument);
-
- // Set repeating value (no setter should exist).
- expect(() {
- cast(builder).repeatedInt32 = 201;
- }, throwsNoSuchMethodError);
-
- // Unknown tag.
- expect(() {
- builder.setField(999, 'field');
- }, throwsArgumentError);
-
- expect(() {
- new TestAllExtensions()
- .setExtension(Unittest.optionalInt32Extension, '101');
- }, throwsArgumentError);
- });
-}
diff --git a/test/wire_format_test.dart b/test/wire_format_test.dart
deleted file mode 100755
index f4530e3..0000000
--- a/test/wire_format_test.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library wire_format_test;
-
-import 'package:protobuf/protobuf.dart';
-import 'package:test/test.dart';
-
-import '../out/protos/google/protobuf/unittest.pb.dart';
-
-import 'test_util.dart';
-
-void main() {
- test('testSerialization', () {
- assertAllFieldsSet(
- new TestAllTypes.fromBuffer(getAllSet().writeToBuffer()));
- });
-
- test('testSerializationPacked', () {
- assertPackedFieldsSet(
- new TestPackedTypes.fromBuffer(getPackedSet().writeToBuffer()));
- });
-
- test('testSerializeExtensions', () {
- assertAllFieldsSet(
- new TestAllTypes.fromBuffer(getAllExtensionsSet().writeToBuffer()));
- });
-
- test('testSerializePackedExtensions', () {
- expect(getPackedExtensionsSet().writeToBuffer(),
- getPackedSet().writeToBuffer());
- });
-
- test('testParseExtensions', () {
- // TestAllTypes and TestAllExtensions should have compatible wire formats,
- // so if we serialize a TestAllTypes then parse it as TestAllExtensions
- // it should work.
- List<int> rawBytes = getAllSet().writeToBuffer();
- ExtensionRegistry registry = getExtensionRegistry();
-
- assertAllExtensionsSet(
- new TestAllExtensions.fromBuffer(rawBytes, registry));
- });
-
- test('testParsePackedExtensions', () {
- // Ensure that packed extensions can be properly parsed.
- List<int> rawBytes = getPackedExtensionsSet().writeToBuffer();
- ExtensionRegistry registry = getExtensionRegistry();
-
- assertPackedExtensionsSet(
- new TestPackedExtensions.fromBuffer(rawBytes, registry));
- });
-
- test('testExtensionsSerialized', () {
- expect(getAllExtensionsSet().writeToBuffer(), getAllSet().writeToBuffer());
- });
-
- test('testParseMultipleExtensionRanges', () {
- // Make sure we can parse a message that contains multiple extensions
- // ranges.
- TestFieldOrderings source = new TestFieldOrderings()
- ..myInt = make64(1)
- ..myString = 'foo'
- ..myFloat = 1.0
- ..setExtension(Unittest.myExtensionInt, 23)
- ..setExtension(Unittest.myExtensionString, 'bar');
-
- ExtensionRegistry registry = new ExtensionRegistry()
- ..add(Unittest.myExtensionInt)
- ..add(Unittest.myExtensionString);
-
- TestFieldOrderings dest =
- new TestFieldOrderings.fromBuffer(source.writeToBuffer(), registry);
-
- expect(dest, source);
- });
-}
diff --git a/tool/builder.dart b/tool/builder.dart
deleted file mode 100644
index acf8865..0000000
--- a/tool/builder.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:convert';
-
-import 'package:build/build.dart';
-import 'package:glob/glob.dart';
-
-Builder benchmarkBuilder(BuilderOptions options) => _BenchmarkBuilder();
-
-class _BenchmarkBuilder implements Builder {
- @override
- Future build(BuildStep buildStep) async {
- var data = <String, String>{};
-
- await for (var item in buildStep
- .findAssets(Glob('benchmark/**/*.pb.json'))
- .where((id) =>
- id.pathSegments.length > 2 &&
- id.pathSegments[0] == 'benchmark' &&
- id.pathSegments[1] == 'data')) {
- data[item.pathSegments.skip(2).join('/')] =
- await buildStep.readAsString(item);
- }
-
- await buildStep.writeAsString(
- AssetId(buildStep.inputId.package, 'benchmark/data/data.json'),
- JsonEncoder.withIndent(' ').convert(data));
- }
-
- @override
- final buildExtensions = const {
- r'lib/$lib$': ['benchmark/data/data.json']
- };
-}
diff --git a/tool/travis/analyze.sh b/tool/travis/analyze.sh
deleted file mode 100755
index 42e3d43..0000000
--- a/tool/travis/analyze.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-set -ev
-
-PATH=$HOME/protoc/bin:$PATH
-protoc --version
-dartanalyzer --version
-pub get
-make protos
-dartanalyzer .
diff --git a/tool/travis/setup.sh b/tool/travis/setup.sh
deleted file mode 100755
index 114befe..0000000
--- a/tool/travis/setup.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-set -ev
-
-mkdir $HOME/protoc
-pushd $HOME/protoc
-wget https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip
-unzip protoc-$PROTOC_VERSION-linux-x86_64.zip
-popd
diff --git a/tool/travis/test.sh b/tool/travis/test.sh
deleted file mode 100755
index cd30c94..0000000
--- a/tool/travis/test.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-set -ev
-
-PATH=$HOME/protoc/bin:$PATH
-protoc --version
-pub get
-make clean run-tests