Go - Use Go bool type for bool fields (#4962)

* Use Go bool type for bool fields, and store non-default bool field to test data
This commit is contained in:
kostya-sh
2018-10-16 00:55:59 +01:00
committed by Robert
parent 20396a1760
commit 76d31e1b5e
12 changed files with 42 additions and 21 deletions

View File

@@ -67,7 +67,7 @@ function main()
\MyGame\Example\Monster::AddTest4($fbb, $test4);
\MyGame\Example\Monster::AddTestarrayofstring($fbb, $testArrayOfString);
\MyGame\Example\Monster::AddEnemy($fbb, $enemy);
\MyGame\Example\Monster::AddTestbool($fbb, false);
\MyGame\Example\Monster::AddTestbool($fbb, true);
$mon = \MyGame\Example\Monster::EndMonster($fbb);
\MyGame\Example\Monster::FinishMonsterBuffer($fbb, $mon);
@@ -142,7 +142,7 @@ function test_buffer(Assert $assert, Google\FlatBuffers\ByteBuffer $bb) {
$fred = $monster->getEnemy();
$assert->Equal('Fred', $fred->getName());
$assert->strictEqual($monster->GetTestbool(), false);
$assert->strictEqual($monster->GetTestbool(), true);
}
//function testUnicode(Assert $assert) {