|
@@ -118,12 +118,19 @@ class EncodeDecodeTest extends TestBase
|
|
$this->assertEquals(1, $m->getValue());
|
|
$this->assertEquals(1, $m->getValue());
|
|
}
|
|
}
|
|
|
|
|
|
- # public function testEncodeTopLevelInt64Value()
|
|
|
|
- # {
|
|
|
|
- # $m = new Int64Value();
|
|
|
|
- # $m->setValue(1);
|
|
|
|
- # $this->assertSame("\"1\"", $m->serializeToJsonString());
|
|
|
|
- # }
|
|
|
|
|
|
+ public function testDecodeTopLevelInt64ValueAsString()
|
|
|
|
+ {
|
|
|
|
+ $m = new Int64Value();
|
|
|
|
+ $m->mergeFromJsonString("\"1\"");
|
|
|
|
+ $this->assertEquals(1, $m->getValue());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function testEncodeTopLevelInt64Value()
|
|
|
|
+ {
|
|
|
|
+ $m = new Int64Value();
|
|
|
|
+ $m->setValue(1);
|
|
|
|
+ $this->assertSame("\"1\"", $m->serializeToJsonString());
|
|
|
|
+ }
|
|
|
|
|
|
public function testDecodeTopLevelUInt64Value()
|
|
public function testDecodeTopLevelUInt64Value()
|
|
{
|
|
{
|
|
@@ -132,12 +139,19 @@ class EncodeDecodeTest extends TestBase
|
|
$this->assertEquals(1, $m->getValue());
|
|
$this->assertEquals(1, $m->getValue());
|
|
}
|
|
}
|
|
|
|
|
|
- # public function testEncodeTopLevelUInt64Value()
|
|
|
|
- # {
|
|
|
|
- # $m = new UInt64Value();
|
|
|
|
- # $m->setValue(1);
|
|
|
|
- # $this->assertSame("\"1\"", $m->serializeToJsonString());
|
|
|
|
- # }
|
|
|
|
|
|
+ public function testDecodeTopLevelUInt64ValueAsString()
|
|
|
|
+ {
|
|
|
|
+ $m = new UInt64Value();
|
|
|
|
+ $m->mergeFromJsonString("\"1\"");
|
|
|
|
+ $this->assertEquals(1, $m->getValue());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function testEncodeTopLevelUInt64Value()
|
|
|
|
+ {
|
|
|
|
+ $m = new UInt64Value();
|
|
|
|
+ $m->setValue(1);
|
|
|
|
+ $this->assertSame("\"1\"", $m->serializeToJsonString());
|
|
|
|
+ }
|
|
|
|
|
|
public function testDecodeTopLevelStringValue()
|
|
public function testDecodeTopLevelStringValue()
|
|
{
|
|
{
|