use Bool for flatbuffers bool instead of Byte (#7876)

Add test for Bool type in swift

Co-authored-by: mustiikhalil <26250654+mustiikhalil@users.noreply.github.com>
This commit is contained in:
blindspotbounty
2023-03-26 19:45:48 -04:00
committed by GitHub
parent 1cb1c4baee
commit 477b1b5d13
5 changed files with 14 additions and 10 deletions

View File

@@ -217,6 +217,10 @@ class FlatBuffersMonsterWriterTests: XCTestCase {
XCTAssertEqual(monster.testType, .monster)
XCTAssertTrue(monster.mutate(testbool: false))
XCTAssertEqual(monster.testbool, false)
XCTAssertTrue(monster.mutate(testbool: true))
XCTAssertEqual(monster.mutate(inventory: 1, at: 0), true)
XCTAssertEqual(monster.mutate(inventory: 2, at: 1), true)
XCTAssertEqual(monster.mutate(inventory: 3, at: 2), true)