Commit c6fa9c71 authored by Bo Yang's avatar Bo Yang

Auto-generate proto files for tests.

parent f174d363
......@@ -121,6 +121,8 @@ conformance/succeeding_tests.txt
# php test output
composer.lock
php/tests/test.pb.php
php/tests/test_include.pb.php
php/ext/google/protobuf/.libs/
php/ext/google/protobuf/Makefile.fragments
php/ext/google/protobuf/Makefile.global
......
This diff is collapsed.
#!/bin/bash
cd ../ext/google/protobuf/
# Compile protoc
pushd ../../
./autogen.sh && ./configure && make
popd
# Generate test file
../../src/protoc --php_out=. test.proto test_include.proto
# Compile c extension
pushd ../ext/google/protobuf/
make clean
set -e
phpize && ./configure --enable-debug CFLAGS='-g -O0' && make
cd -
popd
tests=( array_test.php encode_decode_test.php generated_class_test.php map_field_test.php )
......
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: test_include.proto
namespace Bar;
use Google\Protobuf\Internal\DescriptorPool;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
class TestInclude extends \Google\Protobuf\Internal\Message
{
private $a = 0;
public function getA()
{
return $this->a;
}
public function setA($var)
{
GPBUtil::checkInt32($var);
$this->a = $var;
}
}
$pool = DescriptorPool::getGeneratedPool();
$pool->internalAddGeneratedFile(hex2bin(
"0a3b0a12746573745f696e636c7564652e70726f746f120362617222180a" .
"0b54657374496e636c75646512090a0161180120012805620670726f746f" .
"33"
));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment