Code cleanup + updates test and readme (#6004)

Updates Readme + adds asserts

Fixes documentation
This commit is contained in:
mustiikhalil
2020-06-30 21:37:43 +03:00
committed by GitHub
parent 8a721f69a1
commit 37a5dee105
8 changed files with 51 additions and 70 deletions

View File

@@ -5,13 +5,6 @@ final class FlatBuffersDoubleTests: XCTestCase {
let country = "Norway"
func testCreateCountry() {
var b = FlatBufferBuilder(initialSize: 16)
_ = CountryDouble.createCountry(builder: &b, name: country, log: 200, lan: 100)
let v: [UInt8] = [10, 0, 28, 0, 4, 0, 8, 0, 16, 0, 10, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 64, 0, 0, 0, 0, 0, 0, 105, 64, 0, 0, 0, 0, 6, 0, 0, 0, 78, 111, 114, 119, 97, 121, 0, 0]
XCTAssertEqual(b.sizedByteArray, v)
}
func testCreateFinish() {
var b = FlatBufferBuilder(initialSize: 16)
let countryOff = CountryDouble.createCountry(builder: &b, name: country, log: 200, lan: 100)