OLD | NEW |
1 #!/usr/bin/env ruby | 1 #!/usr/bin/env ruby |
2 # | 2 # |
3 # Protocol Buffers - Google's data interchange format | 3 # Protocol Buffers - Google's data interchange format |
4 # Copyright 2008 Google Inc. All rights reserved. | 4 # Copyright 2008 Google Inc. All rights reserved. |
5 # https://developers.google.com/protocol-buffers/ | 5 # https://developers.google.com/protocol-buffers/ |
6 # | 6 # |
7 # Redistribution and use in source and binary forms, with or without | 7 # Redistribution and use in source and binary forms, with or without |
8 # modification, are permitted provided that the following conditions are | 8 # modification, are permitted provided that the following conditions are |
9 # met: | 9 # met: |
10 # | 10 # |
(...skipping 12 matching lines...) Expand all Loading... |
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
25 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 25 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
26 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 26 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
27 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 27 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | 32 |
33 require 'conformance' | 33 require 'conformance_pb' |
34 | 34 |
35 $test_count = 0 | 35 $test_count = 0 |
36 $verbose = false | 36 $verbose = false |
37 | 37 |
38 def do_test(request) | 38 def do_test(request) |
39 test_message = Conformance::TestAllTypes.new | 39 test_message = Conformance::TestAllTypes.new |
40 response = Conformance::ConformanceResponse.new | 40 response = Conformance::ConformanceResponse.new |
41 | 41 |
42 begin | 42 begin |
43 case request.payload | 43 case request.payload |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 true | 113 true |
114 end | 114 end |
115 | 115 |
116 loop do | 116 loop do |
117 unless do_test_io | 117 unless do_test_io |
118 STDERR.puts('conformance_ruby: received EOF from test runner ' \ | 118 STDERR.puts('conformance_ruby: received EOF from test runner ' \ |
119 "after #{$test_count} tests, exiting") | 119 "after #{$test_count} tests, exiting") |
120 break | 120 break |
121 end | 121 end |
122 end | 122 end |
OLD | NEW |