OLD | NEW |
1 | 1 |
2 import com.google.protobuf.conformance.Conformance; | 2 import com.google.protobuf.conformance.Conformance; |
3 import com.google.protobuf.util.JsonFormat; | 3 import com.google.protobuf.util.JsonFormat; |
4 import com.google.protobuf.util.JsonFormat.TypeRegistry; | 4 import com.google.protobuf.util.JsonFormat.TypeRegistry; |
5 import com.google.protobuf.InvalidProtocolBufferException; | 5 import com.google.protobuf.InvalidProtocolBufferException; |
6 | 6 |
7 class ConformanceJava { | 7 class ConformanceJava { |
8 private int testCount = 0; | 8 private int testCount = 0; |
9 private TypeRegistry typeRegistry; | 9 private TypeRegistry typeRegistry; |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 writeLittleEndianIntToStdout(serializedOutput.length); | 122 writeLittleEndianIntToStdout(serializedOutput.length); |
123 writeToStdout(serializedOutput); | 123 writeToStdout(serializedOutput); |
124 | 124 |
125 return true; | 125 return true; |
126 } | 126 } |
127 | 127 |
128 public void run() throws Exception { | 128 public void run() throws Exception { |
129 typeRegistry = TypeRegistry.newBuilder().add( | 129 typeRegistry = TypeRegistry.newBuilder().add( |
130 Conformance.TestAllTypes.getDescriptor()).build(); | 130 Conformance.TestAllTypes.getDescriptor()).build(); |
131 while (doTestIo()) { | 131 while (doTestIo()) { |
132 // Empty. | 132 this.testCount++; |
133 } | 133 } |
134 | 134 |
135 System.err.println("ConformanceJava: received EOF from test runner after " + | 135 System.err.println("ConformanceJava: received EOF from test runner after " + |
136 this.testCount + " tests"); | 136 this.testCount + " tests"); |
137 } | 137 } |
138 | 138 |
139 public static void main(String[] args) throws Exception { | 139 public static void main(String[] args) throws Exception { |
140 new ConformanceJava().run(); | 140 new ConformanceJava().run(); |
141 } | 141 } |
142 } | 142 } |
OLD | NEW |