function testEncodeVarintBC()
 {
     foreach ($this->tests as $i => $enc) {
         if ($i < 0) {
             continue;
         }
         // Only test positive values
         $result = Protobuf::encode_varint_bc($i);
         $this->assertBinaryEqual($enc, $result, "Failed to encode_varint_bc({$i})");
     }
     try {
         Protobuf::encode_varint_bc("bob");
         $this->fail("Exception should have been thrown");
     } catch (InvalidArgumentException $e) {
     }
     try {
         $result = Protobuf::encode_varint_bc("-1");
         $this->fail("Exception should have been thrown");
     } catch (InvalidArgumentException $e) {
     }
     try {
         $result = Protobuf::encode_varint_bc(-1);
         $this->fail("Exception should have been thrown");
     } catch (InvalidArgumentException $e) {
     }
     try {
         $result = Protobuf::encode_varint_bc("18446744073709551616");
         $this->fail("Exception should have been thrown");
     } catch (InvalidArgumentException $e) {
     }
 }