Lines Matching refs:pair
46 for (const pair of getBoolPairs()) {
47 it(`decode ${pair.name}`, () => {
48 if (pair.error && CHECK_CRITICAL_STATE) {
49 expect(() => reader.readBool(pair.bufferDecoder, 0)).toThrow();
52 pair.bufferDecoder, pair.bufferDecoder.startIndex());
53 expect(d).toEqual(pair.boolValue);
79 for (const pair of getDoublePairs()) {
80 it(`decode ${pair.name}`, () => {
81 const d = reader.readDouble(pair.bufferDecoder, 0);
82 expect(d).toEqual(pair.doubleValue);
93 for (const pair of getFixed32Pairs()) {
94 it(`decode ${pair.name}`, () => {
95 const d = reader.readFixed32(pair.bufferDecoder, 0);
96 expect(d).toEqual(pair.intValue);
107 for (const pair of getFloatPairs()) {
108 it(`decode ${pair.name}`, () => {
109 const d = reader.readFloat(pair.bufferDecoder, 0);
110 expect(d).toEqual(Math.fround(pair.floatValue));
121 for (const pair of getInt32Pairs()) {
122 it(`decode ${pair.name}`, () => {
123 if (pair.error && CHECK_CRITICAL_STATE) {
124 expect(() => reader.readInt32(pair.bufferDecoder, 0)).toThrow();
126 const d = reader.readInt32(pair.bufferDecoder, 0);
127 expect(d).toEqual(pair.intValue);
139 for (const pair of getSfixed32Pairs()) {
140 it(`decode ${pair.name}`, () => {
141 const d = reader.readSfixed32(pair.bufferDecoder, 0);
142 expect(d).toEqual(pair.intValue);
153 for (const pair of getSfixed64Pairs()) {
154 it(`decode ${pair.name}`, () => {
155 const d = reader.readSfixed64(pair.bufferDecoder, 0);
156 expect(d).toEqual(pair.longValue);
167 for (const pair of getSint32Pairs()) {
168 it(`decode ${pair.name}`, () => {
169 if (pair.error && CHECK_CRITICAL_STATE) {
170 expect(() => reader.readSint32(pair.bufferDecoder, 0)).toThrow();
172 const d = reader.readSint32(pair.bufferDecoder, 0);
173 expect(d).toEqual(pair.intValue);
185 for (const pair of getInt64Pairs()) {
186 it(`decode ${pair.name}`, () => {
187 if (pair.error && CHECK_CRITICAL_STATE) {
188 expect(() => reader.readInt64(pair.bufferDecoder, 0)).toThrow();
190 const d = reader.readInt64(pair.bufferDecoder, 0);
191 expect(d).toEqual(pair.longValue);
203 for (const pair of getSint64Pairs()) {
204 it(`decode ${pair.name}`, () => {
205 if (pair.error && CHECK_CRITICAL_STATE) {
206 expect(() => reader.readSint64(pair.bufferDecoder, 0)).toThrow();
208 const d = reader.readSint64(pair.bufferDecoder, 0);
209 expect(d).toEqual(pair.longValue);
221 for (const pair of getUint32Pairs()) {
222 if (!pair.skip_reader) {
223 it(`decode ${pair.name}`, () => {
224 if (pair.error && CHECK_CRITICAL_STATE) {
225 expect(() => reader.readUint32(pair.bufferDecoder, 0)).toThrow();
227 const d = reader.readUint32(pair.bufferDecoder, 0);
228 expect(d).toEqual(pair.intValue);
329 for (const pair of getPackedBoolPairs()) {
330 it(`decode ${pair.name}`, () => {
331 const d = reader.readPackedBool(pair.bufferDecoder, 0);
332 expect(d).toEqual(pair.boolValues);
338 for (const pair of getPackedDoublePairs()) {
339 it(`decode ${pair.name}`, () => {
340 const d = reader.readPackedDouble(pair.bufferDecoder, 0);
341 expect(d).toEqual(pair.doubleValues);
347 for (const pair of getPackedFixed32Pairs()) {
348 it(`decode ${pair.name}`, () => {
349 const d = reader.readPackedFixed32(pair.bufferDecoder, 0);
350 expect(d).toEqual(pair.fixed32Values);
356 for (const pair of getPackedFloatPairs()) {
357 it(`decode ${pair.name}`, () => {
358 const d = reader.readPackedFloat(pair.bufferDecoder, 0);
359 expect(d).toEqual(pair.floatValues);
365 for (const pair of getPackedInt32Pairs()) {
366 it(`decode ${pair.name}`, () => {
367 const d = reader.readPackedInt32(pair.bufferDecoder, 0);
368 expect(d).toEqual(pair.int32Values);
374 for (const pair of getPackedInt64Pairs()) {
375 it(`decode ${pair.name}`, () => {
376 const d = reader.readPackedInt64(pair.bufferDecoder, 0);
377 expect(d).toEqual(pair.int64Values);
383 for (const pair of getPackedSfixed32Pairs()) {
384 it(`decode ${pair.name}`, () => {
385 const d = reader.readPackedSfixed32(pair.bufferDecoder, 0);
386 expect(d).toEqual(pair.sfixed32Values);
392 for (const pair of getPackedSfixed64Pairs()) {
393 it(`decode ${pair.name}`, () => {
394 const d = reader.readPackedSfixed64(pair.bufferDecoder, 0);
395 expect(d).toEqual(pair.sfixed64Values);
401 for (const pair of getPackedSint32Pairs()) {
402 it(`decode ${pair.name}`, () => {
403 const d = reader.readPackedSint32(pair.bufferDecoder, 0);
404 expect(d).toEqual(pair.sint32Values);
410 for (const pair of getPackedSint64Pairs()) {
411 it(`decode ${pair.name}`, () => {
412 const d = reader.readPackedSint64(pair.bufferDecoder, 0);
413 expect(d).toEqual(pair.sint64Values);
419 for (const pair of getPackedUint32Pairs()) {
420 it(`decode ${pair.name}`, () => {
421 const d = reader.readPackedUint32(pair.bufferDecoder, 0);
422 expect(d).toEqual(pair.uint32Values);